(auto-)tagging sent messages

Austin Clements amdragon at mit.edu
Mon Apr 18 13:26:27 PDT 2011


On Sun, Apr 17, 2011 at 2:23 PM, Jameson Graef Rollins
<jrollins at finestructure.net> wrote:
> By giving "notmuch new" a path to a message in the store:
>
>  notmuch new /path/to/message
>
> By feeding "notmuch new" a message on stdin, and then having it write
> the message to a specified location:
>
>  notmuch new /path/to/maildir <message
>
> You could then add the ability to add tags at the time of index:
>
>  notmuch new +foo +bar /path/to/message

I think passing specific messages or directories to notmuch new would
enable some nice features; beyond immediate indexing any tagging of
sent mail, it could be combined with inotify to immediately index any
new mail (something I've been meaning to play with but haven't yet).

However, concurrency and atomicity have to be considered carefully
with any proposal like this.  For example,
  notmuch new +foo +bar /path/to/message
has concurrency hazards: the caller has to store the message before
invoking notmuch new, but if the machine crashes between these two
operations, the message will be indexed with default tags on the next
notmuch new.  Similarly, a chance unrelated invocation of notmuch new
immediately after the message is stored would result in the new
message being indexed with default tags.


More information about the notmuch mailing list