GNU bug report logs - #47432
28.0.50; Dired using ! or & on file should fail without command supplied

Previous Next

Package: emacs;

Reported by: Jean Louis <bugs <at> gnu.support>

Date: Sat, 27 Mar 2021 07:14:01 UTC

Severity: wishlist

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jean Louis <bugs <at> gnu.support>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 47432 <at> debbugs.gnu.org
Subject: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied
Date: Mon, 29 Mar 2021 21:34:47 +0300
* Lars Ingebrigtsen <larsi <at> gnus.org> [2021-03-28 17:04]:
> Jean Louis <bugs <at> gnu.support> writes:
> 
> > In Dired, when using ! or & on a file, it should file if there is no
> > command supplied.
> >
> > This is what happens if I use ! on file ~/.asoundrc but without
> > supplying command, just pressing RET:
> >
> > /bin/bash: line 1: .asoundrc: command not found
> >
> > But it should not, if command is not supplied in:
> > (dired-do-shell-command COMMAND &optional ARG FILE-LIST) -- then it
> > shall rather silently fail or tell "Command not entered" or nothing to
> > do.
> 
> I think that would be a bit odd.  But I see that the doc string doesn't
> explicitly say that happens here, so I've added the following sentence
> to the doc string in Emacs 28:
> 
> ----
> When executing, FILE-LIST is appended to the COMMAND string.
> ----
> 
> And that's what happening here -- COMMAND is "", and FILE-LIST is
> appended to that, and then executed.

Yes, as documentation and functionality should be in alignment.

Please tell me why is that useful to append the file list when there
is no command?

For example if I run ! on marked directories:

/usr/bin/bash: line 1: admin_Leo: command not found
/usr/bin/bash: line 1: babel-6KitXT: command not found
/usr/bin/bash: line 1: babel-cyz28q: command not found
/usr/bin/bash: line 1: babel-YJWc0L: command not found
/usr/bin/bash: line 1: babel-ZlWVex: command not found
/usr/bin/bash: line 1: backup: command not found
C-x C-g is undefined

I would like to know how is that useful.

Thanks,
Jean Louis

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns





This bug report was last modified 4 years and 53 days ago.

Previous Next


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