Re: [PATCH 6/8] cli: add support for batch tagging operations to "notmuch tag"

Subject: Re: [PATCH 6/8] cli: add support for batch tagging operations to "notmuch tag"

Date: Tue, 3 Apr 2012 00:07:37 +0300

To: Jameson Graef Rollins

Cc: Notmuch Mail

From: Jani Nikula


On Apr 2, 2012 11:42 PM, "Jameson Graef Rollins" <jrollins@finestructure.net>
wrote:
>
> On Mon, Apr 02 2012, David Bremner <david@tethera.net> wrote:
> > Jameson Graef Rollins <jrollins@finestructure.net> writes:
> >> On Sat, Mar 31 2012, Jani Nikula <jani@nikula.org> wrote:
> >>> Add support for batch tagging operations through stdin to "notmuch
> >>> tag". This can be enabled with the new --stdin command line option to
> >>> "notmuch new". The input must consist of lines of the format:
> >>>
> >>> T +<tag>|-<tag> [...] [--] <search-terms>
> >>
> >
> > I think that's my fault. I was imagining a possible future line-oriented
> > notmuch server and having various actions/queries possible. It seems a
> > bit blue sky at this point, but it does give extesibility fairly
> > cheaply.
>
> But then why not just make the command explicit, and just have the first
> field be "tag"?
>
> But then I wonder why do we even need any of this at all?  Isn't it this
> just exactly equivalent to:
>
> xargs -l notmuch <commands.txt
>
> ??

Batch tagging brings performance and atomicity by opening and closing the
db only once. The hex encoding handles insane message ids and tags.
Otherwise there should be no difference.

Jani.

>
> jamie.

Thread: