From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/5770 Path: main.gmane.org!not-for-mail From: Jack Vinson Newsgroups: gmane.emacs.gnus.general Subject: Re: .signature vs message.el Date: 28 Mar 1996 14:34:00 -0500 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035146326 1359 80.91.224.250 (20 Oct 2002 20:38:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:38:46 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.5/8.6.9) with SMTP id MAA01443 for ; Thu, 28 Mar 1996 12:39:35 -0800 Original-Received: from cheux.ecs.umass.edu (cheux.ecs.umass.edu [128.119.82.11]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Thu, 28 Mar 1996 20:35:09 +0100 Original-Received: by cheux.ecs.umass.edu (5.65/DEC-Ultrix/4.3) id AA23160; Thu, 28 Mar 1996 14:34:02 -0500 Original-To: ding@ifi.uio.no In-Reply-To: Robert Pluim's message of 28 Mar 1996 15:26:44 +0000 Original-Lines: 108 X-Mailer: September Gnus v0.59/Emacs 19.30 Xref: main.gmane.org gmane.emacs.gnus.general:5770 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:5770 >>>>> "RP" == Robert Pluim writes: RP> message.el is very nice, but it conflicts with the way I normally do RP> mail signatures. By default, I don't want a signature added to my RP> outgoing mail, but I want to be able to add one using C-c C-w . If I RP> set message-signature to nil, the first happens, but then I can't do RP> the second. If I set it to t, then it gets added automatically every RP> time I send a message, which I don't want either. Any suggestions? The way this is done in sendmail is a) if mail-signature is 't, then insert the contents of mail-signature-file into the *mail* buffer before the user starts composing the message. b) if mail-signature is non-nil, it must be a string that is the signature. Insert that. c) Otherwise, do nothing. This is handled by mail-setup which is now message-setup. The function mail-signature, run by C-c C-w, simply inserted the contents of the mail-signature-file into the buffer at the end of the buffer, or at the current point given a prefix argument. The problem is that Lars has changed message-setup to call message-insert-signature, rather than writing similar code twice. If this is to remain the case, we need another variable: message-auto-signature or something which we can set 't when we want message to insert our message-signature for us and 'nil when we want to do it ourselves with C-c C-w. If you want to use it now, the patch would be something like this. There may be a line number or two messed up. I did not test this, but the main change is one line in message-setup which only calls message-insert-signature if message-auto-signature is non-nil. message-signature needs to be non-nil if ANY signature is to be inserted. This makes sense; a nil message-signature indicates there is no signature to be inserted. *** ChangeLog~ Thu Mar 28 01:25:09 1996 --- ChangeLog Thu Mar 28 14:28:03 1996 *************** *** 1,3 **** --- 1,8 ---- + Thu Mar 28 14:27:54 1996 Jack Vinson + + * message.el (message-auto-signature): New Variable. + (message-setup): use it. + Thu Mar 28 06:12:28 1996 Lars Magne Ingebrigtsen * message.el (message-send-mail): Remove Gcc header. *** message.el~ Thu Mar 28 01:25:01 1996 --- message.el Thu Mar 28 14:26:03 1996 *************** *** 253,263 **** "*String to be inserted at the and the the message buffer. If t, the `message-signature-file' file will be inserted instead. If a function, the result from the function will be used instead. ! If a form, the result from the form will be used instead.") (defvar message-signature-file "~/.signature" "*File containing the text inserted at end of mail buffer.") (defvar message-distribution-function nil "*Function called to return a Distribution header.") --- 253,268 ---- "*String to be inserted at the and the the message buffer. If t, the `message-signature-file' file will be inserted instead. If a function, the result from the function will be used instead. ! If a form, the result from the form will be used instead. ! If nil, no signature will be inserted.") (defvar message-signature-file "~/.signature" "*File containing the text inserted at end of mail buffer.") + (defvar message-auto-signature t + "*Indicates whether Message should automatically insert a signature into + outgoing messages. See the documentation of `message-signature.'") + (defvar message-distribution-function nil "*Function called to return a Distribution header.") *************** *** 1826,1832 **** (message-generate-headers message-required-mail-headers)) (insert message-default-mail-headers)) (insert message-header-separator "\n") ! (message-insert-signature) (message-set-auto-save-file-name) (save-restriction (message-narrow-to-headers) --- 1830,1836 ---- (message-generate-headers message-required-mail-headers)) (insert message-default-mail-headers)) (insert message-header-separator "\n") ! (if message-auto-signature (message-insert-signature)) (message-set-auto-save-file-name) (save-restriction (message-narrow-to-headers) -- Jack Vinson jvinson@cheux.ecs.umass.edu "I Spit on Your Grave" -- double feature at the drive-in as seen "I Thumb Through Your Magazines" from the Qwik-E mart