On Tue, 12 Nov 2013, Austin Clements <aclements@csail.mit.edu> wrote: > I think this is a great idea. Personally I think this is how folder: > should work. I find the semantics of folder: to be useless except where > they happen to coincide with the boolean semantics used here. > Unfortunately, changing folder: would require versioning the database, > which we have only primordial support for right now. > > Various comments below, though nothing major. Of course, we'd also need > some tests and man page updates for this. Sorry, one important thing I missed: this doesn't correctly handle when file names are removed from a message (_notmuch_message_remove_filename). Probably the simplest thing would be to follow the template for how folder: works by first removing *all* folder terms and then adding back the still-valid ones. (Unfortunately, just removing the term for the removed filename's directory won't work because the message could have other filenames in the same directory, though maybe you could just scan for that possibility?)