1 Return-Path: <amdragon@mit.edu>
\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 76A41431FD7
\r
6 for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 19:17:43 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 R8e+7fMj1cx0 for <notmuch@notmuchmail.org>;
\r
16 Sat, 15 Dec 2012 19:17:42 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id D1ACC431FBF
\r
20 for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 19:17:41 -0800 (PST)
\r
21 X-AuditID: 12074424-b7fe06d0000008f0-ca-50cd3d5545df
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 32.BE.02288.55D3DC05; Sat, 15 Dec 2012 22:17:41 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id qBG3HetP011431;
\r
27 Sat, 15 Dec 2012 22:17:40 -0500
\r
28 Received: from drake.dyndns.org
\r
29 (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com
\r
30 [209.6.116.242]) (authenticated bits=0)
\r
31 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
32 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qBG3HbGt012061
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Sat, 15 Dec 2012 22:17:39 -0500 (EST)
\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
36 (envelope-from <amdragon@mit.edu>)
\r
37 id 1Tk4jP-0007cH-SD; Sat, 15 Dec 2012 22:17:35 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH 7/7] emacs: Use --format-version for search, show, and reply
\r
41 Date: Sat, 15 Dec 2012 22:17:29 -0500
\r
42 Message-Id: <1355627849-29099-8-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.10.4
\r
44 In-Reply-To: <1355627849-29099-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1355627849-29099-1-git-send-email-amdragon@mit.edu>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFtrDIsWRmVeSWpSXmKPExsUixG6nrhtqezbAoPusqMXquTwW12/OZHZg
\r
48 8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4Mr7PuM5YMF2q4vrK+8wNjK9Fuhg5OSQETCQe
\r
49 ffjDDGGLSVy4t56ti5GLQ0hgH6PEvPl3mSCcDYwSLQvesYFUCQk8YpK4ucgbIjGXUWLDyyWM
\r
50 IAk2AQ2JbfuXg9kiAtISO+/OZgWxmQUcJT7vXwTWLCzgI7FzzXGwGhYBVYmP5/eCreYVcJCY
\r
51 t/0lK8QZihLdzyaA1XMC9W7e8hNqsYPE7CNH2SYw8i9gZFjFKJuSW6Wbm5iZU5yarFucnJiX
\r
52 l1qka66Xm1mil5pSuokRHEguKjsYmw8pHWIU4GBU4uG1+HomQIg1say4MvcQoyQHk5Iob47l
\r
53 2QAhvqT8lMqMxOKM+KLSnNTiQ4wSHMxKIrxJ84HKeVMSK6tSi/JhUtIcLErivNdTbvoLCaQn
\r
54 lqRmp6YWpBbBZGU4OJQkeJltgIYKFqWmp1akZeaUIKSZODhBhvMADVcGqeEtLkjMLc5Mh8if
\r
55 YlSUEueVAkkIgCQySvPgemGR/opRHOgVYV4NkCoeYJKA634FNJgJaPByG5Cri0sSEVJSDYxZ
\r
56 j8+w3zG2Lbnxik180iu+zaJOR1o3RB3/3Gt840ib9aYfrzdF/bpXcIk5wNye5Sx3nJH7riOW
\r
57 W6b2Ll6pvGSRnEDLW8cXhZZbev9u2D29ZYN74ZflfvsW/1V/tdgz+rHKp93ZlukbNpVs0FUU
\r
58 ebG85P+r+6mxORWfNH5N3JlRkGRdq80W1yGtxFKckWioxVxUnAgADg9pXs8CAAA=
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Sun, 16 Dec 2012 03:17:43 -0000
\r
74 emacs/notmuch-mua.el | 2 +-
\r
75 emacs/notmuch-query.el | 2 +-
\r
76 emacs/notmuch.el | 6 +++++-
\r
78 test/emacs-show | 2 +-
\r
79 5 files changed, 9 insertions(+), 5 deletions(-)
\r
81 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
\r
82 index ac2d29e..24eebff 100644
\r
83 --- a/emacs/notmuch-mua.el
\r
84 +++ b/emacs/notmuch-mua.el
\r
85 @@ -146,7 +146,7 @@ list."
\r
86 (unless (bolp) (insert "\n")))
\r
88 (defun notmuch-mua-reply (query-string &optional sender reply-all)
\r
89 - (let ((args '("reply" "--format=json"))
\r
90 + (let ((args '("reply" "--format=json" "--format-version=1"))
\r
93 (when notmuch-show-process-crypto
\r
94 diff --git a/emacs/notmuch-query.el b/emacs/notmuch-query.el
\r
95 index e7e3520..6e9f406 100644
\r
96 --- a/emacs/notmuch-query.el
\r
97 +++ b/emacs/notmuch-query.el
\r
98 @@ -29,7 +29,7 @@ A thread is a forest or list of trees. A tree is a two element
\r
99 list where the first element is a message, and the second element
\r
100 is a possibly empty forest of replies.
\r
102 - (let ((args '("show" "--format=json")))
\r
103 + (let ((args '("show" "--format=json" "--format-version=1")))
\r
104 (if notmuch-show-process-crypto
\r
105 (setq args (append args '("--decrypt"))))
\r
106 (setq args (append args search-terms))
\r
107 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
108 index b0fd387..63387a2 100644
\r
109 --- a/emacs/notmuch.el
\r
110 +++ b/emacs/notmuch.el
\r
111 @@ -650,6 +650,10 @@ of the result."
\r
112 (insert "Incomplete search results (search process was killed).\n"))
\r
113 (when (eq status 'exit)
\r
114 (insert "End of search results.\n")
\r
115 + ;; For version mismatch, there's no point in
\r
116 + ;; showing the search buffer
\r
117 + (when (or (= exit-status 20) (= exit-status 21))
\r
119 (condition-case nil
\r
120 (notmuch-check-async-exit-status proc msg)
\r
121 ;; Suppress the error signal since strange
\r
122 @@ -935,7 +939,7 @@ Other optional parameters are used as follows:
\r
123 (let ((proc (start-process
\r
124 "notmuch-search" buffer
\r
125 notmuch-command "search"
\r
127 + "--format=json" "--format-version=1"
\r
129 "--sort=oldest-first"
\r
130 "--sort=newest-first")
\r
131 diff --git a/test/emacs b/test/emacs
\r
132 index 5067d67..6b18968 100755
\r
135 @@ -873,7 +873,7 @@ This is output
\r
136 Error: Unexpected output from notmuch search:
\r
138 End of search results.
\r
139 -Error invoking notmuch. $PWD/notmuch_fail search --format=json --sort=newest-first tag:inbox exited with status 1."
\r
140 +Error invoking notmuch. $PWD/notmuch_fail search --format=json --format-version=1 --sort=newest-first tag:inbox exited with status 1."
\r
144 diff --git a/test/emacs-show b/test/emacs-show
\r
145 index 40fab61..ebf530b 100755
\r
146 --- a/test/emacs-show
\r
147 +++ b/test/emacs-show
\r
148 @@ -178,7 +178,7 @@ test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\"))
\r
149 (with-current-buffer \"*Notmuch errors*\"
\r
150 (test-output \"ERROR\")))"
\r
151 test_expect_equal "$(cat OUTPUT ERROR)" "\
\r
152 -Error invoking notmuch. $PWD/notmuch_fail show --format=json --exclude=false ' * ' exited with status 1.
\r
153 +Error invoking notmuch. $PWD/notmuch_fail show --format=json --format-version=1 --exclude=false ' * ' exited with status 1.
\r