unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: inwit <inwit@sindominio.net>, notmuch@notmuchmail.org
Subject: Re: Folder+tags
Date: Sun, 27 Dec 2020 15:12:26 +0200	[thread overview]
Message-ID: <m2czyvwfyd.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <C83JU538N6QS.10XXLYKD8HRCN@bisio>

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

  reply	other threads:[~2020-12-27 13:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23 11:53 Folder+tags inwit
2020-12-24 13:59 ` Folder+tags Alan Schmitt
2020-12-25 16:41   ` Folder+tags inwit
2020-12-25  8:04 ` Folder+tags Jaume Devesa
2020-12-25 17:27   ` Folder+tags inwit
2020-12-27 11:59 ` Folder+tags inwit
2020-12-27 13:12   ` Tomi Ollila [this message]
2020-12-27 17:14     ` Folder+tags inwit
2020-12-27 21:09       ` Folder+tags Tomi Ollila
2020-12-28 16:51         ` Folder+tags inwit
2021-01-03 18:09         ` Folder+tags inwit
2021-01-03 20:01           ` Folder+tags Tomi Ollila

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2czyvwfyd.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=inwit@sindominio.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).