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 56D0C431FAF
\r
6 for <notmuch@notmuchmail.org>; Sun, 8 Sep 2013 08:51:07 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 Kd50h9bsxXae for <notmuch@notmuchmail.org>;
\r
16 Sun, 8 Sep 2013 08:51:01 -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 853D5431FAE
\r
19 for <notmuch@notmuchmail.org>; Sun, 8 Sep 2013 08:51:01 -0700 (PDT)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 2DB18100090;
\r
22 Sun, 8 Sep 2013 18:50:53 +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 v2 1/1] notmuch-mutt: Fix tagging issues
\r
26 In-Reply-To: <20130907170757.GA407@zaogao.lan>
\r
27 References: <20130906221520.GC4226@zaogao.lan>
\r
28 <m2mwnprq7o.fsf@guru.guru-group.fi>
\r
29 <20130907155748.GD4226@zaogao.lan>
\r
30 <20130907170757.GA407@zaogao.lan>
\r
31 User-Agent: Notmuch/0.16+60~gbdcc747 (http://notmuchmail.org) Emacs/24.3.1
\r
32 (x86_64-unknown-linux-gnu)
\r
33 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
34 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
35 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
36 Date: Sun, 08 Sep 2013 18:50:53 +0300
\r
37 Message-ID: <m261ubwbvm.fsf@guru.guru-group.fi>
\r
39 Content-Type: text/plain; charset=utf-8
\r
40 Content-Transfer-Encoding: quoted-printable
\r
41 Cc: Stefano Zacchiroli <zack@upsilon.cc>
\r
42 X-BeenThere: notmuch@notmuchmail.org
\r
43 X-Mailman-Version: 2.1.13
\r
45 List-Id: "Use and development of the notmuch mail system."
\r
46 <notmuch.notmuchmail.org>
\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
50 List-Post: <mailto:notmuch@notmuchmail.org>
\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
53 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
54 X-List-Received-Date: Sun, 08 Sep 2013 15:51:07 -0000
\r
56 On Sat, Sep 07 2013, "Kevin J. McCarthy" <kevin@8t8.us> wrote:
\r
58 > This patch fixes three issues with "notmuch-mutt tag":
\r
60 > 1. The message_id was not shell quoted.
\r
61 > Thanks to Jason Miller for the bug report and patch.
\r
63 > 2. The tags passed into tag_action() were not being properly quoted.
\r
64 > The "join before shell_quote" was combining multiple tags into a
\r
65 > single argument to notmuch tag: '+one -two -three' instead of
\r
66 > '+one' '-two' '-three'.
\r
68 > 3. A "--" was added between the tags and search-term as shown in the
\r
69 > current notmuch-tag man page.
\r
71 > Thanks to Tomi Ollila for suggesting the simple fix of using
\r
72 > the list form of system(), which bypasses the shell.
\r
79 > contrib/notmuch-mutt/notmuch-mutt | 4 +---
\r
80 > 1 file changed, 1 insertion(+), 3 deletions(-)
\r
82 > diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/not=
\r
84 > index c69b35c..4969e4b 100755
\r
85 > --- a/contrib/notmuch-mutt/notmuch-mutt
\r
86 > +++ b/contrib/notmuch-mutt/notmuch-mutt
\r
87 > @@ -113,9 +113,7 @@ sub tag_action(@) {
\r
88 > my $mid =3D get_message_id();
\r
89 > defined $mid or die "notmuch-mutt: cannot find Message-Id, abort.\n";
\r
91 > - system("notmuch tag "
\r
92 > - . shell_quote(join(' ', @_))
\r
94 > + system("notmuch", "tag", @_, "--", "id:$mid");
\r
101 > _______________________________________________
\r
102 > notmuch mailing list
\r
103 > notmuch@notmuchmail.org
\r
104 > http://notmuchmail.org/mailman/listinfo/notmuch
\r
107 "kaik on m=C3=A4nt!"
\r