From ce490b85535712fb0431b47fbd4b3846e331156b Mon Sep 17 00:00:00 2001
From: Kyle Meyer <kyle@kyleam.com>
Date: Fri, 20 Feb 2015 23:53:41 -0500
Subject: Add command notmuch-show-copy-message-id-as-kill

---
 lisp/init-gnus.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

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)
-- 
cgit v1.2.3