Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2E2A141ED86 for ; Thu, 30 Jun 2011 01:20:03 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sePaj6OrL1pe for ; Thu, 30 Jun 2011 01:20:01 -0700 (PDT) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D5BD342119F for ; Thu, 30 Jun 2011 01:20:00 -0700 (PDT) Received: by wwj40 with SMTP id 40so1625697wwj.2 for ; Thu, 30 Jun 2011 01:19:59 -0700 (PDT) Received: by 10.216.79.74 with SMTP id h52mr1717392wee.33.1309421999624; Thu, 30 Jun 2011 01:19:59 -0700 (PDT) Received: from localhost ([109.131.21.173]) by mx.google.com with ESMTPS id w58sm1001748weq.1.2011.06.30.01.19.57 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Jun 2011 01:19:58 -0700 (PDT) From: Pieter Praet To: notmuch@notmuchmail.org Subject: [PATCH] remove prefixes from `--output={threads,messages}' results Date: Thu, 30 Jun 2011 10:19:49 +0200 Message-Id: <1309421989-22410-1-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <877hbiep5g.fsf@SSpaeth.de> References: <877hbiep5g.fsf@SSpaeth.de> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jun 2011 08:20:03 -0000 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@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 --- 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