[notmuch] Rather simple optimization for notmuch tag

Subject: [notmuch] Rather simple optimization for notmuch tag

Date: Fri, 18 Dec 2009 00:49:00 -0700

To: cworth@cworth.org, notmuch@notmuchmail.org

Cc:

From: Mark Anderson


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?

-Mark


Thread: