Re: Folder+tags

Subject: Re: Folder+tags

Date: Sun, 27 Dec 2020 23:09:17 +0200

To: inwit, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


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

> On Sun Dec 27, 2020 at 2:12 PM CET, Tomi Ollila wrote:
>> On Sun, Dec 27 2020, inwit@sindominio.net wrote:
>>
>> 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).
> Apparently (I'm a total noob wrt elisp), the hook should know what was
> tagged and how it was tagged. In its documentation it reads:
> «'tag-changes' will contain the tags that were added or removed as a
> list of strings of the form "+TAG" or "-TAG". 'query' will be a string
> containing the search query that determines the messages that were
> tagged."

nos that you said it, query is a variable the hook can access to know what
was tgged. filnames it doesn't contain. with the query you can find  the
filenames with 'notmuch search --output=files query

(writing on mobiledvice  in a moving train, therefore terse)

Tomi

>
>>
>> Whateveruuuuuuch way, tags are assigned to Message-Id:, so you'd need to find
>> the filename.
> Having the 'query' mentioned above should be enough to find the
> filename, shouldn't it?
>
>> 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).
> I'm not sure if I get what you're trying to say: is rename-file not
> enough? 
>
> In any case, if there's really a way to pass 'tag-changes' and 'query'
> to such a hook, I could use that hook to move the file with either 'mv'
> with 'shell-command' or directly with rename-file, am I wrong?
>
> In any case, I first need to actually learn elisp. This seems as the
> right reason to finally get into it.
>
> Thanks for your help.
>
> Salud,
>
>>
>> >
>> > Salud,
>>
>> Tomi
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: