[notmuch] [PATCH] notmuch-config: make new message tags configurable

Carl Worth cworth at cworth.org
Fri Apr 23 10:40:50 PDT 2010


On Fri, 12 Mar 2010 17:13:26 -0500, Ben Gamari <bgamari.foss at gmail.com> wrote:
> Add a new_tags option in the [messages] section of the configuration
> file to allow the user to specify which tags should be added to new
> messages by notmuch new.

Thanks, Ben!

I finally broke down and decided I needed this feature.

Previously I've done all of my automatic tagging as global searches,
(and it's those tags that I want to switch to just search macros as I've
talked about many times in the past).

But I'm now doing things like a "merge window" tag where I want it
applied to new messages as they come in, but I also want to be able to
manually remove the tag from messages where it doesn't make sense. So a
global search doesn't do what I want here at all.

For me, I'll probably go the route of having "notmuch new" add a "new"
tag in addition to "inbox" and "unread" and then I'll have my
notmuch-poll script act on that, then remove the "new" tag from all
tagged messages. I wouldn't want to impose a "new" tag on everyone since
most people won't have a notmuch-poll removing "new" by default so that
tag would just build up.

Meanwhile, I know that Keith Packard and Eric Anholt are already having
their notmuch-poll scripts remove the "unread" tag from all message,
since they don't find that tag useful at all. This new configuration
will help them as well.

So I've now merged this patch, and as usual, I followed up with some
changes as well. Here's what I did in addition:

  * Fixed the compiler warning.

  * Fixed "notmuch setup" to add the documentation block to the
    configuration file when adding new options there.

  * Renamed the new configuration option from:

	[messages]
	new_tags=inbox;unread;

    to instead be:

	[new]
	tags=inbox;unread;

  * Fixed "notmuch setup" to prompt for this new setting.

Thanks again,

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100423/0aee934a/attachment.pgp>


More information about the notmuch mailing list