[PATCH] emacs: send notmuch-query stderr to /dev/null

Jameson Rollins jrollins at finestructure.net
Thu Jan 27 16:04:51 PST 2011


On Thu, 27 Jan 2011 14:49:43 +1000, Carl Worth <cworth at cworth.org> wrote:
> On Wed, 26 Jan 2011 12:57:50 -0800, Jameson Rollins <jrollins at finestructure.net> wrote:
> > The call-process to notmuch in notmuch-query.el was previously sending
> > stderr into the output buffer.  This means that if there is any stderr
> > the JSON parsing breaks.  Unfortunately call-process does not support
> > sending stderr to a separate buffer or to the minibuffer [0], but it
> > does support sending it to /dev/null.  So we do that here instead.
> > 
> > [0] a bug was filed against emacs (#7842)
> 
> Thanks! I had wondered what those json errors were about. I've committed
> this.
> 
> I am a bit concerned about throwing the error output away, of course,
> (so we'll wait for that fix to emacs---thanks for submitting a bug
> report). Do you have a sense of what kinds of output we are getting on
> stderr?

So the only stderr output I've ever seen seen is in the
signature-verification branch (which I now run).  Emails with S/MIME
signatures are currently not handled (because of GMIME limitations, I
think) and notmuch throws the following error when trying to process
them:

servo:~ 0$ notmuch show --format=json --verify id:"4D25D062.1000103 at sixdemonbag.org" >/dev/null
Failed to verify signed part: no error explanation given
servo:~ 0$ 

Obviously the emacs call-process function should be capturing and
displaying those error messages.  Hopefully we can eventually get that
fixed.  In the mean time it's probably better to throw out the messages
rather than have them break the JSON output.

jamie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110127/eb9e93ae/attachment.pgp>


More information about the notmuch mailing list