From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29465: 25.3; Confusing message for dired-do-shell-command substitution Date: Tue, 28 Nov 2017 18:26:52 +0200 Message-ID: <83609u5pyr.fsf@gnu.org> References: <83vahv67eb.fsf@gnu.org> <87fu8zukmb.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1511886499 30798 195.159.176.226 (28 Nov 2017 16:28:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Nov 2017 16:28:19 +0000 (UTC) Cc: 29465@debbugs.gnu.org, tino.calancha@gmail.com To: Allen Li Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 28 17:28:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJijv-000769-E3 for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Nov 2017 17:28:07 +0100 Original-Received: from localhost ([::1]:38786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJik0-0004G9-Vq for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Nov 2017 11:28:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJijt-0004El-Oh for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 11:28:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJijq-00088C-Kv for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 11:28:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54374) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJijq-000886-Gg for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 11:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eJijq-0000m6-Ad for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 11:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Nov 2017 16:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29465 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29465-submit@debbugs.gnu.org id=B29465.15118864322917 (code B ref 29465); Tue, 28 Nov 2017 16:28:02 +0000 Original-Received: (at 29465) by debbugs.gnu.org; 28 Nov 2017 16:27:12 +0000 Original-Received: from localhost ([127.0.0.1]:34822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJij0-0000kx-PT for submit@debbugs.gnu.org; Tue, 28 Nov 2017 11:27:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJiiz-0000km-AF for 29465@debbugs.gnu.org; Tue, 28 Nov 2017 11:27:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJiiq-0007v9-P6 for 29465@debbugs.gnu.org; Tue, 28 Nov 2017 11:27:04 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJiiq-0007uz-Ls; Tue, 28 Nov 2017 11:27:00 -0500 Original-Received: from [176.228.60.248] (port=3144 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eJiiq-0008KF-0R; Tue, 28 Nov 2017 11:27:00 -0500 In-reply-to: (message from Allen Li on Tue, 28 Nov 2017 00:25:17 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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:140489 Archived-At: > From: Allen Li > Date: Tue, 28 Nov 2017 00:25:17 -0800 > Cc: 29465@debbugs.gnu.org, Eli Zaretskii , rms@gnu.org > > Since your commit fixes the inconsistency problem, that's one less > reason for my advocating to remove the confirmation. If we can make > the message less confusing and add an option to disable the prompt, I > would be happy. I think clarifying the prompt and adding an option is indeed the way forward. > However, I think writing a useful confirmation prompt for this is > hard; hopefully someone has a good idea. > > One idea would be what Eli suggested: > > Are you sure you want `*' to be passed to the shell? > > However, what if the command contains both `*' and `?'? Then the prompt should say that: Are you sure you want `*' and `?' to be passed to the shell? > Since I was not confident that a good message could be written, I > suggested removing the confirmation. I think we should try to make the prompt more clear, it cannot be that hard. Removing the prompt will introduce backward incompatibility with what Emacs was doing for the past 15 years, so it's a worse alternative, IMO. > Also, I am not sure what this is supposed to be protecting against. > It seems more useful to confirm when dired-do-shell-command is going > to replace * or ? rather than when it is not. If the user did not > read the documentation string, the user would most likely expect these > characters to be passed to the shell. If the user did read the > documentation string, the prompt would only be an annoyance. > > The original commit by RMS (eab9ed67eb50bab4fc736058a799508d544606a0) > does not provide a reason for the confirmation. You need to look up relevant discussions on Emacs mailing lists around the date of the commit. In this case, read this thread: http://lists.gnu.org/archive/html/emacs-devel/2002-01/msg00233.html and also the original bug report and its followups: http://lists.gnu.org/archive/html/bug-gnu-emacs/2002-01/msg00230.html > If I were to hazard a guess, the behavior of the command was > changed, so the prompt was added to warn users accustomed to the old > behavior. No, it was a bug report about a potentially risky feature, where a user mistyping a command could have their files wiped out or cause some other grave accident. > However, it is now 15 years since; I don’t think there’s any value > keeping the confirmation around for its original (?) purpose. The syntax of the shell commands supported by dired-do-shell-command and its features regarding '*' and '?' are still very complicated, as they were back then. Just the doc string describing the behavior is so long it can scare. So I don't see how the time that has passed is of relevance here.