From: Tomi Ollila <tomi.ollila@iki.fi>
To: "Kevin J. McCarthy" <kevin@8t8.us>, notmuch@notmuchmail.org
Cc: Stefano Zacchiroli <zack@upsilon.cc>
Subject: Re: [PATCH v2 1/1] notmuch-mutt: Fix tagging issues
Date: Sun, 08 Sep 2013 18:50:53 +0300 [thread overview]
Message-ID: <m261ubwbvm.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <20130907170757.GA407@zaogao.lan>
On Sat, Sep 07 2013, "Kevin J. McCarthy" <kevin@8t8.us> wrote:
> This patch fixes three issues with "notmuch-mutt tag":
>
> 1. The message_id was not shell quoted.
> Thanks to Jason Miller for the bug report and patch.
>
> 2. The tags passed into tag_action() were not being properly quoted.
> The "join before shell_quote" was combining multiple tags into a
> single argument to notmuch tag: '+one -two -three' instead of
> '+one' '-two' '-three'.
>
> 3. A "--" was added between the tags and search-term as shown in the
> current notmuch-tag man page.
>
> Thanks to Tomi Ollila for suggesting the simple fix of using
> the list form of system(), which bypasses the shell.
> ---
LGTM.
Tomi
> contrib/notmuch-mutt/notmuch-mutt | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/notmuch-mutt
> index c69b35c..4969e4b 100755
> --- a/contrib/notmuch-mutt/notmuch-mutt
> +++ b/contrib/notmuch-mutt/notmuch-mutt
> @@ -113,9 +113,7 @@ sub tag_action(@) {
> my $mid = get_message_id();
> defined $mid or die "notmuch-mutt: cannot find Message-Id, abort.\n";
>
> - system("notmuch tag "
> - . shell_quote(join(' ', @_))
> - . " id:$mid");
> + system("notmuch", "tag", @_, "--", "id:$mid");
> }
>
> sub die_usage() {
> --
> 1.8.4.rc3
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
--
"kaik on mänt!"
next prev parent reply other threads:[~2013-09-08 15:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 22:15 [PATCH 1/1] notmuch-mutt: Fix tagging issues Kevin J. McCarthy
2013-09-07 8:27 ` Tomi Ollila
2013-09-07 15:57 ` Kevin J. McCarthy
2013-09-07 17:07 ` [PATCH v2 " Kevin J. McCarthy
2013-09-08 15:50 ` Tomi Ollila [this message]
2013-09-09 1:52 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m261ubwbvm.fsf@guru.guru-group.fi \
--to=tomi.ollila@iki.fi \
--cc=kevin@8t8.us \
--cc=notmuch@notmuchmail.org \
--cc=zack@upsilon.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).