summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-02-20 23:53:41 -0500
committerKyle Meyer <kyle@kyleam.com>2015-02-28 00:29:48 -0500
commitce490b85535712fb0431b47fbd4b3846e331156b (patch)
treefaf05f52655988e090abea9f1a61c583ebfd2f1a
parent89b1a7e0aaa7f9d1be4cadc2f366f13b07f29b65 (diff)
downloademacs.d-ce490b85535712fb0431b47fbd4b3846e331156b.tar.gz
Add command notmuch-show-copy-message-id-as-kill
-rw-r--r--lisp/init-gnus.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el
index cce82b8..79e50ba 100644
--- a/lisp/init-gnus.el
+++ b/lisp/init-gnus.el
@@ -348,9 +348,19 @@ has an effect if Gnus is not currently open."
(message-id (org-remove-angle-brackets (mail-header-id header))))
(notmuch-show (concat "id:" message-id)))))
+(defun km/notmuch-show-copy-message-id-as-kill ()
+ (interactive)
+ (kill-new (message "%s" (notmuch-show-get-message-id))))
+
(define-key notmuch-show-mode-map (kbd "C-c C-c") 'km/notmuch-goto-message-in-gnus)
(define-key gnus-group-mode-map "GG" 'notmuch-search)
(define-key km/mail-map "n" 'notmuch-search)
+(define-prefix-command 'km/notmuch-show-prefix-map)
+(define-key notmuch-show-mode-map (kbd "C-c m") 'km/notmuch-show-prefix-map)
+
+(define-key km/notmuch-show-prefix-map "i"
+ 'km/notmuch-show-copy-message-id-as-kill)
+
(provide 'init-gnus)