From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 6EF616DE01FF for ; Tue, 27 Feb 2018 12:02:11 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.029 X-Spam-Level: X-Spam-Status: No, score=0.029 tagged_above=-999 required=5 tests=[AWL=0.049, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4HIP6Q35vmBB for ; Tue, 27 Feb 2018 12:02:10 -0800 (PST) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by arlo.cworth.org (Postfix) with ESMTPS id C4E6C6DE01EF for ; Tue, 27 Feb 2018 12:02:09 -0800 (PST) Received: by mail-lf0-f68.google.com with SMTP id r80so46089lfe.13 for ; Tue, 27 Feb 2018 12:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=O+45YVRG+6Rl2jSHJ5Uq+9wsRWzA2+sg4U90ZMXYWto=; b=ZVBQ+LIHNx8XCWjFZWLS9dHvPC0fj357TaMZThvb/E+vc80u9yyZO9whv0AaylF35c u2syRgyKNuW1G6/dy2x6x+GgT0GH2paRFbJnHe1EJmS9b1iiD3VthaxFqEC6NIyRFuVZ lwTQYjTM9RswVPsm7Y5/CbNzc5ZRmDLvP1faOMu4ulOeXD6efTCcFqE3u7HwKXHXOgcn P6roeM+w/c3N4jg7xn6hFTwdHKHQBjXV4I+H21S13lsfCcdJGVjmvfFH68xgufUY03Hz CaxGba5FT4388Pt8CUE+XM/Ks21yMmyIe9H/vo/PGhcgB+jcBvv7sFbeLWTnu6ZjXDiE aARQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=O+45YVRG+6Rl2jSHJ5Uq+9wsRWzA2+sg4U90ZMXYWto=; b=ohraclJxgcb5pDkEMqg72IGcNmb+Hk8+9af+X0g83bwG4U47Kb7/zyN2RrILOrj+/y 0xg/EyqxieIftH4ZHiPLTcuxVXLWi0SbXys2ISxyFX2F5c9RqnQZ2CyY9jgoAk7/e7ve 28gW1hKwRY4Qpgku4f50nH3gWmhCmyka9IrdKjnxiAYbkh5kWgE5ICa5r6mLT07j5s3q +okVokaxkQ6JINB/LIgG1v1mvKc6PrZTUAj5gGKJRy2VskOSUDAmwARO1Jry42bComAH fd5mYqo2SFDNjYkEJmE7I82R9Ybs2rtmrLoF83x9Ml7gJPlsiP5y/piJ56BaYTvFI6xm vfZA== X-Gm-Message-State: APf1xPAqb4HTgcNYjRTD7w+xiuRkShDmmkgvFcuQW1SsmyN8ZTlC7NXF qVzgxJ2FbeIU9YYd1G2DCT7hljNvqGA= X-Google-Smtp-Source: AG47ELv1DmuwJ32ymFPWiSIOn2P7jUweW8JF6iB+ffXahv7Pa79mUezJi8376k5Usrwdo3UPiGj9/g== X-Received: by 10.46.36.16 with SMTP id k16mr10751479ljk.14.1519761727557; Tue, 27 Feb 2018 12:02:07 -0800 (PST) Received: from localhost (82-203-187-31.bb.dnainternet.fi. [82.203.187.31]) by smtp.gmail.com with ESMTPSA id x4sm2683803lfa.83.2018.02.27.12.02.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Feb 2018 12:02:06 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: Re: [PATCH] notmuch-mutt: use --format=text0 and xargs -0 In-Reply-To: <20180227195739.32378-1-jani@nikula.org> References: <20180227195739.32378-1-jani@nikula.org> Date: Tue, 27 Feb 2018 22:02:05 +0200 Message-ID: <877eqygq0y.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 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: Tue, 27 Feb 2018 20:02:11 -0000 On Tue, 27 Feb 2018, Jani Nikula wrote: > notmuch-mutt fails for message files with special characters such as > single quote in their filename. Use notmuch search --format=text0 and > xargs -0 combo to handle them. > > Reported and tested by "dob1" on IRC. > --- > contrib/notmuch-mutt/notmuch-mutt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/notmuch-mutt > index 0e46a8c1b95e..57f13075aa22 100755 > --- a/contrib/notmuch-mutt/notmuch-mutt > +++ b/contrib/notmuch-mutt/notmuch-mutt > @@ -48,9 +48,9 @@ sub search($$$) { > } > > empty_maildir($maildir); > - system("notmuch search --output=files $dup_option $query" > + system("notmuch search --format=text0 --output=files $dup_option $query" > . " | sed -e 's: :\\\\ :g'" Come to think of it, does this need sed -z too? > - . " | xargs -r -I searchoutput ln -s searchoutput $maildir/cur/"); > + . " | xargs -0 -r -I searchoutput ln -s searchoutput $maildir/cur/"); > } > > sub prompt($$) { > -- > 2.11.0