X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch.el;h=c98a4febbf69f9dcc100aa8e2b3449d77a9ed89d;hp=b0fd387ec0107b92c1b9642ad8e5268ec64d22f5;hb=401dbebd4803477563eff03d719605ed37a8e44d;hpb=19e5b2d912b52145403c3f11b0c30c84d7f2b409 diff --git a/emacs/notmuch.el b/emacs/notmuch.el index b0fd387e..c98a4feb 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -650,11 +650,18 @@ of the result." (insert "Incomplete search results (search process was killed).\n")) (when (eq status 'exit) (insert "End of search results.\n") - (condition-case nil + ;; For version mismatch, there's no point in + ;; showing the search buffer + (when (or (= exit-status 20) (= exit-status 21)) + (kill-buffer)) + (condition-case err (notmuch-check-async-exit-status proc msg) ;; Suppress the error signal since strange - ;; things happen if a sentinel signals. - (error (throw 'return nil))) + ;; things happen if a sentinel signals. Mimic + ;; the top-level's handling of error messages. + (error + (message "%s" (second err)) + (throw 'return nil))) (if (and atbob (not (string= notmuch-search-target-thread "found"))) (set 'never-found-target-thread t))))) @@ -935,7 +942,7 @@ Other optional parameters are used as follows: (let ((proc (start-process "notmuch-search" buffer notmuch-command "search" - "--format=json" + "--format=json" "--format-version=1" (if oldest-first "--sort=oldest-first" "--sort=newest-first")