From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#35564: [PATCH v4] Tweak dired warning about "wildcard" characters Date: Thu, 15 Aug 2019 23:56:23 +0300 Organization: LINKOV.NET Message-ID: <87mugajgg8.fsf@mail.linkov.net> References: <87zho2cd4f.fsf@gmail.com> <87wohvf22u.fsf@gmail.com> <87h88cvpkj.fsf_-_@gmail.com> <87imsinbmr.fsf_-_@gmail.com> <87y313z3tp.fsf@gmail.com> <83wog3lo5c.fsf@gnu.org> <87wog3pewu.fsf@gmail.com> <87v9vndsnj.fsf@web.de> <87imrl4ixr.fsf@web.de> <87r2688y1l.fsf@gmail.com> <87sgqkjfxv.fsf@web.de> <87tvas2b5o.fsf@gmail.com> <87d0hffjda.fsf@mail.linkov.net> <87k1bmfr1b.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="156433"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Michael Heerdegen , 35564@debbugs.gnu.org, monnier@iro.umontreal.ca, npostavs@gmail.com To: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 15 23:00:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hyMr0-000eRa-Jg for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Aug 2019 23:00:14 +0200 Original-Received: from localhost ([::1]:47026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyMqz-0002RA-Gz for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Aug 2019 17:00:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55588) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyMqr-0002R1-NF for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 17:00:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyMqp-000411-CV for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 17:00:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43692) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hyMqp-00040t-40 for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 17:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hyMqp-0000Dm-2L for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 17:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Aug 2019 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35564 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35564-submit@debbugs.gnu.org id=B35564.1565902769733 (code B ref 35564); Thu, 15 Aug 2019 21:00:02 +0000 Original-Received: (at 35564) by debbugs.gnu.org; 15 Aug 2019 20:59:29 +0000 Original-Received: from localhost ([127.0.0.1]:52513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyMqH-0000Bl-5t for submit@debbugs.gnu.org; Thu, 15 Aug 2019 16:59:29 -0400 Original-Received: from camel.birch.relay.mailchannels.net ([23.83.209.29]:2990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyMqD-0000BX-VL for 35564@debbugs.gnu.org; Thu, 15 Aug 2019 16:59:26 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 9760C1A277A; Thu, 15 Aug 2019 20:59:24 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a66.g.dreamhost.com (100-96-148-147.trex.outbound.svc.cluster.local [100.96.148.147]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 053821A1E95; Thu, 15 Aug 2019 20:59:24 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a66.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Thu, 15 Aug 2019 20:59:24 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Soft-Vacuous: 0be2d29d39282296_1565902764320_1065569905 X-MC-Loop-Signature: 1565902764320:2567480969 X-MC-Ingress-Time: 1565902764320 Original-Received: from pdx1-sub0-mail-a66.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a66.g.dreamhost.com (Postfix) with ESMTP id 86F4684B5E; Thu, 15 Aug 2019 13:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=1DtOZq JaK0dNBXzPLmcF3V64CnE=; b=VM6SJy3k70L1tDAR7IHvDcDu+sjIoD3/l4r27W pPP11X6o8qCZBEyXMHZzvygjSJJJO6A3g8e7txq8hW1hBanyu1vNwfuUDQTZeyig lqwSDxcLzoZZRMsvzj/4g6oKU80alOmWjnDu6Bcc65c8hd65pIDJ99XuEuK5o+cu gSTu0= Original-Received: from mail.jurta.org (m91-129-109-163.cust.tele2.ee [91.129.109.163]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a66.g.dreamhost.com (Postfix) with ESMTPSA id 084FC84B4F; Thu, 15 Aug 2019 13:59:14 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a66 In-Reply-To: <87k1bmfr1b.fsf@gmail.com> ("=?UTF-8?Q?K=C3=A9vin?= Le Gouguec"'s message of "Fri, 09 Aug 2019 14:43:12 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrudefuddgudehgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdelrdduieefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtledrudeifedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehkvghvihhnrdhlvghgohhughhuvggtsehgmhgrihhlrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:165145 Archived-At: > IIUC, your suggested prompt does not match what dired-do-shell-command > actually does: the function only ever substitutes '?' if it is > "isolated", i.e. surrounded with whitespace or backquotes. Cf. the > docstring: > >> =E2=80=98*=E2=80=99 and =E2=80=98?=E2=80=99 when not surrounded by whi= tespace nor =E2=80=98`=E2=80=99 have no special >> significance for =E2=80=98dired-do-shell-command=E2=80=99, and are pas= sed through >> normally to the shell, but you must confirm first. I collected a short summary that shows one case is still missing (=E2=80=98!=E2=80=99 means Dired prompt called on the marked file, and =E2=80=98$=E2=80=99 is the corresponding shell command): 1. ? ! cat ? $ cat marked ! cat ./? Confirm--do you mean to use =E2=80=98?=E2=80=99 as a wildcard? (y or = n) y $ cat ./? marked ! cat ?"" Confirm--do you mean to use =E2=80=98?=E2=80=99 as a wildcard? (y or = n) y $ cat ? marked ! cat '?' Confirm--do you mean to use =E2=80=98?=E2=80=99 as a wildcard? (y or = n) y $ cat '?' marked cat: '?': No such file or directory ! cat ./`?` $ cat ./marked 2. * ! cat * $ cat marked ! cat ./* Confirm--do you mean to use =E2=80=98*=E2=80=99 as a wildcard? (y or = n) y $ cat ./* marked ! cat *"" Confirm--do you mean to use =E2=80=98*=E2=80=99 as a wildcard? (y or = n) y $ cat * marked ! cat '*' Confirm--do you mean to use =E2=80=98*=E2=80=99 as a wildcard? (y or = n) y $ cat '*' marked cat: '*': No such file or directory Now the missing case - how to do the same that =E2=80=98cat ./`?`=E2=80=99= does, i.e. how to substitute =E2=80=98*=E2=80=99 by marked files in such Dired = prompt: ! cat ./`*` Confirm--do you mean to use =E2=80=98*=E2=80=99 as a wildcard? (y or = n) y $ cat ./`*` marked /bin/bash: marked: command not found cat: ./: Is a directory Why can't it run this shell command: $ cat ./marked