]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Proper error string handling in search sentinel
authorAustin Clements <amdragon@MIT.EDU>
Fri, 17 May 2013 20:14:28 +0000 (16:14 -0400)
committerDavid Bremner <bremner@debian.org>
Sat, 18 May 2013 10:50:11 +0000 (07:50 -0300)
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.

emacs/notmuch.el

index e58c51df0c843890bf60d805dd0028ba4fae56d8..4c1a6cacd4da5bdf47a13919cedaef2538457b30 100644 (file)
@@ -660,7 +660,7 @@ of the result."
                      ;; 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")))