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 E82866DE01FF for ; Tue, 27 Feb 2018 11:57:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.02 X-Spam-Level: X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[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 qX-xkl7kVT8Q for ; Tue, 27 Feb 2018 11:57:48 -0800 (PST) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by arlo.cworth.org (Postfix) with ESMTPS id 8919C6DE01EF for ; Tue, 27 Feb 2018 11:57:48 -0800 (PST) Received: by mail-lf0-f49.google.com with SMTP id f75so53512lfg.6 for ; Tue, 27 Feb 2018 11:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=BD4nGoPerCjdi6STyzbWCS/vw6ocpTEvVmS22QXqLuw=; b=SWqyemfxhnLzi1EG6MU2/dWZTmOhtwWgriQfy0RXE2fk9p/sCV6SdQWzo86shg94Os 066K1g52l9vBkTItBqP29ip9F/r15n28Ch2m0hQMLwthnw9WgCCkWwGXLDY3awvPgtAu BuAotO9EPK5Cqaeofxzzx85tAXYVIVI+xHwvdyt95Oaw9Jmpq7E/5uWDD+OF6bX/D4yf AOKZz24qpYfFp48RqbmzSFHOJ51awe3gBlaZUGuAAu39jSvnMEaxMbdvupwpGUkd6Wua LQtZ/ylROpIiMvybm81uDRkV6Zsn7vc9Qo7BE2LVfZs1uUlpobtLrFjkpCnyvVehJWGu plqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BD4nGoPerCjdi6STyzbWCS/vw6ocpTEvVmS22QXqLuw=; b=qvQVMc8a2jQFsD+vtlIlsAx/04EzSk3s89HMm4SV4ueb7SqOUDA1n0g+aGJ1JCZN9M oOlAd50KSXq9wk9YGdUvrAxzVKUva8mc05duDa9aoib34295A3Tzf3ayOxkbaFztBftj EdABoK6ibeNvqUkIQvSI5gcm3ro/uToBmvaQCztVymUnm+orwA8EUEy7nXK/aJ/CkUxE MhyzlAB2cnaau68exPM1gV95wYHSkch+6b5tVqFHyWfZccj3PVYx4eCpDZE40/dkXuw3 lz8781qU2oEoyTE5ZKiqLKqQOfVB9QBb7YW7PoIw8b49VmfOTz5qyUvY9P2BpR/zlsuK zrGg== X-Gm-Message-State: APf1xPCqwdLQDg6Ugx5xCNYC+P0Bcdg7sbOrODYsFV1IYhLj+EIFf96n +oUwsepmMdXeYpctTw8k+/deoIc//DE= X-Google-Smtp-Source: AG47ELtx3mazcisCQFJbiVAEshudkRT/a1VKFAXTJRP9qgUlIRm8mRUP95AgTEwqrGuMP2iSxTfIVw== X-Received: by 10.25.156.210 with SMTP id f201mr8200523lfe.9.1519761464831; Tue, 27 Feb 2018 11:57:44 -0800 (PST) Received: from localhost (82-203-187-31.bb.dnainternet.fi. [82.203.187.31]) by smtp.gmail.com with ESMTPSA id q63sm1543284lje.72.2018.02.27.11.57.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Feb 2018 11:57:43 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH] notmuch-mutt: use --format=text0 and xargs -0 Date: Tue, 27 Feb 2018 21:57:39 +0200 Message-Id: <20180227195739.32378-1-jani@nikula.org> X-Mailer: git-send-email 2.11.0 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 19:57:50 -0000 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'" - . " | xargs -r -I searchoutput ln -s searchoutput $maildir/cur/"); + . " | xargs -0 -r -I searchoutput ln -s searchoutput $maildir/cur/"); } sub prompt($$) { -- 2.11.0