I have a pipeline that opens an emacs client in
notmuch-mode when new mail comes in, currently using
I'd rather use tree view with the most recent message displayed. In two steps this is easy.
- then manually run
I'd like for it to be automatic, but I cannot seem to combine the functions. I imagine
notmuch-thread-view-in-tree runs before
notmuch-thread-view has filled the buffer. So I think a hook is necessary. But how?
(defun notmuch-thread-view () (interactive) (notmuch-tree "thread:0000000000000384") ;(notmuch-thread-view-in-tree) ; doesn't work ) (defun notmuch-thread-view-in-tree () "Open the most recent message in a thread when in tree view. will not work for nested threads." (interactive) (goto-char (point-max)) (notmuch-tree-prev-message) (notmuch-tree-prev-message) (notmuch-tree-show-message-in) ) ; not run? (add-hook 'notmuch-thread-view 'notmuch-thread-view-in-tree) ; also not helpful (add-hook 'post-notmuch-thread-view 'notmuch-thread-view-in-tree)