info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatically executing a function at sending


From: Merciadri Luca
Subject: Re: Automatically executing a function at sending
Date: Wed, 20 Jan 2010 09:57:22 -0800 (PST)
User-agent: G2/1.0

On Jan 20, 6:43 pm, Merciadri Luca <Luca.Mercia...@student.ulg.ac.be>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Richard Riley <rileyrg...@gmail.com> writes:
> > (your .sig separator should be "-- " btw)
>
> Huh.. I know. This is a problem due to Mailcrypt, which seems to be
> deprecated. Sorry, I still had no time. If you are interested (and
> maybe highly motivated, depending on your perseverance) in this, you may read
> http://www.mail-archive.com/info-gnus-engl...@gnu.org/msg07571.html.
>
>
>
>
>
> > Does this help?
>
> > ,----
> > | (defun wicked/gnus-add-subject-to-bbdb-record ()
> > |   "Add datestamped subject note for each person this message has been 
> > sent to."
> > |   (let* ((subject (concat (format-time-string "%Y.%m.%d")
> > |                           ": E-mail: " (message-fetch-field "Subject") 
> > "\n"))
> > |          (bbdb-get-addresses-headers
> > |           (list (assoc 'recipients bbdb-get-addresses-headers)))
> > |          records)
> > |     (setq records
> > |           (bbdb-update-records
> > |            (bbdb-get-addresses nil gnus-ignored-from-addresses 
> > 'gnus-fetch-field)
> > |            nil nil))
> > |     (mapc (lambda (rec)
> > |             (bbdb-record-putprop rec
> > |                                  'contact
> > |                                  (concat subject
> > |                                          (or
> > |                                           (bbdb-record-getprop rec 
> > 'contact)
> > |                                           ""))))
> > |           records)))
> > |
> > | (add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record)
> > `----
>
> > I borrowed it from Sacha Chua's website.
>
> I am going to try. I hope the
>
> ==
> (add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record)
> ==
>
> line does what I want. It would be so ... great!
>
> - --
> Merciadri Luca
> Seehttp://www.student.montefiore.ulg.ac.be/~merciadri/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
>
> iEYEARECAAYFAktXQMgACgkQM0LLzLt8MhwHjQCfXsEUntZJObtxAhgvxjeEpOdb
> AWIAnRky1mKRtMEt/ZfRWuIkYoC2Dv+s
> =fKUS
> -----END PGP SIGNATURE-----

Still me. (Sorry, no PGP here.)

Works like a charm. Thanks! The

==
(add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record)
==

is actually evaluated _once_ the message has been prepared for
delivery.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]