summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-01-24 23:53:16 -0500
committerKyle Meyer <kyle@kyleam.com>2017-01-24 23:53:16 -0500
commit6ee5760ad42d795d8d451632ae18d1666a6042e2 (patch)
tree3ad653ab8bfd5386a5a4fe02517e9ebcf1fedcf9
parentcb92104ef16bc293365c021131123788b8c54c50 (diff)
downloademacs.d-6ee5760ad42d795d8d451632ae18d1666a6042e2.tar.gz
Add gnus-copy-message-id-as-kill command
-rw-r--r--init.el2
-rw-r--r--lisp/km-mail.el7
2 files changed, 9 insertions, 0 deletions
diff --git a/init.el b/init.el
index 0220171..d99159c 100644
--- a/init.el
+++ b/init.el
@@ -2113,9 +2113,11 @@
("o" . km/ace-link-widget)))
(bind-keys :map km/gnus-summary-prefix-map
+ ("i" . km/gnus-copy-message-id-as-kill)
("l" . km/gnus-copy-gmane-link-as-kill)
("p" . km/gnus-open-github-patch))
(bind-keys :map km/gnus-article-prefix-map
+ ("i" . km/gnus-copy-message-id-as-kill)
("l" . km/gnus-copy-gmane-link-as-kill)
("p" . km/gnus-open-github-patch)))
diff --git a/lisp/km-mail.el b/lisp/km-mail.el
index b3c5585..45cdc3b 100644
--- a/lisp/km-mail.el
+++ b/lisp/km-mail.el
@@ -95,6 +95,13 @@ argument FOLLOW, follow link instead of copying it."
(lambda (s) (kill-new (message s))))
it)))))
+;;;###autoload
+(defun km/gnus-copy-message-id-as-kill ()
+ (interactive)
+ (with-current-buffer gnus-original-article-buffer
+ (--when-let (message-field-value "Message-ID")
+ (kill-new (message "%s" it)))))
+
(defun km/gnus-open-github-patch ()
"Open patch from github email.
A new buffer with the patch contents is opened in another window."