Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 46 / eaa23e4915be3b688a3316f9b8a9059500e8a0
1 Return-Path: <sojkam1@fel.cvut.cz>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 910B6431FAF\r
6         for <notmuch@notmuchmail.org>; Tue,  1 May 2012 14:11:16 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id u3TSrokyN3Zt for <notmuch@notmuchmail.org>;\r
16         Tue,  1 May 2012 14:11:15 -0700 (PDT)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18         by olra.theworths.org (Postfix) with ESMTP id AB3EC431FAE\r
19         for <notmuch@notmuchmail.org>; Tue,  1 May 2012 14:11:15 -0700 (PDT)\r
20 Received: from localhost (unknown [192.168.200.4])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id 2C20F19F3338;\r
22         Tue,  1 May 2012 23:11:14 +0200 (CEST)\r
23 X-Virus-Scanned: IMAP AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id aMHYdXNk1lfT; Tue,  1 May 2012 23:11:12 +0200 (CEST)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29         by max.feld.cvut.cz (Postfix) with ESMTP id C08F419F32DF;\r
30         Tue,  1 May 2012 23:11:12 +0200 (CEST)\r
31 Received: from steelpick.2x.cz (cable-95-168-136-35.cust.telecolumbus.net\r
32         [95.168.136.35]) (Authenticated sender: sojkam1)\r
33         by imap.feld.cvut.cz (Postfix) with ESMTPSA id B2670660968;\r
34         Tue,  1 May 2012 23:11:08 +0200 (CEST)\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.77)\r
36         (envelope-from <sojkam1@fel.cvut.cz>)\r
37         id 1SPKLj-00066f-GN; Tue, 01 May 2012 23:11:07 +0200\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
39 To: notmuch@notmuchmail.org\r
40 Subject: [PATCH] emacs: Do not pass stderr of notmuch reply to JSON parser\r
41 Date: Tue,  1 May 2012 23:10:47 +0200\r
42 Message-Id: <1335906647-23422-1-git-send-email-sojkam1@fel.cvut.cz>\r
43 X-Mailer: git-send-email 1.7.10\r
44 In-Reply-To:\r
45  <CAMoJFUsnxbRz3yPZSVA0w8C2-Qt8fXx3X6i3RZ+QvZGv2EtiFQ@mail.gmail.com>\r
46 References:\r
47  <CAMoJFUsnxbRz3yPZSVA0w8C2-Qt8fXx3X6i3RZ+QvZGv2EtiFQ@mail.gmail.com>\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Tue, 01 May 2012 21:11:16 -0000\r
61 \r
62 Sometimes, notmuch reply outputs something to stderr, for example:\r
63 "Failed to verify signed part: Cannot verify multipart/signed part:\r
64 unsupported signature protocol". When this happens, replying in emacs\r
65 fails, because emacs cannot parse the error message as JSON.\r
66 \r
67 This patch causes emacs to ignore stderr when reading reply from\r
68 notmuch.\r
69 ---\r
70  emacs/notmuch-mua.el |    2 +-\r
71  1 file changed, 1 insertion(+), 1 deletion(-)\r
72 \r
73 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
74 index 87bd88d..49db603 100644\r
75 --- a/emacs/notmuch-mua.el\r
76 +++ b/emacs/notmuch-mua.el\r
77 @@ -113,7 +113,7 @@ list."\r
78  \r
79      ;; Get the reply object as JSON, and parse it into an elisp object.\r
80      (with-temp-buffer\r
81 -      (apply 'call-process (append (list notmuch-command nil (list t t) nil) args))\r
82 +      (apply 'call-process (append (list notmuch-command nil (list t nil) nil) args))\r
83        (goto-char (point-min))\r
84        (let ((json-object-type 'plist)\r
85             (json-array-type 'list)\r
86 -- \r
87 1.7.10\r
88 \r