[PATCH v1 1/2] emacs: Stash the currently shown forest in a buffer local variable

David Edmondson dme at dme.org
Thu Aug 29 10:24:40 PDT 2019


---
 emacs/notmuch-show.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index e13ca3d7..1e3834f2 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1165,8 +1165,12 @@ is t, hide the part initially and show the button."
   "Insert the thread THREAD at depth DEPTH in the current forest."
   (mapc (lambda (tree) (notmuch-show-insert-tree tree depth)) thread))
 
+(defvar notmuch-show--forest nil)
+(make-variable-buffer-local 'notmuch-show--forest)
+
 (defun notmuch-show-insert-forest (forest)
   "Insert the forest of threads FOREST."
+  (setq notmuch-show--forest forest)
   (mapc (lambda (thread) (notmuch-show-insert-thread thread 0)) forest))
 
 (defvar notmuch-id-regexp
-- 
2.22.0



More information about the notmuch mailing list