unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jameson Rollins <jrollins@finestructure.net>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH] emacs: send notmuch-query stderr to /dev/null
Date: Wed, 26 Jan 2011 12:57:50 -0800	[thread overview]
Message-ID: <878vy7tjog.fsf@servo.finestructure.net> (raw)

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)
---
 emacs/notmuch-query.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-query.el b/emacs/notmuch-query.el
index 26f9544..921f624 100644
--- a/emacs/notmuch-query.el
+++ b/emacs/notmuch-query.el
@@ -35,7 +35,7 @@ is a possibly empty forest of replies.
 	 (json-false 'nil))
     (with-temp-buffer
       (progn
-	(apply 'call-process (append (list notmuch-command nil t nil) args))
+	(apply 'call-process (append (list notmuch-command nil (list t nil) nil) args))
 	(goto-char (point-min))
 	(json-read)))))
 
-- 
1.7.2.3

             reply	other threads:[~2011-01-26 21:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 20:57 Jameson Rollins [this message]
2011-01-27  4:49 ` [PATCH] emacs: send notmuch-query stderr to /dev/null Carl Worth
2011-01-27 11:29   ` Michal Sojka
2011-01-28  0:04   ` Jameson Rollins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878vy7tjog.fsf@servo.finestructure.net \
    --to=jrollins@finestructure.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).