Re: [RFC PATCH v2 0/3] notmuch-pick: an emacs threaded message view with split-pane
[notmuch-archives.git] / a4 / d38ff1c09012fd6631198653180871cea3f9fb
1 Return-Path: <pieter@praet.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 2E2A141ED86\r
6         for <notmuch@notmuchmail.org>; Thu, 30 Jun 2011 01:20:03 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id sePaj6OrL1pe for <notmuch@notmuchmail.org>;\r
16         Thu, 30 Jun 2011 01:20:01 -0700 (PDT)\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
18  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  D5BD342119F    for <notmuch@notmuchmail.org>; Thu, 30 Jun 2011 01:20:00 -0700\r
21  (PDT)\r
22 Received: by wwj40 with SMTP id 40so1625697wwj.2\r
23         for <notmuch@notmuchmail.org>; Thu, 30 Jun 2011 01:19:59 -0700 (PDT)\r
24 Received: by 10.216.79.74 with SMTP id h52mr1717392wee.33.1309421999624;\r
25         Thu, 30 Jun 2011 01:19:59 -0700 (PDT)\r
26 Received: from localhost ([109.131.21.173])\r
27         by mx.google.com with ESMTPS id w58sm1001748weq.1.2011.06.30.01.19.57\r
28         (version=TLSv1/SSLv3 cipher=OTHER);\r
29         Thu, 30 Jun 2011 01:19:58 -0700 (PDT)\r
30 From: Pieter Praet <pieter@praet.org>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [PATCH] remove prefixes from `--output={threads,messages}' results\r
33 Date: Thu, 30 Jun 2011 10:19:49 +0200\r
34 Message-Id: <1309421989-22410-1-git-send-email-pieter@praet.org>\r
35 X-Mailer: git-send-email 1.7.4.1\r
36 In-Reply-To: <877hbiep5g.fsf@SSpaeth.de>\r
37 References: <877hbiep5g.fsf@SSpaeth.de>\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Thu, 30 Jun 2011 08:20:03 -0000\r
51 \r
52 Alter `do_search_threads()' and `do_search_messages()'\r
53 to not prepend each result with `thread:' respectively `id:'.\r
54 \r
55 This makes its output consistent with `do_search_tags()'.\r
56 \r
57 See this discussion: id:"871v6b79s0.fsf@yoom.home.cworth.org"\r
58 \r
59 ########################################################################\r
60 \r
61 NOTE:\r
62 \r
63 I started adjusting the tests as well, but stopped fairly quickly since\r
64 the amount is simply *ludicrous*. Only 9 tests fail initially, but start\r
65 ripping out `notmuch_search_sanitize' (as would be sensible) and you'll\r
66 see what I mean.\r
67 \r
68 Time isn't the issue (sed flies through it faster than Windoze can BSOD),\r
69 but the patch will be so huge and disruptive that even Ubuntu devs might\r
70 consider frowning disapprovingly.\r
71 \r
72 ########################################################################\r
73 \r
74 Signed-off-by: Pieter Praet <pieter@praet.org>\r
75 ---\r
76  notmuch-search.c |    4 ++--\r
77  1 files changed, 2 insertions(+), 2 deletions(-)\r
78 \r
79 diff --git a/notmuch-search.c b/notmuch-search.c\r
80 index faccaf7..c565ae6 100644\r
81 --- a/notmuch-search.c\r
82 +++ b/notmuch-search.c\r
83 @@ -220,7 +220,7 @@ do_search_threads (const search_format_t *format,\r
84         thread = notmuch_threads_get (threads);\r
85  \r
86         if (output == OUTPUT_THREADS) {\r
87 -           format->item_id (thread, "thread:",\r
88 +           format->item_id (thread, "",\r
89                              notmuch_thread_get_thread_id (thread));\r
90         } else { /* output == OUTPUT_SUMMARY */\r
91             fputs (format->item_start, stdout);\r
92 @@ -312,7 +312,7 @@ do_search_messages (const search_format_t *format,\r
93             if (! first_message)\r
94                 fputs (format->item_sep, stdout);\r
95  \r
96 -           format->item_id (message, "id:",\r
97 +           format->item_id (message, "",\r
98                              notmuch_message_get_message_id (message));\r
99             first_message = 0;\r
100         }\r
101 -- \r
102 1.7.4.1\r
103 \r