Re: Folder+tags

Subject: Re: Folder+tags

Date: Sun, 27 Dec 2020 15:12:26 +0200

To: inwit, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Sun, Dec 27 2020, inwit@sindominio.net wrote:

> Ok, I've been thinking more about tag-folder synchronisation and reading
> everything I could. However, I need some guidance.
>
> I think that maybe the cleanest way to go is to have an after-tag-hook
> which, if the recently added tag corresponds with a folder (as produced
> by afew's FolderNameFilter, for example), then moves the file of the
> message to its corresponding folder. Does that make sense?
>
> Another alternative is to write a new 'tag-n-move' function which would
> do both things, calling 'mv' through 'shell-command'. What do you think? 

There sure is notmuch-after-tag-hook (in emacs MUA), but -hooks don't take
argument(s) so how does it know what was tagged (cannot remember if there 
are let-bound (dynamically bound!) variables that could have such
information).

whatever way, tags are assigned to Message-Id:, so you'd need to find
the filename. With shell-command you can do notmuch | xargs pipeline
(plain 'mv' w/ 'shell-command' would have been easily replaced w/ 
'rename-file' if that were enough). 

>
> Salud,

Tomi
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: