[PATCH 0/5] Move to --with-excluded approach to excludes

Jameson Graef Rollins jrollins at finestructure.net
Sat Mar 10 17:19:33 PST 2012


On Sat,  3 Mar 2012 13:05:13 +0000, Mark Walters <markwalters1009 at gmail.com> wrote:
> This series implements the proposal in id:"87y5riuz7v.fsf at qmul.ac.uk"
> to move to a consistent --with-excluded approach rather than the
> previous --no-exclude approach. See the message there and its
> descendants for discussion.
> 
> The main user side change is that notmuch-search no longer defaults to
> showing all the excluded threads with [0/n] but will do so if the user
> says they want all the messages (i.e., by specifying --with-excluded).
> 
> However, it makes everything consistent throughout the commandline and
> lib interfaces. In all cases a "message" type search only returns the
> non-excluded matches (unless --with-excluded is specified) and a
> "thread" type search returns all messages (including excluded ones) in
> threads that match in a non-excluded message.

Hi, Mark.  Thanks so much for working on this.  This new solution seems
like a good one.  It keeps the default as expected (excluded are
actually excluded from all output), and the with-excluded option behaves
intuitively.  Looks good to me.

Unfortunately, as I discussed with you on irc today, there seems to be a
problem with the patch series that is preventing it from working as
expected.  The outputs of the following commands should agree, which
they do:

servo:~/src/notmuch/git [master] 0$ ./notmuch count --with-excluded tag:inbox
51171
servo:~/src/notmuch/git [master] 0$ ./notmuch search --output=messages --with-excluded tag:inbox | wc -l
51171
servo:~/src/notmuch/git [master] 0$ 

However, they should also agree in this case, which they don't:

servo:~/src/notmuch/git [master] 0$ ./notmuch count tag:inbox
115
servo:~/src/notmuch/git [master] 0$ ./notmuch search --output=messages tag:inbox | wc -l
51169
servo:~/src/notmuch/git [master] 0$ 

In this last case, notmuch search is outputting (some but not all(!))
excluded messages when it shouldn't be.  However, if I use a more
complicated search term, everything seems to be working fine:

servo:~/src/notmuch/git [master] 0$ ./notmuch count tag:inbox and tag:unread
0
servo:~/src/notmuch/git [master] 0$ ./notmuch search --output=messages tag:inbox and tag:unread | wc -l
0
servo:~/src/notmuch/git [master] 0$ ./notmuch count --with-excluded tag:inbox and tag:unread
47245
servo:~/src/notmuch/git [master] 0$ ./notmuch search --output=messages --with-excluded tag:inbox and tag:unread | wc -l
47245
servo:~/src/notmuch/git [master] 0$ 

It also works if I give a single "from:" search term instead of a single
"tag:" search term.  So it appears to be something about how the
excluded query is constructed.

I can't figure out where the problem is, although I'm still looking.  If
anyone else can figure it out, please let us know.

I would really like to get this series applied so that I can get back to
following master!

Thanks again for all the work.

jamie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120310/1c6a182c/attachment.pgp>


More information about the notmuch mailing list