unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Inconsistent output from "notmuch search --output=<foo>"
@ 2010-11-24  2:09 Carl Worth
  2010-11-24  3:30 ` Jameson Rollins
                   ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Carl Worth @ 2010-11-24  2:09 UTC (permalink / raw)
  To: notmuch

I just committed a bug fix for the missing final newline from "notmuch
search --output=tags". I don't recall who reported the bug, but thanks!

Michal, in trying to add a test for that bug, I found that the current
test suite infrastructure can't catch it because the shell's $()
construct doesn't distinguish whether that final newline is present or
not. I don't see an easy way to fix this, (other than making all tests
put results into files and making test_expect_equal accept those
filenames). Do you see any easy fix?

Meanwhile, while adding the --output= test, I noticed some inconsistency
in the output:

	$ notmuch search --output=threads ... | head -1
        thread:0000000000000c3c

        $ notmuch search --output=messages ... | head -1
        id:1272355278.3878.111.camel@thor.local

        $ notmuch search --output=files ... | head -1
	/path/to/maildir/1272355352.M909256P19063V18F0_0,S=9415

	$ notmuch search --output=tags ... | head -1
	attachment

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 think the right answer is to drop those prefixes in the output. Does
anybody disagree? Does anyone have any scripts that are already
consuming the output of "notmuch search --output=threads" or "notmuch
search --output=messages" yet?

Note that the --format=json output won't be affected by the change I'm
proposing here.

-Carl

--
carl.d.worth@intel.com

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2012-01-16 11:00 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-24  2:09 Inconsistent output from "notmuch search --output=<foo>" Carl Worth
2010-11-24  3:30 ` Jameson Rollins
2010-11-24  8:38 ` Sebastian Spaeth
2010-11-24 10:36   ` David Edmondson
2010-11-24 19:40   ` Carl Worth
2010-11-25 15:41     ` Jameson Rollins
2010-11-24  9:25 ` Michal Sojka
2011-03-29  0:39 ` Sebastian Spaeth
2011-06-30  8:19   ` [PATCH] remove prefixes from `--output={threads,messages}' results Pieter Praet
2011-06-30 16:24     ` [PATCH] remove prefixes from `--output={threads, messages}' results Carl Worth
2011-06-30 17:54       ` Pieter Praet
2011-06-30  8:20   ` [PATCH] add `tag:' prefix to `--output=tags' results Pieter Praet
2011-06-30  8:35     ` [PATCH] fix breakage in `notmuch-hello-generate-tag-alist' due to `tag:' prefix Pieter Praet
2011-06-30  8:36     ` [PATCH] fix breakage in `notmuch-select-tag-with-completion' " Pieter Praet
2011-11-12 15:17     ` [PATCH] add `tag:' prefix to `--output=tags' results David Bremner
2011-11-13 14:14       ` Jani Nikula
2011-11-16 11:07         ` Pieter Praet
2011-11-13 23:00       ` Jameson Graef Rollins
2011-11-14  6:56         ` Dmitry Kurochkin
2011-11-16 11:28         ` Pieter Praet
2012-01-16 10:56     ` David Edmondson
2012-01-16 10:58       ` Pieter Praet
2011-06-30  8:20   ` [PATCH] emacs: add keybind and function to stash Message-ID without prefix Pieter Praet
2011-06-30  8:23     ` [PATCH] test: stashing in notmuch-{show,search} Pieter Praet
2011-11-13  1:12       ` David Bremner
2011-11-16 11:38         ` [PATCH] test: emacs: tidy up "Stashing in notmuch-show" test Pieter Praet
2011-11-18 19:26           ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).