Re: Question : Tag mail according to it directory path ?

Subject: Re: Question : Tag mail according to it directory path ?

Date: Tue, 20 Dec 2011 14:14:40 -0800

To: emmanuel.leblond@gmail.com, notmuch@notmuchmail.org

Cc:

From: Jameson Graef Rollins


On Mon, 12 Dec 2011 21:59:09 +0100, emmanuel.leblond@gmail.com wrote:
> 
> I have a 4000+ mail collection already sorted in folders. The point is I would 
> like to tag those mails through the notmuch database according to those 
> folders. (i.g. the mails in the friend/foo directory will be tagged as friend 
> and foo)

Hi, Emanuel.  There is already the ability to search for messages by
path with the "folder:" search prefix.  From "notmuch help search-terms":

	The folder: prefix can be used to search for email message
	files that are contained within particular directories within
	the mail store. Only the directory components below the top-level
	mail database path are available to be searched.

You can then easily apply arbitrary tags with something like:

notmuch tag +foo -- folder:foo

hth.

jamie.
part-000.sig (application/pgp-signature)

Thread: