1 Return-Path: <m.walters@qmul.ac.uk>
\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 87719431FC0
\r
6 for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 01:30:29 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5
\r
12 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,
\r
13 NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id NkjGX9Lz0rpM for <notmuch@notmuchmail.org>;
\r
17 Sat, 15 Dec 2012 01:30:29 -0800 (PST)
\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id E6FEC431FBF
\r
22 for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 01:30:28 -0800 (PST)
\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])
\r
24 by mail2.qmul.ac.uk with esmtp (Exim 4.71)
\r
25 (envelope-from <m.walters@qmul.ac.uk>)
\r
26 id 1Tjo4g-0006U4-69; Sat, 15 Dec 2012 09:30:26 +0000
\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)
\r
28 by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)
\r
29 (envelope-from <m.walters@qmul.ac.uk>)
\r
30 id 1Tjo4f-0006Z2-Sb; Sat, 15 Dec 2012 09:30:26 +0000
\r
31 From: Mark Walters <markwalters1009@gmail.com>
\r
32 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
\r
33 Subject: Re: [PATCH 2/7] emacs: Use unified error handling in
\r
34 notmuch-call-notmuch-process
\r
35 In-Reply-To: <1355548513-10085-3-git-send-email-amdragon@mit.edu>
\r
36 References: <1355548513-10085-1-git-send-email-amdragon@mit.edu>
\r
37 <1355548513-10085-3-git-send-email-amdragon@mit.edu>
\r
38 User-Agent: Notmuch/0.14+155~g7edfdc3 (http://notmuchmail.org) Emacs/23.4.1
\r
39 (x86_64-pc-linux-gnu)
\r
40 Date: Sat, 15 Dec 2012 09:30:27 +0000
\r
41 Message-ID: <876243hdcc.fsf@qmul.ac.uk>
\r
43 Content-Type: text/plain; charset=us-ascii
\r
44 X-Sender-Host-Address: 93.97.24.31
\r
45 X-QM-SPAM-Info: Sender has good ham record. :)
\r
46 X-QM-Body-MD5: 0459e278710fff784166be989ed900f3 (of first 20000 bytes)
\r
47 X-SpamAssassin-Score: -1.8
\r
48 X-SpamAssassin-SpamBar: -
\r
49 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
51 spam. We require at least 5.0 points to mark a message as spam.
\r
52 This message scored -1.8 points.
\r
53 Summary of the scoring:
\r
54 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,
\r
56 * [138.37.6.40 listed in list.dnswl.org]
\r
57 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
58 provider * (markwalters1009[at]gmail.com)
\r
59 * 0.5 AWL AWL: From: address is in the auto white-list
\r
60 X-QM-Scan-Virus: ClamAV says the message is clean
\r
61 X-BeenThere: notmuch@notmuchmail.org
\r
62 X-Mailman-Version: 2.1.13
\r
64 List-Id: "Use and development of the notmuch mail system."
\r
65 <notmuch.notmuchmail.org>
\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
69 List-Post: <mailto:notmuch@notmuchmail.org>
\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
73 X-List-Received-Date: Sat, 15 Dec 2012 09:30:29 -0000
\r
75 On Sat, 15 Dec 2012, Austin Clements <amdragon@MIT.EDU> wrote:
\r
76 > This makes notmuch-call-notmuch-process use the unified CLI error
\r
77 > handling, which basically refines the error handling this function
\r
80 > emacs/notmuch.el | 15 ++++-----------
\r
81 > 1 file changed, 4 insertions(+), 11 deletions(-)
\r
83 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
84 > index f9454d8..e25b54e 100644
\r
85 > --- a/emacs/notmuch.el
\r
86 > +++ b/emacs/notmuch.el
\r
87 > @@ -538,17 +538,10 @@ If BARE is set then do not prefix with \"thread:\""
\r
89 > Output from the process will be presented to the user as an error
\r
90 > and will also appear in a buffer named \"*Notmuch errors*\"."
\r
92 This comment looks like it is not true (but wasn't true before
\r
93 either). I think output will only be presented to the user if notmuch
\r
94 exits with a non-zero status?
\r
96 > - (let ((error-buffer (get-buffer-create "*Notmuch errors*")))
\r
97 > - (with-current-buffer error-buffer
\r
99 > - (if (eq (apply 'call-process notmuch-command nil error-buffer nil args) 0)
\r
102 > - (with-current-buffer error-buffer
\r
103 > - (let ((beg (point-min))
\r
104 > - (end (- (point-max) 1)))
\r
105 > - (error (buffer-substring beg end))
\r
107 > + (with-temp-buffer
\r
108 > + (let ((status (apply #'call-process notmuch-command nil t nil args)))
\r
109 > + (notmuch-check-exit-status status (cons notmuch-command args)
\r
110 > + (buffer-string)))))
\r
113 Would it be worth separating stderr and stdout here? (Quite plausibly it
\r
121 > (defun notmuch-search-set-tags (tags &optional pos)
\r
122 > (let ((new-result (plist-put (notmuch-search-get-result pos) :tags tags)))
\r