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


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jean Louis <bugs <at> gnu.support>
Cc: 47432 <at> debbugs.gnu.org, larsi <at> gnus.org, arthur.miller <at> live.com
Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail
 without command supplied
Date: Mon, 29 Mar 2021 22:23:49 +0300
> Date: Mon, 29 Mar 2021 21:51:41 +0300
> From: Jean Louis <bugs <at> gnu.support>
> Cc: arthur.miller <at> live.com, 47432 <at> debbugs.gnu.org,
>   Lars Ingebrigtsen <larsi <at> gnus.org>
> 
> Let me give you more from researching how it works:
> 
> - if there is script.pl or script.sh, then ! or & will verify for
>   executable bit, and execute it only if set; BUT it is not executing
>   THE FILE which is marked!
> 
>   Replicate it by putting one non-executable script.sh in your PATH
>   and going to directory that is not in your path that has executable
>   script.sh in that path, do ! or & on that command.
> 
>   script.sh:
> 
>   #!/bin/bash
>   echo Hello, it worked
> 
>   ---- 
>   put same script in your PATH, like maybe ~/bin/script.sh and make it
>   non-executable.
> 
>   put same file, but executable in other directory ~/tmp/script.sh
> 
>   go with Dired to ~/tmp/script.sh as it is executable, so do ! or &
>   and it will try to execute which file?
> 
>   Definitely not ~/tmp/script.sh but it will try to execute
>   "script.sh" in PATH.
> 
> So think about that, there is no logic that FILE-LIST is appended to
> empty COMMAND like "" as that FILE-LIST is not getting executed
> really, so it is misleading the user.

You are again assigning the shell commands the logic and features of a
typical Posix shell.  But that's just one possible type of shell, and
one possible type of logic.  Emacs leaves it to the user to do what
the user wants, while you suggest that Emacs assumes something about
the shell and the semantics of what the user intends to do.




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.