Quoth Dmitry Kurochkin on Nov 08 at 8:34 am: > Hi Austin. > > On Mon, 7 Nov 2011 22:55:23 -0500, Austin Clements <amdragon@MIT.EDU> wrote: > > This optimizes the user's tagging query to exclude messages that won't > > be affected by the tagging operation, saving computation and IO for > > redundant tagging operations. > > > > For example, > > notmuch tag +notmuch to:notmuch@notmuchmail.org > > will now use the query > > ( to:notmuch@notmuchmail.org ) and (not tag:"notmuch") > > > > In the past, we've often suggested that people do this exact > > transformation by hand for slow tagging operations. This makes that > > unnecessary. > > Thanks! This is a very useful optimization. > > Does it work for multiple tags and tag removal? I.e.: > > notmuch tag -inbox -unread +sent from:dmitry.kurochkin@gmail.com > > can be converted to: > > notmuch tag -inbox -unread +sent from:dmitry.kurochkin@gmail.com and (tag:inbox or tag:unread or (not tag:sent)) Yep. This is pretty much exactly what it does.