Apparently Emacs provides a function to stringify errors properly.
Use this in the search sentinel where we have to do our own error
messaging, rather than assuming the first error argument will be the
descriptive string.
;; things happen if a sentinel signals. Mimic
;; the top-level's handling of error messages.
(error
- (message "%s" (second err))
+ (message "%s" (error-message-string err))
(throw 'return nil)))
(if (and atbob
(not (string= notmuch-search-target-thread "found")))