Re: [PATCH 1/2] configure: add a fallback check for zlib
[notmuch-archives.git] / 28 / fc62ea72d40a381f077be1e2af7ca3de24e9b4
1 Return-Path: <tomi.ollila@iki.fi>\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 1BDFB431FAF\r
6         for <notmuch@notmuchmail.org>; Tue,  7 Aug 2012 23:01:03 -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: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 Y9hjm8OcUOjE for <notmuch@notmuchmail.org>;\r
16         Tue,  7 Aug 2012 23:01:01 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id A83AF431FAE\r
19         for <notmuch@notmuchmail.org>; Tue,  7 Aug 2012 23:01:01 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 4A5951002A4; Wed,  8 Aug 2012 09:01:10 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: Mark Walters <markwalters1009@gmail.com>,\r
24         Austin Clements <amdragon@MIT.EDU>\r
25 Subject: Re: [PATCH v2] emacs: notmuch search bugfix\r
26 In-Reply-To: <877gta1x4d.fsf@qmul.ac.uk>\r
27 References: <87boinpqfg.fsf@qmul.ac.uk> <20120806234732.GM22601@mit.edu>\r
28         <87pq72bthc.fsf@qmul.ac.uk> <20120807160352.GA2811@mit.edu>\r
29         <877gta1x4d.fsf@qmul.ac.uk>\r
30 User-Agent: Notmuch/0.13.2+128~g07453d8 (http://notmuchmail.org) Emacs/23.1.1\r
31         (x86_64-redhat-linux-gnu)\r
32 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
33         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
34         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
35 Date: Wed, 08 Aug 2012 09:01:10 +0300\r
36 Message-ID: <m2ipct9b2x.fsf@guru.guru-group.fi>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain; charset=us-ascii\r
39 Cc: notmuch@notmuchmail.org\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Wed, 08 Aug 2012 06:01:03 -0000\r
53 \r
54 On Tue, Aug 07 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
55 \r
56 > The recent change to use json for notmuch-search.el introduced a bug\r
57 > in the code for keeping position on refresh. The problem is a\r
58 > comparison between (plist-get result :thread) and a thread-id returned\r
59 > by notmuch-search-find-thread-id: the latter is prefixed with\r
60 > "thread:"\r
61 >\r
62 > We fix this by adding an option to notmuch-search-find-thread-id to\r
63 > return the bare thread-id. It appears that notmuch-search-refresh-view\r
64 > is the only caller of notmuch-search that supplies a thread-id so this\r
65 > change should be safe (but could theoretically break users .emacs\r
66 > functions).\r
67 > ---\r
68 \r
69 LGTM.\r
70 \r
71 Tomi\r
72 \r
73 >\r
74 > I think this implements all of Austin's suggestions, and it adds a short\r
75 > remark to NEWS (since in unlikely cases it could break users' functions)\r
76 > and updates the docstring for notmuch-search. \r
77 >\r
78 > Best wishes\r
79 >\r
80 > Mark\r
81 >\r
82 >  NEWS             |    3 +++\r
83 >  emacs/notmuch.el |   12 +++++++-----\r
84 >  2 files changed, 10 insertions(+), 5 deletions(-)\r
85 >\r
86 > diff --git a/NEWS b/NEWS\r
87 > index 761b2c1..9916c91 100644\r
88 > --- a/NEWS\r
89 > +++ b/NEWS\r
90 > @@ -55,6 +55,9 @@ user-specified formatting\r
91 >    you've customized this variable, you may have to change your date\r
92 >    format from `"%s "` to `"%12s "`.\r
93 >  \r
94 > +The thread-id for the `target-thread` argument for `notmuch-search` should\r
95 > +now be supplied without the "thread:" prefix.\r
96 > +\r
97 >  Notmuch 0.13.2 (2012-06-02)\r
98 >  ===========================\r
99 >  \r
100 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
101 > index d2d82a9..7b61e9b 100644\r
102 > --- a/emacs/notmuch.el\r
103 > +++ b/emacs/notmuch.el\r
104 > @@ -475,10 +475,12 @@ BEG."\r
105 >       (push (plist-get (notmuch-search-get-result pos) property) output)))\r
106 >      output))\r
107 >  \r
108 > -(defun notmuch-search-find-thread-id ()\r
109 > -  "Return the thread for the current thread"\r
110 > +(defun notmuch-search-find-thread-id (&optional bare)\r
111 > +  "Return the thread for the current thread\r
112 > +\r
113 > +If BARE is set then do not prefix with \"thread:\""\r
114 >    (let ((thread (plist-get (notmuch-search-get-result) :thread)))\r
115 > -    (when thread (concat "thread:" thread))))\r
116 > +    (when thread (concat (unless bare "thread:") thread))))\r
117 >  \r
118 >  (defun notmuch-search-find-thread-id-region (beg end)\r
119 >    "Return a list of threads for the current region"\r
120 > @@ -936,7 +938,7 @@ If `query' is nil, it is read interactively from the minibuffer.\r
121 >  Other optional parameters are used as follows:\r
122 >  \r
123 >    oldest-first: A Boolean controlling the sort order of returned threads\r
124 > -  target-thread: A thread ID (with the thread: prefix) that will be made\r
125 > +  target-thread: A thread ID (without the thread: prefix) that will be made\r
126 >                   current if it appears in the search results.\r
127 >    target-line: The line number to move to if the target thread does not\r
128 >                 appear in the search results."\r
129 > @@ -993,7 +995,7 @@ same relative position within the new buffer."\r
130 >    (interactive)\r
131 >    (let ((target-line (line-number-at-pos))\r
132 >       (oldest-first notmuch-search-oldest-first)\r
133 > -     (target-thread (notmuch-search-find-thread-id))\r
134 > +     (target-thread (notmuch-search-find-thread-id 'bare))\r
135 >       (query notmuch-search-query-string)\r
136 >       (continuation notmuch-search-continuation))\r
137 >      (notmuch-kill-this-buffer)\r
138 > -- \r
139 > 1.7.9.1\r
140 >\r
141 > _______________________________________________\r
142 > notmuch mailing list\r
143 > notmuch@notmuchmail.org\r
144 > http://notmuchmail.org/mailman/listinfo/notmuch\r