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: Mon, 02 Apr 2012 10:51:55 -0700

To: Jani Nikula, notmuch@notmuchmail.org

Cc:

From: Jameson Graef Rollins


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>

Hey, Jani.  I can understand why you're going for this form, since it
mimics the command line arguments for tag and you want to be able to tag
for arbitrary searches, but I must say that I find it unappealing that
this functionality is *so* similar to that of notmuch restore, but the
file format is totally different.  Can't we unify all of this in a
better way?

This patch series seems to beg that we actually just unify the tag and
restore functions in to one thing.  They're really just doing the same
thing.  If we extended restore to accept a search-term instead of a
message id they would in fact be identical.

The more I think about it the more it makes sense to me that we just
merge tag and restore, and extend the input file format to be able to
accept search terms.  It just doesn't make sense to have these two
interfaces that do basically the exact same thing but in a slightly
divergent way.

jamie.
part-000.sig (application/pgp-signature)

Thread: