X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-tree.el;h=55212626307704a5743ef94f93f0750add7a07c7;hp=8398eb109f67c4e7d6482187d54dffe6b3b7d52b;hb=37d1fa5672133a4deb0efa631a21eeeb50a7c1a1;hpb=f8bdba37d3f4c877e05e17b5b1c7d2d512106538 diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 8398eb10..55212626 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -293,6 +293,7 @@ FUNC." (define-key map "*" 'notmuch-tree-tag-thread) (define-key map " " 'notmuch-tree-scroll-or-next) (define-key map (kbd "DEL") 'notmuch-tree-scroll-message-window-back) + (define-key map "e" 'notmuch-tree-resume-message) map)) (fset 'notmuch-tree-mode-map notmuch-tree-mode-map) @@ -405,6 +406,15 @@ NOT change the database." (list (notmuch-read-tag-changes (notmuch-tree-get-tags) "Tag message" "-"))) (notmuch-tree-tag tag-changes)) +(defun notmuch-tree-resume-message () + "Resume EDITING the current draft message." + (interactive) + (notmuch-tree-close-message-window) + (let ((id (notmuch-tree-get-message-id))) + (if id + (notmuch-draft-resume id) + (message "No message to resume!")))) + ;; The next two functions close the message window before calling ;; notmuch-search or notmuch-tree but they do so after the user has ;; entered the query (in case the user was basing the query on @@ -822,7 +832,7 @@ passed to it by notmuch-tree-process-filter." (mapc 'notmuch-tree-insert-forest-thread forest)) (define-derived-mode notmuch-tree-mode fundamental-mode "notmuch-tree" - "Major mode displaying messages (as opposed to threads) of of a notmuch search. + "Major mode displaying messages (as opposed to threads) of a notmuch search. This buffer contains the results of a \"notmuch tree\" of your email archives. Each line in the buffer represents a single @@ -907,7 +917,7 @@ the same as for the function notmuch-tree." (notmuch-tag-clear-cache) (let ((proc (notmuch-start-notmuch "notmuch-tree" (current-buffer) #'notmuch-tree-process-sentinel - "show" "--body=false" "--format=sexp" + "show" "--body=false" "--format=sexp" "--format-version=3" message-arg search-args)) ;; Use a scratch buffer to accumulate partial output. ;; This buffer will be killed by the sentinel, which