X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-tree.el;h=c00315e8dd40edaadfc369a95b2545fce49affbf;hb=c09aad479464965f5296438eeb3afba0ec64d13b;hp=55212626307704a5743ef94f93f0750add7a07c7;hpb=37d1fa5672133a4deb0efa631a21eeeb50a7c1a1;p=notmuch diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 55212626..c00315e8 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -598,6 +598,8 @@ message will be \"unarchived\", i.e. the tag changes in (defun notmuch-tree-refresh-view () "Refresh view." (interactive) + (when (get-buffer-process (current-buffer)) + (error "notmuch tree process already running for current buffer")) (let ((inhibit-read-only t) (basic-query notmuch-tree-basic-query) (query-context notmuch-tree-query-context) @@ -897,7 +899,9 @@ the same as for the function notmuch-tree." (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-query-context (if (or (string= query-context "") + (string= query-context "*")) + nil query-context)) (setq notmuch-tree-target-msg target) (setq notmuch-tree-open-target open-target) ;; Set the default value for `notmuch-show-process-crypto' in this @@ -917,7 +921,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" "--format-version=3" + "show" "--body=false" "--format=sexp" "--format-version=4" message-arg search-args)) ;; Use a scratch buffer to accumulate partial output. ;; This buffer will be killed by the sentinel, which