synchronizing tag for cur/new location of mail

Jani Nikula jani at nikula.org
Tue Mar 12 03:24:44 PDT 2013


On Tue, 12 Mar 2013, Daniel <quite at hack.org> wrote:
> Is there currently no automatic tag that reflects whether a mail was
> found in folder/cur or folder/new? The "unread" tag properly reflects
> the maildir ",S" flag, but the one named "new" doesn't seem to be
> automatic in any way, right?

That's correct, there's no such automatic tag.

The "new" tag is in no way special to notmuch. It's just a typically
used temp tag, usually added by 'notmuch new' based on the user's
new.tags config, and removed by the user's post-new hook.

> I mostly use notmuch as a search backend to mutt, and it certainly is
> very useful. Though since I started feeding rss to maildir, I would like
> the idea of presenting somewhere in my system a list of new and "unseen"
> mails (in the mutt sense, kind of, which you might be familiar with).

>From notmuch perspective the difference between "new" and "cur" is just
that the message files in "new" have no maildir flags set, and once
maildir flags are set, they are moved to "cur". No additional semantics
is applied to the file location.

> Presently this seems impossible.

A search for folder:new might be helpful, depending on your setup.

It seems that you may get surprising results if you have more than one
file with the same message-id, and some of those files are in "new" and
some in "cur". (Any code to support automatic "new" tag would have to
handle this too.)


HTH,
Jani.


More information about the notmuch mailing list