[PATCH v2 0/6] batch tagging support: "notmuch tag --stdin"

David Bremner david at tethera.net
Sun Apr 15 05:02:18 PDT 2012


Jani Nikula <jani at nikula.org> writes:


> I'm totally fine with modifying the proposed format (e.g. change "T" to
> "tag", make things compatible with a future general batch mode), but to
> be absolutely clear: I will not implement a general batch command
> mode. 

I was thinking about the best way of making the interface extensible,
and it might be better have a kind of modal interface, where some well
defined escape at the beginning of the line introduces a mode switch.
This has two apparent advantages: it avoids duplication of redundant
information at the beginning of each line, and for input to a subcommand
it could be optional.

something like

* tag
+foo +bar msg.id at blah
+glub -glog other.msg.id at blog

vs

* restore
foo bar msg.id at blah
glub glog other.msg.id at blog

where a hypothetical general batch interface could take those two files
concatenated together, and the "*" lines would be optional feeding to
tag and restore respectively.

I guess the current proposal is to have the restore format and tag
format a bit closer

* restore
+foo +bar msg.id at blah
+glub +glog other.msg.id at blog

This looks like it would be a 2% space increase for my tags. I guess I
could live with that. Another option would be to have the '+' be
optional for tag as well; I suppose then tags starting with + would be
ambiguous, which is probably a bad idea.

d


More information about the notmuch mailing list