Article View: gnu.emacs.help
Article #189559Re: autoadd .signature ??!
From: Dion Hollenbeck
Date: Thu, 10 Jan 1991 15:17
Date: Thu, 10 Jan 1991 15:17
41 lines
2371 bytes
2371 bytes
In article <SHAWN.91Jan8103720@litsun.litsun.epfl.edu> shawn@litsun.litsun.epfl.edu (Shawn Koppenhoefer) writes:
>
> How do I get my .signature to automagically appear
> on the end of mail messages like it does when say
> posting inside of gnus?
>
> is there a hook i can use or something that will
> automagically append the .signature when i send
> mail?
There is no hook per se, but sendmail uses a function pointer to
call the funciton which sends your mail. I sometimes send it
before I am ready (slip of the fingers or brain fart or whatever)
and added the ability to query myself if I really wanted to do it.
You could modify it to suit your needs. Here is mine:
;; modify behaviour of send-mail-function
(setq send-mail-function (function (lambda ()
(interactive)
(ding)
(if (y-or-n-p "Really send? ")
(sendmail-send-it)
(error "Send Aborted")))))
You could probably do it with:
;; modify behaviour of send-mail-function to add ~/.signature
(setq send-mail-function (function (lambda ()
(interactive)
(mail-signature)
(sendmail-send-it))))
I even tried this code and it works!!! Just put this code in
your .emacs file and you should be OK. You could use the y/n
approach to ask if you wanted it appended, and then it could do
it automatically. Now that you bring it up, I think I will in
fact add this code to my function. Thanks for the idea
--
Dion Hollenbeck (619) 455-5590 x2814
Megatek Corporation, 9645 Scranton Road, San Diego, CA 92121
uunet!megatek!hollen or hollen@megatek.uucp
Technical Details
Message-ID:
<HOLLEN.91Jan10071738@fridge.megatek>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!usc!orion.oac.uci.edu!ucivax!megatek!fridge!hollenReferences:
<SHAWN.91Jan8103720@litsun.litsun.epfl.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,da45b11695b12e02 X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1991-01-11 05:20:17 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!usc!orion.oac.uci.edu!ucivax!megatek!fridge!hollen From: hollen@megatek (Dion Hollenbeck) Newsgroups: gnu.emacs.help Subject: Re: autoadd .signature ??! Message-ID: <HOLLEN.91Jan10071738@fridge.megatek> Date: 10 Jan 91 15:17:38 GMT References: <SHAWN.91Jan8103720@litsun.litsun.epfl.edu> Sender: hollen@megatek.UUCP Distribution: gnu Organization: Megatek Corporation, San Diego, California Lines: 41 In-reply-to: shawn@litsun.litsun.epfl.edu's message of 8 Jan 91 09:37:20 GMT