[PATCH] remove prefixes from `--output={threads,messages}' results

Pieter Praet pieter at praet.org
Thu Jun 30 01:19:49 PDT 2011


Alter `do_search_threads()' and `do_search_messages()'
to not prepend each result with `thread:' respectively `id:'.

This makes its output consistent with `do_search_tags()'.

See this discussion: id:"871v6b79s0.fsf at yoom.home.cworth.org"

########################################################################

NOTE:

I started adjusting the tests as well, but stopped fairly quickly since
the amount is simply *ludicrous*. Only 9 tests fail initially, but start
ripping out `notmuch_search_sanitize' (as would be sensible) and you'll
see what I mean.

Time isn't the issue (sed flies through it faster than Windoze can BSOD),
but the patch will be so huge and disruptive that even Ubuntu devs might
consider frowning disapprovingly.

########################################################################

Signed-off-by: Pieter Praet <pieter at praet.org>
---
 notmuch-search.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/notmuch-search.c b/notmuch-search.c
index faccaf7..c565ae6 100644
--- a/notmuch-search.c
+++ b/notmuch-search.c
@@ -220,7 +220,7 @@ do_search_threads (const search_format_t *format,
 	thread = notmuch_threads_get (threads);
 
 	if (output == OUTPUT_THREADS) {
-	    format->item_id (thread, "thread:",
+	    format->item_id (thread, "",
 			     notmuch_thread_get_thread_id (thread));
 	} else { /* output == OUTPUT_SUMMARY */
 	    fputs (format->item_start, stdout);
@@ -312,7 +312,7 @@ do_search_messages (const search_format_t *format,
 	    if (! first_message)
 		fputs (format->item_sep, stdout);
 
-	    format->item_id (message, "id:",
+	    format->item_id (message, "",
 			     notmuch_message_get_message_id (message));
 	    first_message = 0;
 	}
-- 
1.7.4.1



More information about the notmuch mailing list