Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0A3B7431FB6 for ; Wed, 26 Jan 2011 13:54:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AI6pdle7B8kV for ; Wed, 26 Jan 2011 13:54:42 -0800 (PST) Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7]) by olra.theworths.org (Postfix) with ESMTP id 1FB6F431FB5 for ; Wed, 26 Jan 2011 13:54:42 -0800 (PST) Received: from servo.finestructure.net (c-24-19-44-201.hsd1.wa.comcast.net [24.19.44.201]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by tarap.cc.columbia.edu (8.14.4/8.14.3) with ESMTP id p0QLsd74005156 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 26 Jan 2011 16:54:41 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.72) (envelope-from ) id 1PiDK3-0005eu-Do for notmuch@notmuchmail.org; Wed, 26 Jan 2011 13:54:39 -0800 From: Jameson Rollins To: Notmuch Mail Subject: [PATCH] emacs: send notmuch-query stderr to /dev/null Date: Wed, 26 Jan 2011 12:57:50 -0800 Message-ID: <878vy7tjog.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.68 on 128.59.29.7 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2011 21:54:43 -0000 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