emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Cc: emacs-orgmode@gnu.org
Subject: Re: Capturing outgoing gnus e-mail
Date: Wed, 24 Sep 2014 17:04:35 -0400	[thread overview]
Message-ID: <87ppekk9wc.fsf@lifelogs.com> (raw)
In-Reply-To: 8761k3rivi.fsf@kanis.fr

On Sat, 14 Jun 2014 10:32:49 +0200 Ivan Kanis <ivan@kanis.fr> wrote: 

IK> I would like to capture outgoing e-mail in my org file.

IK> I use the gcc mechanism in gnus with a nnml backend.

IK> I think I have read on the org mailing list that someone has implemented
IK> that feature. I did a search but could not find the article.

IK> I tried implementing it myself. I had a look at the function
IK> gnus-inews-do-gcc. It has the group and the article number. However org
IK> link expect the Message-ID header. How do I get it?

Well, I use the following to maintain a diary file. It's probably
equally easy to use a Org file:

(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"))

(add-hook 'message-sent-hook 'message-to-diary)

HTH
Ted

  parent reply	other threads:[~2014-09-24 21:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-14  8:32 Capturing outgoing gnus e-mail Ivan Kanis
2014-06-14  9:05 ` Bastien
2014-12-15 12:08   ` Uwe Brauer
2014-06-14 10:06 ` Eric Abrahamsen
2014-06-16  2:08   ` Esben Stien
2014-06-16 13:29     ` Eric Abrahamsen
2014-09-24 21:04 ` Ted Zlatanov [this message]
2014-12-14 22:58   ` Uwe Brauer
  -- strict thread matches above, loose matches on Subject: below --
2014-06-14 14:43 Marvin Doyley

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppekk9wc.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    --cc=emacs-orgmode@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).