From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/52901 Path: main.gmane.org!not-for-mail From: Burton Samograd Newsgroups: gmane.emacs.gnus.general Subject: Re: Getting message details from message-sent-hook Date: 28 May 2003 12:25:13 -0700 Sender: ding-owner@lists.math.uh.edu Message-ID: <87fzmy50x2.fsf@kruhft.vc.shawcable.net> References: <874r3f7ydu.fsf@kruhft.vc.shawcable.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1054152170 26359 80.91.224.249 (28 May 2003 20:02:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 28 May 2003 20:02:50 +0000 (UTC) Original-X-From: ding-owner+M1445@lists.math.uh.edu Wed May 28 22:02:49 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19L78L-0006qw-00 for ; Wed, 28 May 2003 22:02:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19L7AH-0004ON-00; Wed, 28 May 2003 15:04:49 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19L7AC-0004OI-00 for ding@lists.math.uh.edu; Wed, 28 May 2003 15:04:44 -0500 Original-Received: (qmail 59632 invoked by alias); 28 May 2003 20:04:44 -0000 Original-Received: (qmail 59627 invoked from network); 28 May 2003 20:04:44 -0000 Original-Received: from main.gmane.org (80.91.224.249) by sclp3.sclp.com with SMTP; 28 May 2003 20:04:44 -0000 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19L77C-0006kk-00 for ; Wed, 28 May 2003 22:01:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19L76E-0006gf-00 for ; Wed, 28 May 2003 22:00:38 +0200 Original-Lines: 31 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:52901 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:52901 Burton Samograd writes: > What I need is functions that get the To and Subject from the mail or > post that was sent. Is any of that information available or am I > going to have to write something that parses the current *mail* > buffer? Some stroke of luck caused me to find the solution in a posting to gnu.emacs.sources. Here's the working code if anybody wants it: (defun message-to-diary () (make-diary-entry (concat (calendar-date-string (calendar-current-date) t) (if (message-fetch-field "newsgroups") (concat " Sent news To: " (message-fetch-field "newsgroups")) (concat " Sent mail To: " (message-fetch-field "to"))) " Subject: \"" (message-fetch-field "subject") "\"" " Message-ID: " (message-fetch-field "message-id")))) (add-hook 'message-sent-hook 'message-to-diary) This adds: Sent [mail|news] To: Subject: "" Message-ID: to the current diary file whenever you send a mail or news message. Hope someone finds it useful. -- burton samograd kruhft@kruhft.dyndns.org http://kruhftwerk.dyndns.org