Inconsistent output from "notmuch search --output=<foo>"

Carl Worth cworth at cworth.org
Wed Nov 24 11:40:46 PST 2010


On Wed, 24 Nov 2010 09:38:46 +0100, Sebastian Spaeth <Sebastian at SSpaeth.de> wrote:
> On Tue, 23 Nov 2010 18:09:03 -0800, Carl Worth wrote:
> > The inconsistency is the presence of the "thread:" and "id:" prefixes in
> > the first two cases, (note that there isn't any "tag:" prefix in the
> > last case). I can't find any good justification for these.
> 
> I use the output of notmuch search --format=threads to feed to another
> notmuch tag operation, and if the thread: prefix vanishes, I'll have to find other
> ways to do that. :)

Right. The inconsistency is that we don't have output such as:

	tag:attachment
	tag:unread
        ...

From notmuch search --output=tags. While that output would be useful if
you were using the tags to construct a search string, it gets in the way
if you are doing something else with the tag names.

And I can't come up with a strong, objective distinction for the threads
and messages output differing here. (Thread and message IDs are "mostly"
used for searching? How could we define that?)

It is easy to say that a command like "search --output=" is designed
primarily for automated use in scripts, and usage like that does benefit
From consistency. This is in contrast to the various "stash" commands in
the emacs interface which are designed primarily for interactive use,
and there, convenience is more important than consistency.

So my inclination is to remove the prefixes and then recommend that you
do:

	notmuch search --output=threads | sed -e 's/^/thread:'

in your script.

-Carl

-- 
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20101124/e516b53f/attachment.pgp>


More information about the notmuch mailing list