summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Walters <markwalters1009@gmail.com>2015-06-09 10:51:07 +0100
committerDavid Bremner <david@tethera.net>2015-06-23 22:17:53 +0200
commit5e375688418bd35c5b2de71fb69035332ba5aeab (patch)
treef58aec0f46ebe6d496ef698215bb6d3415b2711b
parent0291ec71b6e0a5f1b3f335b4a3277a1dcdecd295 (diff)
emacs: tree: mark read change
The mark read code for tree mode did not get updated in the recent changes. This updates it to match. Since the user can customize the mark read logic we just call the show logic in the message pane.
-rw-r--r--emacs/notmuch-tree.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 8b6cd510..182235e7 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -413,6 +413,13 @@ Does NOT change the database."
(ignore-errors
(delete-window notmuch-tree-message-window)))))
+(defun notmuch-tree-command-hook ()
+ (when (eq major-mode 'notmuch-tree-mode)
+ ;; We just run the notmuch-show-command-hook on the message pane.
+ (when (buffer-live-p notmuch-tree-message-buffer)
+ (with-current-buffer notmuch-tree-message-buffer
+ (notmuch-show-command-hook)))))
+
(defun notmuch-tree-show-message-in ()
"Show the current message (in split-pane)."
(interactive)
@@ -855,6 +862,7 @@ This is is a helper function for notmuch-tree. The arguments are
the same as for the function notmuch-tree."
(interactive)
(notmuch-tree-mode)
+ (add-hook 'post-command-hook #'notmuch-tree-command-hook t t)
(setq notmuch-tree-basic-query basic-query)
(setq notmuch-tree-query-context query-context)
(setq notmuch-tree-target-msg target)