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 8D63B40BC75
\r
6 for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 15:58:50 -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 Zdnmr4VNQOAQ for <notmuch@notmuchmail.org>;
\r
16 Fri, 24 Feb 2012 15:58:49 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 7679240A630
\r
20 for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 15:58:49 -0800 (PST)
\r
21 X-AuditID: 12074423-b7f9c6d0000008c3-aa-4f482438a1b6
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id E9.3C.02243.934284F4; Fri, 24 Feb 2012 18:58:49 -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 q1ONwmTC007615;
\r
27 Fri, 24 Feb 2012 18:58:48 -0500
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1ONwlrJ028047
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Fri, 24 Feb 2012 18:58:48 -0500 (EST)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1S152F-0000kB-IM; Fri, 24 Feb 2012 18:58:47 -0500
\r
37 Date: Fri, 24 Feb 2012 18:58:47 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Mark Walters <markwalters1009@gmail.com>
\r
40 Subject: Re: [RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag
\r
41 Message-ID: <20120224235847.GJ30513@mit.edu>
\r
42 References: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>
\r
44 Content-Type: text/plain; charset=us-ascii
\r
45 Content-Disposition: inline
\r
46 In-Reply-To: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>
\r
47 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
48 X-Brightmail-Tracker:
\r
49 H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT17VU8fA3uP2fyWL1XB6L6zdnMjsw
\r
50 eeycdZfd49mqW8wBTFFcNimpOZllqUX6dglcGeuXP2YqaFCv2LNjHVMD41HZLkZODgkBE4mH
\r
51 x64xQthiEhfurWfrYuTiEBLYxyhxbtptFghnA6PE6iNnoZyTTBJnZk1lhHCWMEoseb+ZHaSf
\r
52 RUBV4u7Pf0wgNpuAhsS2/cvB5ooI6EjcPrQArIZZQFri2+9msBphAQ+JJQ8ngsV5gWrW//nC
\r
53 BmILAcUndLayQsQFJU7OfMIC0aslcePfS6BeDrA5y/9xgIQ5BTwlGt8+AisXFVCRmHJyG9sE
\r
54 RqFZSLpnIemehdC9gJF5FaNsSm6Vbm5iZk5xarJucXJiXl5qka6ZXm5miV5qSukmRnBYuyjv
\r
55 YPxzUOkQowAHoxIPL9MWd38h1sSy4srcQ4ySHExKorwvFD38hfiS8lMqMxKLM+KLSnNSiw8x
\r
56 SnAwK4nw2rEB5XhTEiurUovyYVLSHCxK4rwaWu/8hATSE0tSs1NTC1KLYLIyHBxKErzXlYEa
\r
57 BYtS01Mr0jJzShDSTBycIMN5gIZvBKnhLS5IzC3OTIfIn2JUlBLn3QeSEABJZJTmwfXC0s4r
\r
58 RnGgV4R5d4JU8QBTFlz3K6DBTECD7f+6ggwuSURISTUwyn5NeLUnzTJoXVGScHvDRalFEz7V
\r
59 Vcjfn3Dw8lzxWYm3c3i9Tsz1Z5yvbnG7pejqMxXtOu4T4tENV2qX2F6xlfrnru905nDg8gwR
\r
60 9eh7hWcMHkz/skV+/fKmQF2GRcFW//831d++kbL3PMv+c2c+Vf+4sevbzZ3ajySPGD+prwrK
\r
61 Urk89WfiDSWW4oxEQy3mouJEAB+/bwwWAwAA
\r
62 Cc: notmuch@notmuchmail.org
\r
63 X-BeenThere: notmuch@notmuchmail.org
\r
64 X-Mailman-Version: 2.1.13
\r
66 List-Id: "Use and development of the notmuch mail system."
\r
67 <notmuch.notmuchmail.org>
\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
71 List-Post: <mailto:notmuch@notmuchmail.org>
\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
74 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
75 X-List-Received-Date: Fri, 24 Feb 2012 23:58:50 -0000
\r
77 Quoth Mark Walters on Feb 15 at 9:03 am:
\r
78 > This is v5 of the exclude flag series. (v4 was at
\r
79 > id:"874nv9rv79.fsf@qmul.ac.uk")
\r
81 > This email has 4 sections, an overview of what the patch set is
\r
82 > trying to achieve, a summary of the changes from v4, some comments on
\r
83 > the status of the patches in the series and some remaining queries.
\r
87 > The current implementation of exclude-tags does not use excludes in
\r
88 > notmuch-show.c (and thus not in notmuch-show.el). Thus when selecting
\r
89 > a thread in the search view claiming one matched message you may get
\r
90 > several matches in show all but one of which are tagged excluded.
\r
92 > The trivial change of adding excludes to show does not work as easily
\r
93 > as one would like. For example if you try notmuch-show
\r
94 > id:<deleted message> you get no results (see
\r
95 > id:"871uqvgrnm.fsf@qmul.ac.uk" for more discussion).
\r
97 > This set moves in a different direction. It returns all the results
\r
98 > but marks excluded messages with a new flag
\r
99 > (NOTMUCH_MESSAGE_FLAG_EXCLUDED) and lets the consumer decide what to
\r
100 > do with them. For example it could start with the message closed in
\r
101 > emacs show view, it could colour the headerline differently etc.
\r
104 > This has been rebased on top of Jani's notmuch-show command line
\r
107 > The function notmuch_thread_get_flag_messages function added in v4
\r
108 > has been removed. Unfortunately (as Austin pointed out) that patch
\r
109 > broke binary compatibility so should be deferred until we wish to
\r
110 > bump the library version.
\r
112 > I also fixed a minor bug and a style comment in the emacs part of
\r
116 > The first 3 patches in the series just add a --no-exclude option
\r
117 > to notmuch-search.c and notmuch-count.c to "turn off" the excluding.
\r
118 > (The 3 patches are one for the C code, one for the man pages and
\r
119 > one for the tests.) I think this change is desirable independently
\r
120 > of the rest of the series (and indeed Jameson had a use for it
\r
121 > id:"878vk943ci.fsf@servo.finestructure.net").
\r
125 > 1) As with v4 the api notmuch_query_set_omit_excluded_messages
\r
126 > remains: without it I can't see how a user can pass a
\r
127 > notmuch_messages_t object around which does not contain the
\r
128 > excluded messages. See id:"87fweusabh.fsf@qmul.ac.uk".
\r
130 This does seem like a useful simplification. Another possibility
\r
131 (which may not work in practice) would be to have a utility function
\r
132 in the CLI that iterated a notmuch_messages_t to the next non-excluded
\r
133 message. This would push the knowledge of whether or not a format can
\r
134 represent excluded messages into that format, but I can't see how to
\r
135 do things like "count" this way.
\r
137 > 2) If we have a query which overrides the excludes such as "blah and
\r
138 > tag:deleted" should the tag:deleted messages still be marked excluded?
\r
139 > The current implementation does mark them excluded but my preference
\r
140 > would be not to. What do people think? At the moment 2 tests fail but
\r
141 > the correct output depends on the above so I will leave them until we
\r
142 > have a decision on this.
\r
144 I could go either way on this, but I think it should still be marked
\r
145 excluded since it is, after all, excluded.
\r
147 > There are some other queries mentioned in v4 but the two above are
\r
148 > the significant ones.
\r
156 > Mark Walters (11):
\r
157 > cli: add --no-exclude option to count and search.
\r
158 > cli: Add --no-exclude to the man pages for search and count
\r
159 > test: add tests for new cli --no-exclude option
\r
160 > lib: Rearrange the exclude code in query.cc
\r
161 > lib: Make notmuch_query_search_messages set the exclude flag
\r
162 > lib: Add the exclude flag to notmuch_query_search_threads
\r
163 > cli: Make notmuch-show respect excludes.
\r
164 > man: update manpage for notmuch-show --no-exclude option
\r
165 > test: update tests to reflect the exclude flag
\r
166 > cli: omit excluded messages in results where appropriate.
\r
167 > emacs: show: recognize the exclude flag.
\r
169 > emacs/notmuch-show.el | 19 +++++++++++-
\r
170 > lib/notmuch-private.h | 8 ++++-
\r
171 > lib/notmuch.h | 16 ++++++++--
\r
172 > lib/query.cc | 74 ++++++++++++++++++++++++++++++++++++++------
\r
173 > lib/thread.cc | 18 +++++++++--
\r
174 > man/man1/notmuch-count.1 | 7 ++++
\r
175 > man/man1/notmuch-search.1 | 7 ++++
\r
176 > man/man1/notmuch-show.1 | 7 ++++
\r
177 > notmuch-count.c | 19 ++++++++----
\r
178 > notmuch-search.c | 26 ++++++++++++----
\r
179 > notmuch-show.c | 31 ++++++++++++++++--
\r
180 > test/count | 21 +++++++++++++
\r
181 > test/crypto | 9 +++++-
\r
182 > test/encoding | 2 +-
\r
183 > test/json | 6 ++--
\r
184 > test/maildir-sync | 1 +
\r
185 > test/multipart | 4 +-
\r
186 > test/search | 5 +++
\r
187 > test/thread-naming | 16 +++++-----
\r
188 > 19 files changed, 246 insertions(+), 50 deletions(-)
\r