[PATCH v4 13/16] add indexopts to notmuch python bindings.
[notmuch-archives.git] / 09 / 85dc9bd69c155300cb6c07b23571dc9ec45637
1 Return-Path: <tomi.ollila@iki.fi>\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 493C7431FAF\r
6         for <notmuch@notmuchmail.org>; Sat,  7 Sep 2013 01:28:18 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 qJHHNAgNdv3h for <notmuch@notmuchmail.org>;\r
16         Sat,  7 Sep 2013 01:28:05 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 82884431FAE\r
19         for <notmuch@notmuchmail.org>; Sat,  7 Sep 2013 01:28:05 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id C908D10005E;\r
22         Sat,  7 Sep 2013 11:27:55 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: "Kevin J. McCarthy" <kevin@8t8.us>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH 1/1] notmuch-mutt: Fix tagging issues\r
26 In-Reply-To: <20130906221520.GC4226@zaogao.lan>\r
27 References: <20130906221520.GC4226@zaogao.lan>\r
28 User-Agent: Notmuch/0.16+60~gbdcc747 (http://notmuchmail.org) Emacs/24.3.1\r
29         (x86_64-unknown-linux-gnu)\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
31         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
32         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
33 Date: Sat, 07 Sep 2013 11:27:55 +0300\r
34 Message-ID: <m2mwnprq7o.fsf@guru.guru-group.fi>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain; charset=utf-8\r
37 Content-Transfer-Encoding: quoted-printable\r
38 Cc: Stefano Zacchiroli <zack@upsilon.cc>\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Sat, 07 Sep 2013 08:28:18 -0000\r
52 \r
53 On Sat, Sep 07 2013, "Kevin J. McCarthy" <kevin@8t8.us> wrote:\r
54 \r
55 > This patch fixes three issues with "notmuch-mutt tag":\r
56 >\r
57 > 1. The message-id was not shell quoted.\r
58 >    Thanks to Jason Miller for the bug report and patch.\r
59 >\r
60 > 2. The tags passed into tag_action() were not being properly quoted.\r
61 >    The "join before shell_quote" was combining multiple tags into a\r
62 >    single argument to notmuch tag: '+one -two -three' instead of\r
63 >    '+one' '-two' '-three'.  Note that shell_quote() will join array\r
64 >    arguments with a space after quoting each, so a join afterwards was\r
65 >    not needed.\r
66 >\r
67 > 3. A "--" was added between the tags and search-term as shown in the\r
68 >    current notmuch-tag man page.\r
69 \r
70 The patch looks good to me, just that I cannot test it. +1.\r
71 \r
72 If it weren't inconsistent what is there now a simpler alternative could be:\r
73 \r
74 system qw/notmuch tag/, @_, '--', "id:$mid";\r
75 \r
76 or even\r
77 \r
78 exec qw/notmuch tag/, @_, '--', "id:$mid";\r
79 \r
80 \r
81 ... as these bypasses the intermediate shell altogether.\r
82 \r
83 Tomi\r
84 \r
85 \r
86 > ---\r
87 >  contrib/notmuch-mutt/notmuch-mutt | 5 +++--\r
88 >  1 file changed, 3 insertions(+), 2 deletions(-)\r
89 >\r
90 > diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/not=\r
91 much-mutt\r
92 > index c69b35c..e5d6848 100755\r
93 > --- a/contrib/notmuch-mutt/notmuch-mutt\r
94 > +++ b/contrib/notmuch-mutt/notmuch-mutt\r
95 > @@ -114,8 +114,9 @@ sub tag_action(@) {\r
96 >      defined $mid or die "notmuch-mutt: cannot find Message-Id, abort.\n";\r
97 >=20=20\r
98 >      system("notmuch tag "\r
99 > -        . shell_quote(join(' ', @_))\r
100 > -        . " id:$mid");\r
101 > +        . shell_quote(@_)\r
102 > +        . " -- "\r
103 > +        . shell_quote("id:$mid"));\r
104 >  }\r
105 >=20=20\r
106 >  sub die_usage() {\r
107 > --=20\r
108 > 1.8.4.rc3\r
109 >\r
110 > _______________________________________________\r
111 > notmuch mailing list\r
112 > notmuch@notmuchmail.org\r
113 > http://notmuchmail.org/mailman/listinfo/notmuch\r
114 \r
115 --=20\r
116 "kaik on m=C3=A4nt!"\r