Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D86BA431FBC for ; Fri, 20 Nov 2009 18:37:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tvj5g8OwUi2x for ; Fri, 20 Nov 2009 18:37:36 -0800 (PST) Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by olra.theworths.org (Postfix) with ESMTP id 0CE54431FAE for ; Fri, 20 Nov 2009 18:37:35 -0800 (PST) Received: by bwz24 with SMTP id 24so2830528bwz.30 for ; Fri, 20 Nov 2009 18:37:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:mime-version:content-type; bh=uERsGBdf88MmXA5YF8pzf7ejvhi2lD0fTGBnSUjD/3Y=; b=nNP+G3hXdPp4PEhdej1Egrs5En4Z6ifLIZRri6QTif/FztwNrZqRn4OmyDEuTvXhh3 tht4xgd5EHudIVj5haySqhNeu+Ri5NRPj1MCy5/Uu/1lxWAFb3C+OlceLVpTgesOdLP0 XGVJXzE/yNBDV4NGAA/uD63VUvazSOSaIvxkc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type; b=RRqAdaSZeVex0OU/D9ZTGI3SY4v7m9M47n9LivFqJyUBSu/iUPDiPfgxMf1nvk1q2L HAjLllY+eE0y3nkT4O8DXxQbKtRIQ1nxFwEVLCPLJABin2tiNcUI7hMZgOXSIo3Je5Cj GTYhtuAOFslz4E1p2djM/nyI/9zxiq+qiPVaU= Received: by 10.204.11.17 with SMTP id r17mr2200620bkr.41.1258771054539; Fri, 20 Nov 2009 18:37:34 -0800 (PST) Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id p9sm2299222fkb.14.2009.11.20.18.37.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 20 Nov 2009 18:37:33 -0800 (PST) Sender: Jed Brown From: Jed Brown To: notmuch@notmuchmail.org Date: Sat, 21 Nov 2009 03:37:54 +0100 Message-Id: <1258771074-25997-1-git-send-email-jed@59A2.org> X-Mailer: git-send-email 1.6.5.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.6.5.3" Subject: [notmuch] [PATCH] Quote file names passed to the shell X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Sat, 21 Nov 2009 02:37:37 -0000 This is a multi-part message in MIME format. --------------1.6.5.3 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit Prior to this, notmuch-show-pipe-message could not handle file names with spaces and similar. --- notmuch.el | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) --------------1.6.5.3 Content-Type: text/x-patch; name="0001-Quote-file-names-passed-to-the-shell.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-Quote-file-names-passed-to-the-shell.patch" diff --git a/notmuch.el b/notmuch.el index cd3780f..1ca633d 100644 --- a/notmuch.el +++ b/notmuch.el @@ -281,7 +281,8 @@ The given command will be executed with the raw contents of the current email message as stdin. Anything printed by the command to stdout or stderr will appear in the *Messages* buffer." (interactive "sPipe message to command: ") - (apply 'start-process-shell-command "notmuch-pipe-command" "*notmuch-pipe*" (split-string (concat command " < " (notmuch-show-get-filename))))) + (apply 'start-process-shell-command "notmuch-pipe-command" "*notmuch-pipe*" + (list command " < " (shell-quote-argument (notmuch-show-get-filename))))) (defun notmuch-show-move-to-current-message-summary-line () "Move to the beginning of the one-line summary of the current message. --------------1.6.5.3--