aboutsummaryrefslogtreecommitdiff
path: root/emacs/notmuch.el
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@finestructure.net>2011-05-25 18:01:19 -0700
committerCarl Worth <cworth@cworth.org>2011-05-27 16:22:00 -0700
commit45fe3547458e0c403f7501bad89860afe2fa534a (patch)
tree0862259ff3ba05f0ea28ce984d47ec32b33895de /emacs/notmuch.el
parent2e653db38fc38dee92b2ee0564e27921132e7232 (diff)
emacs: Add support for PGP/MIME verification/decryption
A new emacs configuration variable "notmuch-crypto-process-mime" controls the processing of PGP/MIME signatures and encrypted parts. When this is set true, notmuch-query will use the notmuch show --decrypt flag to decrypt encrypted messages and/or calculate the sigstatus of signed messages. If sigstatus is available, notmuch-show will place a specially color-coded header at the begining of the signed message. Also included is the ability to switch decryption/verification on/off on the fly, which is bound to M-RET in notmuch-search-mode.
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r--emacs/notmuch.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index c22add7..3311fe8 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -218,6 +218,7 @@ For a mouse binding, return nil."
(define-key map "-" 'notmuch-search-remove-tag)
(define-key map "+" 'notmuch-search-add-tag)
(define-key map (kbd "RET") 'notmuch-search-show-thread)
+ (define-key map (kbd "M-RET") 'notmuch-search-show-thread-crypto-switch)
map)
"Keymap for \"notmuch search\" buffers.")
(fset 'notmuch-search-mode-map notmuch-search-mode-map)
@@ -417,7 +418,11 @@ Complete list of currently available key bindings:
"Return a list of authors for the current region"
(notmuch-search-properties-in-region 'notmuch-search-subject beg end))
-(defun notmuch-search-show-thread ()
+(defun notmuch-search-show-thread-crypto-switch ()
+ (interactive)
+ (notmuch-search-show-thread t))
+
+(defun notmuch-search-show-thread (&optional crypto-switch)
"Display the currently selected thread."
(interactive)
(let ((thread-id (notmuch-search-find-thread-id))
@@ -433,7 +438,8 @@ Complete list of currently available key bindings:
(concat "*"
(truncate-string-to-width subject 32 nil nil t)
"*")
- 32 nil nil t)))
+ 32 nil nil t))
+ crypto-switch)
(error "End of search results"))))
(defun notmuch-search-reply-to-thread (&optional prompt-for-sender)