From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/13570 Path: news.gmane.org!not-for-mail From: Merciadri Luca Newsgroups: gmane.emacs.gnus.user Subject: Re: Automatically executing a function at sending Date: Wed, 20 Jan 2010 09:57:22 -0800 (PST) Organization: http://groups.google.com Message-ID: <0636a47a-9512-4556-a7f2-51b875fa4fdf@h9g2000yqa.googlegroups.com> References: <87zl4aqbne.fsf@merciadriluca-station.MERCIADRILUCA> <878wbsn03a.fsf@merciadriluca-station.MERCIADRILUCA> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1264014167 10786 80.91.229.12 (20 Jan 2010 19:02:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Jan 2010 19:02:47 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Wed Jan 20 20:02:39 2010 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NXfp6-0007oq-9y for gegu-info-gnus-english@m.gmane.org; Wed, 20 Jan 2010 20:02:36 +0100 Original-Received: from localhost ([127.0.0.1]:37072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXfp7-0000h5-Cw for gegu-info-gnus-english@m.gmane.org; Wed, 20 Jan 2010 14:02:37 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!h9g2000yqa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 85 Original-NNTP-Posting-Host: 62.197.101.67 Original-X-Trace: posting.google.com 1264010242 7280 127.0.0.1 (20 Jan 2010 17:57:22 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 20 Jan 2010 17:57:22 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: h9g2000yqa.googlegroups.com; posting-host=62.197.101.67; posting-account=V6LrigoAAACudvZ0KlT32AF1BSfjssFY User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.16) Gecko/2009121610 Iceweasel/3.0.6 (Debian-3.0.6-3),gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.gnus:83953 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:13570 Archived-At: On Jan 20, 6:43=A0pm, Merciadri Luca wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Richard Riley 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 () > > | =A0 "Add datestamped subject note for each person this message has be= en sent to." > > | =A0 (let* ((subject (concat (format-time-string "%Y.%m.%d") > > | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ": E-mail: " (mes= sage-fetch-field "Subject") "\n")) > > | =A0 =A0 =A0 =A0 =A0(bbdb-get-addresses-headers > > | =A0 =A0 =A0 =A0 =A0 (list (assoc 'recipients bbdb-get-addresses-heade= rs))) > > | =A0 =A0 =A0 =A0 =A0records) > > | =A0 =A0 (setq records > > | =A0 =A0 =A0 =A0 =A0 (bbdb-update-records > > | =A0 =A0 =A0 =A0 =A0 =A0(bbdb-get-addresses nil gnus-ignored-from-addr= esses 'gnus-fetch-field) > > | =A0 =A0 =A0 =A0 =A0 =A0nil nil)) > > | =A0 =A0 (mapc (lambda (rec) > > | =A0 =A0 =A0 =A0 =A0 =A0 (bbdb-record-putprop rec > > | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'c= ontact > > | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(c= oncat subject > > | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0(or > > | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 (bbdb-record-getprop rec 'contact) > > | =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 "")))) > > | =A0 =A0 =A0 =A0 =A0 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 > > =3D=3D > (add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record) > =3D=3D > > 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 > > iEYEARECAAYFAktXQMgACgkQM0LLzLt8MhwHjQCfXsEUntZJObtxAhgvxjeEpOdb > AWIAnRky1mKRtMEt/ZfRWuIkYoC2Dv+s > =3DfKUS > -----END PGP SIGNATURE----- Still me. (Sorry, no PGP here.) Works like a charm. Thanks! The =3D=3D (add-hook 'message-send-hook 'wicked/gnus-add-subject-to-bbdb-record) =3D=3D is actually evaluated _once_ the message has been prepared for delivery.