[notmuch] Rather simple optimization for notmuch tag

Mark Anderson MarkR.Anderson at amd.com
Thu Dec 17 23:49:00 PST 2009

I was updating my poll script that tags messages, and a common idiom is
to put
 tag +mytag <search_terms> and not tag:mytag

I don't know anything about efficiency, but for the simple single-tag
case, couldn't we imply the "and not tag:mytag" from the +mytag action
list for the tag command?

The similar (dual?, rusty math terminology, beware of Math-tetanus) case
of "tag -mytag <search-terms> and tag:mytag" could be similarly optimized,
since the tag removal action ought to be a null action in the case that
the search terms matched on a thread or message, but the tag to be
removed isn't attached to the message/thread returned.

Any thoughts on the subject?


More information about the notmuch mailing list