[PATCH] notmuch new --new-tags=tags...

Carl Worth cworth at cworth.org
Fri Apr 23 10:49:29 PDT 2010


On Mon, 12 Apr 2010 07:59:14 -0400, Jameson Rollins <jrollins at finestructure.net> wrote:
> On Mon, 12 Apr 2010 10:00:37 +0200, "Sebastian Spaeth" <Sebastian at SSpaeth.de> wrote:
> > On 2010-04-10, Anthony Towns wrote:
> > > The attached patch makes "notmuch new --new-tags=unread,new" set the
> > > "unread" and "new" tags on any new mail it finds rather than "unread"
> > > and "inbox". Or whatever other tags you happen to specify.

Thanks very much for the patch, AJ. It's definitely a useful feature.

> > Thanks for the patch. I can't comment on the code quality, but rather
> > than having to specify the set of new tags on the command line every
> > time, I think it would make more sense to put them in the notmuch config
> > file as this patch does:
> > id:1268432006-24333-2-git-send-email-bgamari.foss at gmail.com

I ended up taking that version instead, (using a configuration setting
for this instead of a command-line option to "notmuch new".

One could imagine accepting the command-line option as well, but I don't
think that would actually be useful. Let me know if you disagree.

> I was thinking about this, and it seems to me that we really need is a
> way to just specify which tags should be applied to new messages based
> on search terms.

Yes, I agree.

Many of us are (or will soon be) achieving the feature based on the
following recipe:

  * Configuring new.tags to add a "new" tag.

  * Writing a notmuch-poll script that does the following:

      * Performs "notmuch tag" searches to add tags to "new" messages.

      * Clears the "new" tag from all messages.

  * Configuring notmuch-poll-script inside emacs to invoke our
    notmuch-poll script.

If we added support for configuring search-based tagging directly into
notmuch, then the above recipe could be reduced to a single block of
configuration settings, which sounds much nicer.

So I'll look forward to any implementation to provide that. In the
meantime, we can muddle along with the functionality we want, (but a
little more manual effort to achieve it).

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100423/02786018/attachment.pgp>


More information about the notmuch mailing list