]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Do not pass stderr of notmuch reply to JSON parser
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 1 May 2012 21:10:47 +0000 (23:10 +0200)
committerDavid Bremner <bremner@debian.org>
Sun, 6 May 2012 11:49:38 +0000 (08:49 -0300)
Sometimes, notmuch reply outputs something to stderr, for example:
"Failed to verify signed part: Cannot verify multipart/signed part:
unsupported signature protocol". When this happens, replying in emacs
fails, because emacs cannot parse the error message as JSON.

This patch causes emacs to ignore stderr when reading reply from
notmuch.

emacs/notmuch-mua.el

index cb89db3a47e2ca9705560a01c936bf397a1c7672..408b49e075068c574f900a756d76551c87ee7eb5 100644 (file)
@@ -159,7 +159,7 @@ list."
 
     ;; Get the reply object as JSON, and parse it into an elisp object.
     (with-temp-buffer
-      (apply 'call-process (append (list notmuch-command nil (list t t) nil) args))
+      (apply 'call-process (append (list notmuch-command nil (list t nil) nil) args))
       (goto-char (point-min))
       (let ((json-object-type 'plist)
            (json-array-type 'list)