unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Carl Worth <cworth@cworth.org>
To: Bart Trojanowski <bart@jukie.net>, notmuch@notmuchmail.org
Cc: Bart Trojanowski <bart@jukie.net>
Subject: Re: [PATCH 2/3] have _notmuch_thread_create mark which messages matched the query
Date: Fri, 27 Nov 2009 17:15:35 -0800	[thread overview]
Message-ID: <87iqcvbgaw.fsf@yoom.home.cworth.org> (raw)
In-Reply-To: <1259124875-28212-3-git-send-email-bart@jukie.net>

On Tue, 24 Nov 2009 23:54:34 -0500, Bart Trojanowski <bart@jukie.net> wrote:
> When _notmuch_thread_create() is given a query string, it can return more
> messages than just those matching the query.  To distinguish those that
> matched the query expression, the MATCHING_SEARCH flag is set
> appropriately.

This is a very useful feature, Bart. Thanks for coding it up. And it's a
nicely-implemented patch series as well.

I've pushed this out now, so anyone reading along should be able to try
it with:

./notmuch show thread:6d5e3e276461188c5778c9f219f63782 and subject:"PATCH 2/3"

I can't wait to have the emacs support for opening only matched messages
by default.

By the way, do you think that this support obviates the
--only-matching-messages option for "notmuch search" or does anyone
still want that?

Or maybe the right fix is to make "notmuch show" display only matching
messages by default, (which will likely be more friendly to a user
manually typing "notmuch show" at the command line). And then make the
user-interfaces pass an "--entire-thread" option (or so) to get the
current results.

If we're going to make the command-line user-interface usable on its
own, then I definitely want to make it be the user interfaces that have
to pass extra-long command-line options to get what they want.

One quick point on naming:

>  /* Message flags */
>  typedef enum _notmuch_message_flag {
> +    NOTMUCH_MSG_FLAG_MATCHING_SEARCH,
>  } notmuch_message_flag_t;

I like my enum values to match their type name without abbreviation. I
also like internals (like this enum value) to match the way they are
exposed in the interface, (which in this case is "match"). So I'd like
the above value to instead be:

	NOTMUCH_MESSAGE_FLAG_MATCH

-Carl

  parent reply	other threads:[~2009-11-28  1:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25  4:54 notmuch show should tell us what messages matched the search expression Bart Trojanowski
2009-11-25  4:54 ` [PATCH 1/3] message: add flags to notmuch_message_t Bart Trojanowski
2009-11-25  4:54   ` [PATCH 2/3] have _notmuch_thread_create mark which messages matched the query Bart Trojanowski
2009-11-25  4:54     ` [PATCH 3/3] notmuch-show: identify which messages printed matched the query string Bart Trojanowski
2009-11-28  1:15     ` Carl Worth [this message]
2009-11-28  2:20       ` [PATCH] correct message flag enum value so that it matches the type Bart Trojanowski
2009-11-28  2:21       ` [PATCH 2/3] have _notmuch_thread_create mark which messages matched the query Bart Trojanowski
2009-11-28  2:49         ` [PATCH 1/2] notmuch-show: limit display to only matching messages Bart Trojanowski
2009-11-28  2:49           ` [PATCH 2/2] vim: use notmuch show --entire-thread Bart Trojanowski
2009-12-03  0:19           ` [PATCH 1/2] notmuch-show: limit display to only matching messages Carl Worth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iqcvbgaw.fsf@yoom.home.cworth.org \
    --to=cworth@cworth.org \
    --cc=bart@jukie.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).