[notmuch] search-tags and tag completion in notmuch.el

Jan Janak jan at ryngle.com
Sun Nov 22 16:56:04 PST 2009


Hello,

The three patches I sent to the list a couple of minutes ago is another
revision of the patches that I had sent earlier. The first two patches
implement support for 'notmuch search-tags'. The last patch adds support
for tag completion to notmuch.el using the new command.

Right now 'notmuch search-tags' can only list all tags from the
database, it does not support search-terms yet (i.e. it cannot list tags
for a restricted set of messages or threads), but I am working on that
feature and I'm gonna send another patch implementing that soon. I think
sending more smaller incremental patches makes it easier to review them
(and for me personally it is easier to keep them up-to-date on top of
moving Carl's git repository).

I considered implementing 'notmuch search --output=tags' (as we
discussed in another email), but it turned out that:

  * Having 'notmuch search-tags' would be consistent with Carl's
    'notmuch search-messages'.

  * 'notmuch search' supports other command line options (--first,
    --max-threads, --sort) and these would only work when the user uses
    the command to search for messages. They would probably be useless
    if we use the command to search for tags and messages (well, at
    least some of them). Which means we would have to let the user know
    in the documentation, or disable some of them based on the value of
    the --output command line parameter, etc etc...

  * 'notmuch search-tags' is easier on fingers than 
    'notmuch search --output=tags' :-).

In any case, we should probably keep it consistent with other commands
and because Carl submitted 'notmuch search-messages", I did the same for
tags.

I'd personally prefer to use different commands for different kinds of
output rather than overloading 'notmuch search' with more command line
options, but it's just a personal preference. I can change the patch
again if we decide that we're going to overload 'notmuch search' rather
than add more commands.

Comments, ideas, and suggestions are welcome!

  -- Jan


More information about the notmuch mailing list