From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied Date: Mon, 29 Mar 2021 22:23:49 +0300 Message-ID: <83eefxlq62.fsf@gnu.org> References: <86sg4hnkdo.fsf@protected.rcdrun.com> <83czvjofw1.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35422"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47432@debbugs.gnu.org, larsi@gnus.org, arthur.miller@live.com To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 29 21:24:19 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQxUo-00096q-9X for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Mar 2021 21:24:18 +0200 Original-Received: from localhost ([::1]:46630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQxUn-0006XB-AJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 29 Mar 2021 15:24:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQxUY-0006Wz-Ab for bug-gnu-emacs@gnu.org; Mon, 29 Mar 2021 15:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQxUX-0005fs-Sw for bug-gnu-emacs@gnu.org; Mon, 29 Mar 2021 15:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQxUX-0003cU-Ok for bug-gnu-emacs@gnu.org; Mon, 29 Mar 2021 15:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Mar 2021 19:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47432 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 47432-submit@debbugs.gnu.org id=B47432.161704583713904 (code B ref 47432); Mon, 29 Mar 2021 19:24:01 +0000 Original-Received: (at 47432) by debbugs.gnu.org; 29 Mar 2021 19:23:57 +0000 Original-Received: from localhost ([127.0.0.1]:49676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQxUN-0003c5-Pb for submit@debbugs.gnu.org; Mon, 29 Mar 2021 15:23:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQxUI-0003bp-TI for 47432@debbugs.gnu.org; Mon, 29 Mar 2021 15:23:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50482) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQxUC-0005Wa-Te; Mon, 29 Mar 2021 15:23:40 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1889 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lQxUC-0007kT-Cn; Mon, 29 Mar 2021 15:23:40 -0400 In-Reply-To: (message from Jean Louis on Mon, 29 Mar 2021 21:51:41 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203269 Archived-At: > Date: Mon, 29 Mar 2021 21:51:41 +0300 > From: Jean Louis > Cc: arthur.miller@live.com, 47432@debbugs.gnu.org, > Lars Ingebrigtsen > > 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.