This makes replying to a message in tree view, use the decrypted state
from the message pane if it is open. Previously it just used the
global decryption state from notmuch-crypto-process-mime.
In particular if notmuch-crypto-process-mime is nil, and the user
views the messages (which doesn't decrypt), toggles decryption in the
message pane, and then replies, the reply will be decrypted.
I think it makes sense to include in the reply what the user can see,
and only falling back on global defaults when needed.
However, the extra complexity for a rather extreme corner case (see
example in the commit message) may mean it's not worth doing.
emacs/notmuch-tree.el | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 8285354..e35d382 100644
@@ -209,6 +209,13 @@ open (if the message pane is closed it does nothing)."
+(defun notmuch-tree-inherit-from-message-pane (sym)
+ "Return value of SYM in message-pane if open, or tree-pane if not"
+ (if (window-live-p notmuch-tree-message-window)
+ (with-selected-window notmuch-tree-message-window
+ (symbol-value sym))
+ (symbol-value sym)))
(defun notmuch-tree-button-activate (&optional button)
"Activate BUTTON or button at point
@@ -226,8 +233,10 @@ FUNC."
,(concat "(Close message pane and) " (documentation func t))
- (call-interactively #',func)))
+ (let ((notmuch-show-process-crypto
+ (call-interactively #',func))))
(let ((map (make-sparse-keymap)))
notmuch mailing list