From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yHGwFZEdDmOkNgEAbAwnHQ (envelope-from ) for ; Tue, 30 Aug 2022 16:24:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eGKSFZEdDmM7lAAAauVa8A (envelope-from ) for ; Tue, 30 Aug 2022 16:24:17 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DB8C83E736 for ; Tue, 30 Aug 2022 16:24:16 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 488EB5F365; Tue, 30 Aug 2022 14:24:14 +0000 (UTC) X-Greylist: delayed 380 seconds by postgrey-1.36 at yantan; Tue, 30 Aug 2022 14:24:11 UTC Received: from marcos.anarc.at (marcos.anarc.at [206.248.172.91]) by mail.notmuchmail.org (Postfix) with ESMTPS id 675995E549 for ; Tue, 30 Aug 2022 14:24:11 +0000 (UTC) Received: by marcos.anarc.at (Postfix, from userid 1000) id BFEAD10E217; Tue, 30 Aug 2022 10:17:49 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=debian.org; s=marcos-debian.anarcat.user; t=1661869069; bh=N4oF4mczTWUurSTjDP+sqj6yUVNYblgqDURiTsGHbNk=; h=From:To:Cc:Subject:Date:From; b=haQuKYIsD7ukufRBEvU0tPxKHeoK/3FX41muReA5oxNG3gQOjMSuLNfkrZ0GL8BFe s1szTWDnnXvuG5kl8ODd39XFMc6r+qdtQk1om1p6QDipL3xMR3sLfzVCiQgRF3vgTk 4YHuTQcXZSDksG1NHxW8m0daQ9f3ugWgnSNyDwG/qwr6Vhrt8fN++SepMHZ1UA0iEt 83Nipq8LQJDsw6zmn2Rto2gr2aENqh43Oc6CVAccOcoxdaUkkpy9Md9etLkf+qDc2B rqcdcVB66yXzTOOVXSLbOl1E3rHWhAGoJQeT5/WfN9JIgTW05J12DP95uhBj/PeqYh UxSlUCZ9JM78g== Received: by curie.anarc.at (Postfix, from userid 1000) id 0D3EC463D8; Tue, 30 Aug 2022 10:17:49 -0400 (EDT) From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= To: notmuch@notmuchmail.org Subject: [PATCH] emacs/show: use read-shell-command instead of read-string Date: Tue, 30 Aug 2022 10:17:45 -0400 Message-Id: <20220830141745.2139035-1-anarcat@debian.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Message-ID-Hash: VUKGACQPHCMEGAOFLHHLABPGAQWTCMR4 X-Message-ID-Hash: VUKGACQPHCMEGAOFLHHLABPGAQWTCMR4 X-MailFrom: anarcat@anarc.at X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661869457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=HhbzA32I4hS0X7zyOO7OHSScai8k3mE7x5WpK0Riiog=; b=Q15K10nEL8SM2ZzFKKeMoPi+OPYaY/G+rjbhvpkGM+CM0xyjJSLdzGT0iB+bIGN9zbXK8u RqgvCpsLRVkA7edm5jBEtJ1nPkClLTHnyWluCAT+PM0fzBMPrxFMekOD2yhqsB/4dz0JZX g2UWcQCSNgw9oCOUwOh3mI7APB+ZSzHfd7+nYXKd8UrBup/dU7YXukxnGnZ2nof5B19V31 ZcKGaYN2B4N9NQW+n9Fsawsd+eSdAnirrPVyydfxUeOYsL1qbiS4nFTfhCURw+QRPUjB/R 8WfDLO/O5FiOodibMZTdqN9j9HeQqWYbrZLze1IuUspRM8pTl2Ir/h2fOFjBlQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661869457; a=rsa-sha256; cv=none; b=DuWozgHFCea7n21j2SS2QlIKChcFu/IQgF/JfOATFUWVcgCE5xnWlxJuu2mEi0GIZecsla 0tBRWB+SF/P9cnjTKwQqBbBVVH9aIGfHBC2iixnY3iZVEWWes9GPzviac2gOS3WqPSGiQ2 9zfeli4s9+7NsJGmTmxHavgA7gixcxckFAligQ13nuPzRqotTwgz7W5viGzJvLsDokxKcS 746B9EjQGoo/ZgD6fCCivQFg+2fcE9WhKydf1tUS5xD3s4ddkDxWge/c/qpJU9h/UOMYmx UUiH467KrtAodAQVi/qaoYOLC9imhMlfb2zeMfLZiZSQurzbslYB0/XBIVVF/A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debian.org header.s=marcos-debian.anarcat.user header.b=haQuKYIs; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 1.87 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debian.org header.s=marcos-debian.anarcat.user header.b=haQuKYIs; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: DB8C83E736 X-Spam-Score: 1.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: IomVLxOR9eII This enables auto-completion of commands, something which plain read-string does not do. It's otherwise a drop-in replacement. According to `C-h f`, read-shell-command was introduced in Emacs 23.1 or earlier. --- emacs/notmuch-show.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 2dcef981..ec998ede 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -2192,7 +2192,7 @@ message." (interactive (let ((query-string (if current-prefix-arg "Pipe all open messages to command: " "Pipe message to command: "))) - (list current-prefix-arg (read-string query-string)))) + (list current-prefix-arg (read-shell-command query-string)))) (let (shell-command) (if entire-thread (setq shell-command -- 2.30.2