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 DC443431FB6
\r
6 for <notmuch@notmuchmail.org>; Mon, 24 Jun 2013 12:00:43 -0700 (PDT)
\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 xpG0l+gAY5tc for <notmuch@notmuchmail.org>;
\r
17 Mon, 24 Jun 2013 12:00:37 -0700 (PDT)
\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 32A8B431FAF
\r
22 for <notmuch@notmuchmail.org>; Mon, 24 Jun 2013 12:00:37 -0700 (PDT)
\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 1UrC05-0003X9-C9; Mon, 24 Jun 2013 20:00:31 +0100
\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.71)
\r
29 (envelope-from <m.walters@qmul.ac.uk>)
\r
30 id 1UrC05-0000qb-2I; Mon, 24 Jun 2013 20:00:29 +0100
\r
31 From: Mark Walters <markwalters1009@gmail.com>
\r
32 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
\r
33 Subject: Re: [PATCH 1/3] emacs: Introduce `notmuch-call-notmuch-sexp'
\r
34 In-Reply-To: <1372030999-1262-1-git-send-email-amdragon@mit.edu>
\r
35 References: <1372030999-1262-1-git-send-email-amdragon@mit.edu>
\r
36 User-Agent: Notmuch/0.15.2+171~ge2f30a2 (http://notmuchmail.org) Emacs/23.4.1
\r
37 (x86_64-pc-linux-gnu)
\r
38 Date: Mon, 24 Jun 2013 20:00:27 +0100
\r
39 Message-ID: <87zjuftjuc.fsf@qmul.ac.uk>
\r
41 Content-Type: text/plain; charset=us-ascii
\r
42 X-Sender-Host-Address: 93.97.24.31
\r
43 X-QM-SPAM-Info: Sender has good ham record. :)
\r
44 X-QM-Body-MD5: 72b9b4d76cd066658c9a358d59c51247 (of first 20000 bytes)
\r
45 X-SpamAssassin-Score: -0.0
\r
46 X-SpamAssassin-SpamBar: /
\r
47 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
49 spam. We require at least 5.0 points to mark a message as spam.
\r
50 This message scored -0.0 points.
\r
51 Summary of the scoring:
\r
52 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
53 provider * (markwalters1009[at]gmail.com)
\r
54 * -0.0 AWL AWL: From: address is in the auto white-list
\r
55 X-QM-Scan-Virus: ClamAV says the message is clean
\r
56 X-BeenThere: notmuch@notmuchmail.org
\r
57 X-Mailman-Version: 2.1.13
\r
59 List-Id: "Use and development of the notmuch mail system."
\r
60 <notmuch.notmuchmail.org>
\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
64 List-Post: <mailto:notmuch@notmuchmail.org>
\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
68 X-List-Received-Date: Mon, 24 Jun 2013 19:00:44 -0000
\r
71 This series looks good to me +1.
\r
73 Is it worth removing all the json (3 files with (require 'json) and the
\r
74 async json parser) too?
\r
80 On Mon, 24 Jun 2013, Austin Clements <amdragon@MIT.EDU> wrote:
\r
81 > This is just like `notmuch-call-notmuch-json', but parses S-expression
\r
82 > output. Note that, also like `notmuch-call-notmuch-json', this
\r
83 > doesn't consider trailing data to be an error, which may or may not be
\r
84 > what we want in the long run.
\r
86 > emacs/notmuch-lib.el | 17 +++++++++++++++++
\r
87 > 1 file changed, 17 insertions(+)
\r
89 > diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
\r
90 > index 534f217..36eacc1 100644
\r
91 > --- a/emacs/notmuch-lib.el
\r
92 > +++ b/emacs/notmuch-lib.el
\r
93 > @@ -484,6 +484,23 @@ an error."
\r
95 > (delete-file err-file)))))
\r
97 > +(defun notmuch-call-notmuch-sexp (&rest args)
\r
98 > + "Invoke `notmuch-command' with ARGS and return the parsed S-exp output.
\r
100 > +If notmuch exits with a non-zero status, this will pop up a
\r
101 > +buffer containing notmuch's output and signal an error."
\r
103 > + (with-temp-buffer
\r
104 > + (let ((err-file (make-temp-file "nmerr")))
\r
105 > + (unwind-protect
\r
106 > + (let ((status (apply #'call-process
\r
107 > + notmuch-command nil (list t err-file) nil args)))
\r
108 > + (notmuch-check-exit-status status (cons notmuch-command args)
\r
109 > + (buffer-string) err-file)
\r
110 > + (goto-char (point-min))
\r
111 > + (read (current-buffer)))
\r
112 > + (delete-file err-file)))))
\r
114 > (defun notmuch-start-notmuch (name buffer sentinel &rest args)
\r
115 > "Start and return an asynchronous notmuch command.
\r
120 > _______________________________________________
\r
121 > notmuch mailing list
\r
122 > notmuch@notmuchmail.org
\r
123 > http://notmuchmail.org/mailman/listinfo/notmuch
\r