From: Bill White <billw@wolfram.com>
Cc: ding@gnus.org
Subject: Re: Getting message details from message-sent-hook
Date: Wed, 28 May 2003 22:22:35 -0500 [thread overview]
Message-ID: <ruo4r3ea138.fsf@billw2lx.wolfram.com> (raw)
In-Reply-To: <87fzmy50x2.fsf@kruhft.vc.shawcable.net> (Burton Samograd's message of "28 May 2003 12:25:13 -0700")
On Wed May 28 2003 at 14:25, Burton Samograd <kruhft@hotmail.com> 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: <ruo65nua18e.fsf@billw2lx.wolfram.com>
which gives me this in the Fancy Diary Entries buffer:
22:19 Sent mail To: billw Subject: "test" Message-ID: <ruo65nua18e.fsf@billw2lx.wolfram.com>
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."
next prev parent reply other threads:[~2003-05-29 3:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-28 17:51 Burton Samograd
2003-05-28 19:25 ` Burton Samograd
2003-05-29 3:22 ` Bill White [this message]
2003-05-29 15:08 ` Burton Samograd
2003-05-29 17:30 ` Ted Zlatanov
2003-05-28 19:57 ` Johan Bockgård
2003-05-28 20:14 ` Benjamin Rutt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ruo4r3ea138.fsf@billw2lx.wolfram.com \
--to=billw@wolfram.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).