unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Tagging strategy and latest notmuch
@ 2011-12-28 22:46 Xavier Maillard
  2011-12-29  1:26 ` Austin Clements
  0 siblings, 1 reply; 3+ messages in thread
From: Xavier Maillard @ 2011-12-28 22:46 UTC (permalink / raw)
  To: notmuch

Hi,

my mail workflow is pretty /basic/ and /raw/. Here it is:

1a. notmuch new (for consistency sake)
1b. notmuchsync syncs from notmuch tags to my maildir flags (actually, it is to
prune is:delete tagged messages)
2. offlineimap syncs with my imap server
3. notmuch new incorporate new messages into the database
4. notmuchsync syncs from my maildirs flags to notmuch
5. (at last) a shell-script is testing/tagging all my messages corpus

This is a solution I am using for months but I am pretty sure it is not
adapted with latest notmuch. Sadly I could not follow the recent feature
additions (and reading through NEWS file or the wiki is not really
helping).

So what I am looking for is a "modern" solution to replace my current
strategy not really /scalable/ -i.e incorporating new mails is really
getting slower each day- and most importantly I really need to reduce
time taken to tag new material. Currently, my tagging script processes
all my notmuch database even if only new mails are really tagged, it has
to test each message to sort out what messages need tags; tagging only
new mail would be really awesome.

By the way, I am using 0.10.x.

Thank you

/Xavier

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Tagging strategy and latest notmuch
  2011-12-28 22:46 Tagging strategy and latest notmuch Xavier Maillard
@ 2011-12-29  1:26 ` Austin Clements
  2011-12-29  1:29   ` Austin Clements
  0 siblings, 1 reply; 3+ messages in thread
From: Austin Clements @ 2011-12-29  1:26 UTC (permalink / raw)
  To: Xavier Maillard; +Cc: notmuch

Quoth Xavier Maillard on Dec 28 at 11:46 pm:
> Hi,
> 
> my mail workflow is pretty /basic/ and /raw/. Here it is:
> 
> 1a. notmuch new (for consistency sake)
> 1b. notmuchsync syncs from notmuch tags to my maildir flags (actually, it is to
> prune is:delete tagged messages)

The synchronization of notmuch tags and maildir flags has been part of
notmuch for several releases now, so you don't need an external tool
to do that (unless you have some unusual configuration for it).  You
can delete is:delete messages reasonably easily from a script (perhaps
a tagging script or a cron job) using something like

  notmuch search --output=files is:delete | xargs rm

(untested, so don't take my word for it.)

> 2. offlineimap syncs with my imap server
> 3. notmuch new incorporate new messages into the database
> 4. notmuchsync syncs from my maildirs flags to notmuch
> 5. (at last) a shell-script is testing/tagging all my messages corpus

As of 0.11 (not 0.10.x, though), the right place to do initial tagging
is in the .notmuch/hooks/post-new script (there's obviously no harm in
doing it in a separate script, but if you do it in post-new, notmuch
will run the script for you).

> 
> This is a solution I am using for months but I am pretty sure it is not
> adapted with latest notmuch. Sadly I could not follow the recent feature
> additions (and reading through NEWS file or the wiki is not really
> helping).
> 
> So what I am looking for is a "modern" solution to replace my current
> strategy not really /scalable/ -i.e incorporating new mails is really
> getting slower each day- and most importantly I really need to reduce
> time taken to tag new material. Currently, my tagging script processes
> all my notmuch database even if only new mails are really tagged, it has
> to test each message to sort out what messages need tags; tagging only
> new mail would be really awesome.

Nothing has changed on this front to my knowledge, but a common
technique is to have notmuch tag all new mail with a "new" tag (using
the "tags" setting under the [new] configuration section), to use
tag:new in tagging operations that should only apply to newly
incorporated mail, and then to remove tag:new from everything at the
end of your tagging script.

One thing that may help a bit is that, as of 0.10, notmuch tag has
been optimized so, for example "notmuch tag -new '*'" is efficient.

> By the way, I am using 0.10.x.
> 
> Thank you
> 
> /Xavier

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Tagging strategy and latest notmuch
  2011-12-29  1:26 ` Austin Clements
@ 2011-12-29  1:29   ` Austin Clements
  0 siblings, 0 replies; 3+ messages in thread
From: Austin Clements @ 2011-12-29  1:29 UTC (permalink / raw)
  To: Xavier Maillard; +Cc: notmuch

Quoth myself on Dec 28 at  8:26 pm:
> One thing that may help a bit is that, as of 0.10, notmuch tag has
> been optimized so, for example "notmuch tag -new '*'" is efficient.

Oops, this is also slated for 0.11.  It wasn't in 0.10.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-29  1:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-28 22:46 Tagging strategy and latest notmuch Xavier Maillard
2011-12-29  1:26 ` Austin Clements
2011-12-29  1:29   ` Austin Clements

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).