Gnus development mailing list
 help / color / mirror / Atom feed
From: Jack Vinson <jvinson@cheux.ecs.umass.edu>
Subject: Re: .signature vs message.el
Date: 28 Mar 1996 14:34:00 -0500	[thread overview]
Message-ID: <wo91glxb9z.fsf_-_@cheux.ecs.umass.edu> (raw)
In-Reply-To: Robert Pluim's message of 28 Mar 1996 15:26:44 +0000

>>>>> "RP" == Robert Pluim <pluim@xylint.co.uk> 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  <jvinson@cheux.ecs.umass.edu>
+ 
+ 	* message.el (message-auto-signature): New Variable.
+ 	(message-setup): use it.
+ 
  Thu Mar 28 06:12:28 1996  Lars Magne Ingebrigtsen  <larsi@aegir.ifi.uio.no>
  
  	* 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



  reply	other threads:[~1996-03-28 19:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-28 15:26 Robert Pluim
1996-03-28 19:34 ` Jack Vinson [this message]
1996-03-29  5:41   ` Lars Magne Ingebrigtsen
1996-03-29 12:00     ` Robert Pluim
1996-04-09  6:12     ` Mark Borges
1996-04-09 19:12       ` Mark Borges
1996-04-09 22:08       ` d. hall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wo91glxb9z.fsf_-_@cheux.ecs.umass.edu \
    --to=jvinson@cheux.ecs.umass.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).