From 47fb061451b2edfac379bbcb8e79ce423bfca33c Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 1 May 2012 23:10:47 +0200 Subject: [PATCH] [PATCH] emacs: Do not pass stderr of notmuch reply to JSON parser --- 46/eaa23e4915be3b688a3316f9b8a9059500e8a0 | 88 +++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 46/eaa23e4915be3b688a3316f9b8a9059500e8a0 diff --git a/46/eaa23e4915be3b688a3316f9b8a9059500e8a0 b/46/eaa23e4915be3b688a3316f9b8a9059500e8a0 new file mode 100644 index 000000000..a741614ce --- /dev/null +++ b/46/eaa23e4915be3b688a3316f9b8a9059500e8a0 @@ -0,0 +1,88 @@ +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 910B6431FAF + for ; Tue, 1 May 2012 14:11:16 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] 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 u3TSrokyN3Zt for ; + Tue, 1 May 2012 14:11:15 -0700 (PDT) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by olra.theworths.org (Postfix) with ESMTP id AB3EC431FAE + for ; Tue, 1 May 2012 14:11:15 -0700 (PDT) +Received: from localhost (unknown [192.168.200.4]) + by max.feld.cvut.cz (Postfix) with ESMTP id 2C20F19F3338; + Tue, 1 May 2012 23:11:14 +0200 (CEST) +X-Virus-Scanned: IMAP AMAVIS +Received: from max.feld.cvut.cz ([192.168.200.1]) + by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, + port 10044) + with ESMTP id aMHYdXNk1lfT; Tue, 1 May 2012 23:11:12 +0200 (CEST) +Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) + by max.feld.cvut.cz (Postfix) with ESMTP id C08F419F32DF; + Tue, 1 May 2012 23:11:12 +0200 (CEST) +Received: from steelpick.2x.cz (cable-95-168-136-35.cust.telecolumbus.net + [95.168.136.35]) (Authenticated sender: sojkam1) + by imap.feld.cvut.cz (Postfix) with ESMTPSA id B2670660968; + Tue, 1 May 2012 23:11:08 +0200 (CEST) +Received: from wsh by steelpick.2x.cz with local (Exim 4.77) + (envelope-from ) + id 1SPKLj-00066f-GN; Tue, 01 May 2012 23:11:07 +0200 +From: Michal Sojka +To: notmuch@notmuchmail.org +Subject: [PATCH] emacs: Do not pass stderr of notmuch reply to JSON parser +Date: Tue, 1 May 2012 23:10:47 +0200 +Message-Id: <1335906647-23422-1-git-send-email-sojkam1@fel.cvut.cz> +X-Mailer: git-send-email 1.7.10 +In-Reply-To: + +References: + +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: Tue, 01 May 2012 21:11:16 -0000 + +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 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el +index 87bd88d..49db603 100644 +--- a/emacs/notmuch-mua.el ++++ b/emacs/notmuch-mua.el +@@ -113,7 +113,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) +-- +1.7.10 + -- 2.26.2