Scott Kostyshak <skost...@lyx.org> writes: > On Mon, Aug 07, 2017 at 11:49:19AM +0200, Pavel Sanda wrote: >> Scott Kostyshak wrote: >> > When I'm reading email in mutt, all I do is press a shortcut (I use [ma for >> > "mail archive"), and it copies the above link to my clipboard so I can >> > paste >> > it in my email (or on trac). If anyone is using mutt, let met know if you >> > want the script. >> >> Nice hack, I'll be interested to see it. P > > Let me clean up the hack to make it a little less hackish. I've been meaning > to > clean it up so this will be a good opportunity.
In case there's anyone else using Gnus, and if I need it in the future, below is a function I just wrote to copy the message ID. If I execute the function in a message buffer it will find the message-ID and copy it into the "kill ring", so I can later e.g. "yank" it into a message I'm composing. (defun copy-message-ID (&optional arg) "Copy Message-ID field. This command must be executed in a gnus message buffer." (interactive) (save-excursion (beginning-of-buffer) (gnus-summary-toggle-header 1) (search-forward-regexp "^Message-ID: ") (let ((beg-of-ID (point))) (end-of-line) (kill-ring-save beg-of-ID (point))) (gnus-summary-toggle-header -1) ) ) /Christian PS Caveat: It's a long time since I wrote lisp so the function might not be very robust etc.