unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: Proper error string handling in search sentinel
@ 2013-05-17 20:14 Austin Clements
  2013-05-18 10:57 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: Austin Clements @ 2013-05-17 20:14 UTC (permalink / raw)
  To: notmuch

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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index e58c51d..4c1a6ca 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -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")))
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] emacs: Proper error string handling in search sentinel
  2013-05-17 20:14 [PATCH] emacs: Proper error string handling in search sentinel Austin Clements
@ 2013-05-18 10:57 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2013-05-18 10:57 UTC (permalink / raw)
  To: Austin Clements, notmuch

Austin Clements <amdragon@MIT.EDU> writes:

> 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.

Pushed.

Mark, this should fix the problem with applying the asynch parser
series you noticed.

d

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-18 10:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-17 20:14 [PATCH] emacs: Proper error string handling in search sentinel Austin Clements
2013-05-18 10:57 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).