Ulf Stegemann <ulf-n...@zeitform.de> writes: > Eric S. Fraga <ucec...@ucl.ac.uk> wrote: > >> Ulf Stegemann <ulf-n...@zeitform.de> writes: >> >>> I came back to the matter of storing an org link to a copy of a message >>> upon sending that message. The function below does just that and proves >>> to be quite useful together with a sensible key binding (if you use Gnus >>> and Gcc that is). >> >> Very nice! Works very well. Thanks. >> >> Instead of binding this to a command sequence, is there any hook we can >> attach the function to so that it's invoked for every message I send >> (I'm somewhat of a gnus noob unfortunately although I'm learning...)? I >> ask because I alternative between =C-c C-c= and =C-c C-j= for sending >> emails and I would need to provide two alternatives to incorporate your >> function. > > hmmm, never thought of this, probably because I never use > `gnus-delay-article'. You could try to put the function into > `message-send-hook' (but you should remove the call to > `message-send-and-exit' first). I don't know if this would work as I > don't know if the Gcc magic (incl. removal of Gcc header) is done before > or after that hook. If the Gcc header has been removed when > `message-send-hook' is called than you'll have to look for a different > hook to use. If the Gcc header is still present, it should probably > work as expected but note that in that case the org link will be created > before the actual copying of the message took place. If something goes > wrong with the latter this will leave you with a bogus org link (which, > however, is probably not much of a problem).
Thanks. I realised after sending my earlier message that this is going to be quite complicated. There's no point in storing a link when the message is actually sent (after all, that will be sometime later). I would want to store the link when I send the message to the delay queue (so that I can do something with the link, of course) so there really need to be two versions of your function. Should be doable. I'll think about it some more. In any case, most of my emails are sent immediately so your function is very useful already. Thanks again, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1 : using Org-mode version 7.3 (release_7.3.42.g0fd5ec) _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacsfirstname.lastname@example.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode