summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-02-25 23:32:07 -0500
committerKyle Meyer <kyle@kyleam.com>2017-02-25 23:32:07 -0500
commitf4c304c8543c6805fbd0569e8d710d7b32e91a23 (patch)
treeff8b596839c5e13d974beb65c38700dc5cce27a9
parente47d51b571c449c48c622939cfca6a7566e47937 (diff)
downloademacs.d-f4c304c8543c6805fbd0569e8d710d7b32e91a23.tar.gz
Add notmuch-show-open-github-patch command
-rw-r--r--init.el2
-rw-r--r--lisp/km-mail.el6
2 files changed, 8 insertions, 0 deletions
diff --git a/init.el b/init.el
index 8ab5f7c..b8942f4 100644
--- a/init.el
+++ b/init.el
@@ -2019,6 +2019,8 @@
'(:name "today" :query "date:today.." :key "."))
(define-key notmuch-show-mode-map (kbd "C-c m") 'km/notmuch-show-prefix-map)
+ (define-key km/notmuch-show-prefix-map "p"
+ #'km/notmuch-show-open-github-patch)
(define-key km/notmuch-show-prefix-map "i"
#'km/notmuch-show-copy-message-id-as-kill))
diff --git a/lisp/km-mail.el b/lisp/km-mail.el
index 7bc462f..c23ff26 100644
--- a/lisp/km-mail.el
+++ b/lisp/km-mail.el
@@ -124,6 +124,12 @@ argument FOLLOW, follow link instead of copying it."
(km/gnus-summary-set-current-article)
(km/open-github-patch gnus-original-article-buffer))
+(defun km/notmuch-show-open-github-patch ()
+ "Open patch from GitHub email."
+ (interactive)
+ (with-current-notmuch-show-message
+ (km/mail-open-github-patch (current-buffer))))
+
(defun km/gnus-summary-catchup (&optional no-next)
"Mark all articles as read.
Don't ask for confirmation. With prefix argument NO-NEXT, exit