- (insert "End of search results.")
- (unless (= exit-status 0)
- (insert (format " (process returned %d)" exit-status)))
- (insert "\n")
+ (insert "End of search results.\n")
+ ;; For version mismatch, there's no point in
+ ;; showing the search buffer
+ (when (or (= exit-status 20) (= exit-status 21))
+ (kill-buffer))
+ (condition-case nil
+ (notmuch-check-async-exit-status proc msg)
+ ;; Suppress the error signal since strange
+ ;; things happen if a sentinel signals.
+ (error (throw 'return nil)))