From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/52914 Path: main.gmane.org!not-for-mail From: Bill White Newsgroups: gmane.emacs.gnus.general Subject: Re: Getting message details from message-sent-hook Date: Wed, 28 May 2003 22:22:35 -0500 Sender: ding-owner@lists.math.uh.edu Message-ID: References: <874r3f7ydu.fsf@kruhft.vc.shawcable.net> <87fzmy50x2.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 1054192873 21184 80.91.224.249 (29 May 2003 07:21:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 29 May 2003 07:21:13 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M1458@lists.math.uh.edu Thu May 29 09:21:11 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 19LHiP-0005US-00 for ; Thu, 29 May 2003 09:20:45 +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 19LHk8-0007CE-00; Thu, 29 May 2003 02:22:32 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19LHjz-0007Bt-00 for ding@lists.math.uh.edu; Thu, 29 May 2003 02:22:23 -0500 Original-Received: (qmail 81232 invoked by alias); 29 May 2003 03:21:47 -0000 Original-Received: (qmail 81227 invoked from network); 29 May 2003 03:21:46 -0000 Original-Received: from wri-dns0.wolfram.com (HELO wolfram.com) (140.177.205.10) by sclp3.sclp.com with SMTP; 29 May 2003 03:21:46 -0000 Original-Received: from billw2lx.wolfram.com.wolfram.com (dmz5.wolfram.com [140.177.205.1]) by wolfram.com (8.11.2/8.11.2) with ESMTP id h4T3Lir09616; Wed, 28 May 2003 22:21:44 -0500 Original-To: Burton Samograd X-Phone: 217-398-0700 x 234 X-Fax: 217-398-0747 In-Reply-To: <87fzmy50x2.fsf@kruhft.vc.shawcable.net> (Burton Samograd's message of "28 May 2003 12:25:13 -0700") X-Liturgical-Date: Weekday: Wednesday of the Sixth Week of Easter Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXhi3LTqo5aNDHhybK0 Z1QrCgWzjXOMRjFnp3EdAAACN0lEQVR4nGWTTW/bMAyGmcWAr8kSeNdCq6PrVBbu1XM5627M2LlO 4F4DVQ3//igpqrNVB1viI778kASIWxlmm0ZVVXMakMDVPM/bz6CySint5+o/UL2PMgLJINlf6zGC QF4WUE3RPigh3FcLeL3aa1WPmhePKukknyGFgeAwZbsaZMvAfQa/wip6xQ9fMpDlPbnRCQgumhcw EHSKnFJj1orBZd6CVefSqZhB0AKTQaE9kI8ogpDtOP4BgM7LR0IJ8AnsE4AACitBHCfwLYLVBjLQ C7gDmXyALCXgLB74I8Sg+iZ4PfCZClpdPYYM9u439P2K2wjGBWzsHZTuwZ+JmDlXHsAXCUHWU0fW qptebcogQq2fnpQOwGewb2Om586ytPHmPAoB61UBZcGak1JKV8AaNi2UrYSP5V2BJYBNAeuyLcAm pSRFIkUSXf6FTUo3gMiyZNAlpSsgKFjiavFw7l9Qeila+VZqX4Bh8Qi1O91arTLYGWOJYu2WvVX6 koDZNdImG4419Msq1+f38SjrWseekwD+eDiNZFoP8SYwd6/6w6PxRO/S0lZOT7vG+lvQhVOQs9AK cUpNfEZj+3AFBun4yPWbeXTxtr8hfj2cgku4tU59R6yYBPxEfFL9id7Tg9ICjNMCdrJDJhQurTz0 yxFxT9IWMNg8P6j7+STNEjAj4szeMZiGjo1YPAW7ahB3hpgs7J8OiCqPQ/OCBuf5tAXaiuqUwdFM l0bCmiOw2PFhAc1FzGL6C38EE0ct5kxcAAAAAElFTkSuQmCC User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:52914 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:52914 On Wed May 28 2003 at 14:25, Burton Samograd said: > 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 is a neat idea. Here's my version: ,---- | (defun message-to-diary () | (make-diary-entry (concat => | (format-time-string "%B %d, %Y %H:%M" (gnus-date-get-time (message-fetch-field "date"))) | (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"))) => | (save-buffer "diary")) `---- This results in this line in `diary-file': May 28, 2003 22:19 Sent mail To: billw Subject: "test" Message-ID: which gives me this in the Fancy Diary Entries buffer: 22:19 Sent mail To: billw Subject: "test" Message-ID: Now, can some function grab the message id and jump to that article? Perhaps using Ted's registry stuff? Cheers - bw -- Bill White . billw@wolfram.com . http://members.wri.com/billw "No ma'am, we're musicians."