On Mon, 12 Dec 2011 21:59:09 +0100, emmanuel.leblond at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20111220/000261cc/attachment.pgp>

Reply via email to