Re: [PATCH v2 2/4] nmbug-status: Add meta.message-url config setting
[notmuch-archives.git] / 63 / faf42bb2e49d2198d86acdd35ae17bb28c41f1
1 Return-Path: <markwalters1009@gmail.com>\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 24FF0431FCB\r
6         for <notmuch@notmuchmail.org>; Sat,  8 Dec 2012 06:11:38 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id XeEkKIeLvs+F for <notmuch@notmuchmail.org>;\r
18         Sat,  8 Dec 2012 06:11:37 -0800 (PST)\r
19 Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com\r
20  [74.125.82.47])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  8394A431FBF    for <notmuch@notmuchmail.org>; Sat,  8 Dec 2012 06:11:37 -0800\r
23  (PST)\r
24 Received: by mail-wg0-f47.google.com with SMTP id dq11so724139wgb.2\r
25         for <notmuch@notmuchmail.org>; Sat, 08 Dec 2012 06:11:36 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer;\r
28         bh=yf1LX5+eSN2+UPY3KYQbezY3LVH8axFrIujfRu0SKWo=;\r
29         b=J1YL+qJohGI6qCHoodAGVRWOxgxfMDv29i6URJIxehWlVstJe1Z4FGicRdKQJfsDhG\r
30         uZozXhkkb4UP9z7U87kHIQWAjj+Wum2fY+JzeSlLPV/CncNuJ6Bk3N7RZTTNf/0jVDM+\r
31         gu+oaEcyV1LJc4jAZaL0RBn6y2UhDpRDozvVuKLdclZO8/AK3urlni6hZry+l+/2PIYr\r
32         a/THDe6V7zg6Td2eSoQUahoxvcvSF6Dob2pumwKTWiHv3Q2T3rt7xZgdAurhbn590WIF\r
33         fxAiISlvdhfDL8iGcWd77WqVALP2DZpq666OS1Ptao2Q0agX7oRPmPV3FK9sQw+8So+b\r
34         TunA==\r
35 Received: by 10.180.72.232 with SMTP id g8mr3249555wiv.0.1354975896317;\r
36         Sat, 08 Dec 2012 06:11:36 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPS id i6sm2315480wix.5.2012.12.08.06.11.34\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Sat, 08 Dec 2012 06:11:35 -0800 (PST)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH] emacs: query: make sync queries use sexp\r
44 Date: Sat,  8 Dec 2012 14:11:31 +0000\r
45 Message-Id: <1354975891-24663-1-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Sat, 08 Dec 2012 14:11:38 -0000\r
60 \r
61 This changes the queries used by notmuch-show from json to sexp (patch\r
62 based on a comment by Tomi on irc as to the trivial change needed).\r
63 \r
64 The async query parsed used by search is not as easy to convert.\r
65 ---\r
66 \r
67 It's probably worth making this change: sexps are significantly faster\r
68 but I doubt anyone would notice in show (since the query is small and\r
69 the wash processing etc relatively large).\r
70 \r
71 At the moment this doesn't do any error fixing. The json version did\r
72 not either but the sexp parser and the json parser might behave\r
73 differently on malformed input.\r
74 \r
75 Best wishes\r
76 \r
77 Mark\r
78 \r
79 \r
80  emacs/notmuch-query.el |    7 ++-----\r
81  1 files changed, 2 insertions(+), 5 deletions(-)\r
82 \r
83 diff --git a/emacs/notmuch-query.el b/emacs/notmuch-query.el\r
84 index d66baea..0ee6cca 100644\r
85 --- a/emacs/notmuch-query.el\r
86 +++ b/emacs/notmuch-query.el\r
87 @@ -29,10 +29,7 @@ A thread is a forest or list of trees. A tree is a two element\r
88  list where the first element is a message, and the second element\r
89  is a possibly empty forest of replies.\r
90  "\r
91 -  (let  ((args '("show" "--format=json"))\r
92 -        (json-object-type 'plist)\r
93 -        (json-array-type 'list)\r
94 -        (json-false 'nil))\r
95 +  (let  ((args '("show" "--format=sexp")))\r
96      (if notmuch-show-process-crypto\r
97         (setq args (append args '("--decrypt"))))\r
98      (setq args (append args search-terms))\r
99 @@ -40,7 +37,7 @@ is a possibly empty forest of replies.\r
100        (progn\r
101         (apply 'call-process (append (list notmuch-command nil (list t nil) nil) args))\r
102         (goto-char (point-min))\r
103 -       (json-read)))))\r
104 +       (sexp-at-point)))))\r
105  \r
106  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
107  ;; Mapping functions across collections of messages.\r
108 -- \r
109 1.7.9.1\r
110 \r