GNU bug report logs - #29465
25.3; Confusing message for dired-do-shell-command substitution

Previous Next

Package: emacs;

Reported by: Allen Li <vianchielfaura <at> gmail.com>

Date: Mon, 27 Nov 2017 07:18:02 UTC

Severity: minor

Found in version 25.3

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Allen Li <vianchielfaura <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.3; Confusing message for dired-do-shell-command substitution
Date: Sun, 26 Nov 2017 23:16:59 -0800
When you use * or ? in dired-do-shell-command without the intent for
Dired to replace it,  you are prompted with

  Confirm--do you mean to use `*' as a wildcard?

This message is confusing, because there are lots of ways for * to be
passed to the shell without globbing.  I am also more familiar with
the term globbing than wildcard, which makes it doubly confusing, for
example if I run

  find ? -name '*.txt'

I get the message:

  Confirm--do you mean to use `*' as a wildcard?

What the question is really asking is, should * be passed to the shell
directly, as whether or not it is interpreted as a glob is determined
by the shell and the quoting rules in question.

I think this confirmation message should be removed entirely.

1. The edge case that it is trying to protect against is not very common.
2. There is no reasonable behavior that the user could expect from
this edge case.
3. The documentation string clearly describes how * and ? are interpreted.
4. The confirmation message is not very informative and is possible misleading.
5. This confirmation message shows up every time an advanced user
wants to run any command containing * or ?, e.g. for find, grep, sed,
or many other tools.
6. The confirmation message is not even shown consistently.  For
example it is shown for

  find ? -name '*.txt'

but not for

  find * -name '*.txt'

Thus, it isn't even useful for protecting against some hypothetical
unwanted behavior.

In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.19)
 of 2017-09-16 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'




This bug report was last modified 3 years and 120 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.