From unknown Fri Jun 20 05:29:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#47432 <47432@debbugs.gnu.org> To: bug#47432 <47432@debbugs.gnu.org> Subject: Status: 28.0.50; Dired using ! or & on file should fail without command supplied Reply-To: bug#47432 <47432@debbugs.gnu.org> Date: Fri, 20 Jun 2025 12:29:12 +0000 retitle 47432 28.0.50; Dired using ! or & on file should fail without comma= nd supplied reassign 47432 emacs submitter 47432 Jean Louis severity 47432 wishlist tag 47432 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 27 03:13:43 2021 Received: (at submit) by debbugs.gnu.org; 27 Mar 2021 07:13:43 +0000 Received: from localhost ([127.0.0.1]:43311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ38h-0003Mk-8E for submit@debbugs.gnu.org; Sat, 27 Mar 2021 03:13:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:49228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ38d-0003MZ-UK for submit@debbugs.gnu.org; Sat, 27 Mar 2021 03:13:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQ38d-000106-PE for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 03:13:39 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:33637) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQ38b-0002AS-Uf for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 03:13:39 -0400 Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E082.00000000605EDAFF.000077E9; Sat, 27 Mar 2021 00:13:02 -0700 From: Jean Louis To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Dired using ! or & on file should fail without command supplied Date: Sat, 27 Mar 2021 10:09:07 +0300 Message-ID: <86sg4hnkdo.fsf@protected.rcdrun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=217.170.207.13; envelope-from=admin@protected.rcdrun.com; helo=stw1.rcdrun.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) 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. Same for (dired-do-async-shell-command COMMAND &optional ARG FILE-LIST) In GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo versio= n 1.17.4, Xaw scroll bars) of 2021-03-22 built on protected.rcdrun.com Repository revision: cb5d1fe1aa9f280d60fcb33b58fc83ace3d95081 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 Configured using: 'configure --with-x-toolkit=3Dlucid' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM LUCID ZLIB Important settings: value of $LC_ALL: en_US.UTF-8 value of $LANG: de_DE.UTF-8 value of $XMODIFIERS: @im=3Dexwm-xim locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils shell pcomplete comint ansi-color ring dired-aux cl-loaddefs cl-lib dired dired-loaddefs iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 69609 8322) (symbols 48 7679 0) (strings 32 22446 2230) (string-bytes 1 727018) (vectors 16 14870) (vector-slots 8 197548 10923) (floats 8 23 36) (intervals 56 2480 0) (buffers 992 13)) --=20 Thanks, Jean Louis =E2=8E=94 =CE=BB =F0=9F=84=AF =F0=9D=8D=84 =F0=9D=8C=A1 =F0=9D=8C=9A From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 27 03:51:50 2021 Received: (at 47432) by debbugs.gnu.org; 27 Mar 2021 07:51:50 +0000 Received: from localhost ([127.0.0.1]:43342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ3jZ-0004MB-Im for submit@debbugs.gnu.org; Sat, 27 Mar 2021 03:51:49 -0400 Received: from mail-oln040092067060.outbound.protection.outlook.com ([40.92.67.60]:40974 helo=EUR02-AM5-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ3jX-0004Lx-EO for 47432@debbugs.gnu.org; Sat, 27 Mar 2021 03:51:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ocVk9d4J9TNCgwtzT1V0gZo2UUQzLm9OKSyWDI7sRuLZ1jW2cQMSBTnHSYfi0HCmrTWRxyBgIsPHtqHJAQt+sje/P2f5SzkejzZz0iIMCwv3RVktm4IdSEmiP1RqPu1Pu8iAoSSK+lW2KgP2d1YjpnHbnIZsg0j4DCbPLZwVc7kgNVfAm/O97NWfTHXaR7ppwhZAJCT8hnYJIy9naIbB2UQQ6/BmtuoVzY2EWtwjG1SjgRHHgeeT11YCEHdGu3SH8wDCGcue4JTQbwvcGw0de7oRxSyoYzaXgeqEQpW96UwgGHPpaKa5/DmzTA09FoENfLtoM7Bnr3z3Ygfndm/eaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tLR0d6dsixAL9Hs6G4b6HbztGChIwPQJOhSdU4nLFr8=; b=Wspf7mSJtruWptla6+g7mSt0d3Idq9QGbDLdrqdTXPXzVH544HoSzBN6baghMucVnIyaRitr5gy05lfqJ57OGDw4Dc3wxFO9HslwITfDqqXW/7tS/ygO0o06KxrJxvKJQI1rMsWOYkEDVMko4b6jsC1rjC4rTIThaLk7/+hhb22AqSVkM4NPtJqgjZzIscF3Wmw3i9WAN6g8ZXEDbNcLGTTMSKE6ybRvJDdBSzZVGMbUSYjHdJIntjTohc39NA4V5S/nuxHwxUMwrm9gzJTLFuzzijRwnz75RPUa0RS1/eaQzvYFld/yookdRKWZuFHXp9d3O5tGbKCQBfmnxnEN8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tLR0d6dsixAL9Hs6G4b6HbztGChIwPQJOhSdU4nLFr8=; b=V9qIgazCmkuDdBoet6GmoyD65AJ9dYHMMv7TfYICbrrjV8r4BNNCbNFH2jOfDevYPHfPpor2WorCmYXEU6j9Gmy75uqQ+OtUeCnZX/Jpq00JjOMqp3dls3QZ4dyFq5HPWjr0/oF5+cSLQfQtsqAT/YJoijGASOhEC5b8+zoSyYW9aKDG1+E36/JIMtL8nz2AHDeLAArHY4+3z8OMY2t/fOAR/0ubT7VQvo8fvfDaUfESyWGJw3sLsppxV6kgs7GK2GbZ9etOoPD31rLI+oUCm9M8IVVLPz6F89lwzZ5wssuk6RZpjLLkTMIzTvmw3AtYgSR5amrTekJ4zt+W9upAkQ== Received: from HE1EUR02FT020.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1d::49) by HE1EUR02HT103.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1d::316) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.29; Sat, 27 Mar 2021 07:51:40 +0000 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e1d::49) by HE1EUR02FT020.mail.protection.outlook.com (2a01:111:e400:7e1d::142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Sat, 27 Mar 2021 07:51:40 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:4606D1DAA6FE6BD8C641E563FA7AB833C519719E2C09B7AB01FD2D00E9D73D31; UpperCasedChecksum:D13BBC5D7B605A6B6F1978C20C3E362B7E97B3C795A02C887C5F7957F359864C; SizeAsReceived:7443; Count:46 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b%6]) with mapi id 15.20.3977.031; Sat, 27 Mar 2021 07:51:40 +0000 From: Arthur Miller To: Jean Louis Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied References: <86sg4hnkdo.fsf@protected.rcdrun.com> Date: Sat, 27 Mar 2021 08:51:39 +0100 In-Reply-To: <86sg4hnkdo.fsf@protected.rcdrun.com> (Jean Louis's message of "Sat, 27 Mar 2021 10:09:07 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [0EzeEwANJLx05s2fAISoFaHrlW0Koq8/] X-ClientProxiedBy: AM6PR0502CA0043.eurprd05.prod.outlook.com (2603:10a6:20b:56::20) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87h7kxc9v8.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pascal.homepc (90.230.29.56) by AM6PR0502CA0043.eurprd05.prod.outlook.com (2603:10a6:20b:56::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24 via Frontend Transport; Sat, 27 Mar 2021 07:51:39 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: a0864f94-d256-45f0-d6d4-08d8f0f527e3 X-MS-TrafficTypeDiagnostic: HE1EUR02HT103: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a3WxRXDsIE8S3w5LuKRFAo/w8kNcf8eez2WBBJ/eHKMuKHfWrwMfmQCVL3dCHhko/Kk8MDO+iAUexhnjNPut2VAw+oIclQd4l3FaIWn8iyKW6M8JLLhkThTlCZ/UpdyEopPA/kJQpA39iaBmimm/lozcrAeN/RnibBqH5YC3NZKFpdSe7I512Nf3WgP9ZvCkKGrGUs8JgBz+sryvca7gGqwbHxFjkcXjaKno67jtci1bQXCd2Is4HJKGypAn1I8g48kAs1SqXTN1Q+AuxWRpfUWV37qJAnPzqIKsP9Jr1NAvzUqfm8Ni2nWRi58Ify03j6jJ89P63nfpXTuQmNIhF+tl4fo6p0dJPIeoRMQwUmC/bFiPuAuKY9VgfOjMO6UuR8zAdAoPQCV6D+Ws4D9ViQ== X-MS-Exchange-AntiSpam-MessageData: OO/NtiHI83yxqJkhj7vCJ9w9FKHU2LVpg3xvxqzt9kZiawsyrFuyFaCwC2vzV8SCo3sDQ0JkHrvn1cb9nR+qONKOqY6pvcLRd7AzKdey4om5OrnI+CYJBEXy8hic2ziJhMWNeyUxz3ibr8ofNZp4IQ== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0864f94-d256-45f0-d6d4-08d8f0f527e3 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2021 07:51:40.2888 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR02FT020.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT103 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Jean Louis 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. Why is "Command not entered" to prefer to "Command not found"? Message as a message .... > > Same for (dired-do-async-shell-command COMMAND &optional ARG FILE-LIST) > > > > > > In GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.4, Xaw scroll bars) > of 2021-03-22 built on protected.rcdrun.com > Repository revision: cb5d1fe1aa9f280d60fcb33b58fc83ace3d95081 > Repository branch: master > Windowing system distributor 'The X.Org Foundation', version 11.0.12010000 > Configured using: > 'configure --with-x-toolkit=lucid' > > Configured features: > ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG > JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY > PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM > LUCID ZLIB > > Important settings: > value of $LC_ALL: en_US.UTF-8 > value of $LANG: de_DE.UTF-8 > value of $XMODIFIERS: @im=exwm-xim > locale-coding-system: utf-8-unix > > Major mode: Dired by name > > Minor modes in effect: > shell-dirtrack-mode: t > tooltip-mode: t > global-eldoc-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > buffer-read-only: t > line-number-mode: t > transient-mark-mode: t > > Load-path shadows: > None found. > > Features: > (shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa > derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq > eieio eieio-core cl-macs eieio-loaddefs password-cache json map > text-property-search time-date subr-x seq byte-opt gv bytecomp > byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 > mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums > mm-util mail-prsvr mail-utils shell pcomplete comint ansi-color ring > dired-aux cl-loaddefs cl-lib dired dired-loaddefs iso-transl tooltip > eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel > term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image > regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode > lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch > easymenu timer select scroll-bar mouse jit-lock font-lock syntax > font-core term/tty-colors frame minibuffer cl-generic cham georgian > utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean > japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european > ethiopic indian cyrillic chinese composite charscript charprop > case-table epa-hook jka-cmpr-hook help simple abbrev obarray > cl-preloaded nadvice button loaddefs faces cus-face macroexp files > window text-properties overlay sha1 md5 base64 format env code-pages > mule custom widget hashtable-print-readable backquote threads dbusbind > inotify lcms2 dynamic-setting system-font-setting font-render-setting > cairo x-toolkit x multi-tty make-network-process emacs) > > Memory information: > ((conses 16 69609 8322) > (symbols 48 7679 0) > (strings 32 22446 2230) > (string-bytes 1 727018) > (vectors 16 14870) > (vector-slots 8 197548 10923) > (floats 8 23 36) > (intervals 56 2480 0) > (buffers 992 13)) From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 27 04:43:13 2021 Received: (at 47432) by debbugs.gnu.org; 27 Mar 2021 08:43:13 +0000 Received: from localhost ([127.0.0.1]:43395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ4XJ-0007jF-FG for submit@debbugs.gnu.org; Sat, 27 Mar 2021 04:43:13 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:45877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ4XG-0007iz-Qc for 47432@debbugs.gnu.org; Sat, 27 Mar 2021 04:43:11 -0400 Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E0AB.00000000605EF017.000002DE; Sat, 27 Mar 2021 01:43:02 -0700 Date: Sat, 27 Mar 2021 11:42:17 +0300 From: Jean Louis To: Arthur Miller Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied Message-ID: References: <86sg4hnkdo.fsf@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.6 (2021-03-06) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * Arthur Miller [2021-03-27 10:52]: > Jean Louis 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. > > Why is "Command not entered" to prefer to "Command not found"? It is meant as example, I leave those decisions to developers. Now I can see that ! and & without command are acting on the file as the file should be executed. Let us say I have Screenshot.pl executable file, if I run ! on it, the file is executed. This means there was attempt to execute ~/.asoundrc -- I find that insecure and not logical. And I do not understand it quite how it works. Was there an attempt to execute program with bash? Why should there be attempt to execute non-executable files? From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 27 09:59:50 2021 Received: (at 47432) by debbugs.gnu.org; 27 Mar 2021 13:59:50 +0000 Received: from localhost ([127.0.0.1]:44718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ9Ti-0003HI-7G for submit@debbugs.gnu.org; Sat, 27 Mar 2021 09:59:50 -0400 Received: from mail-oln040092073068.outbound.protection.outlook.com ([40.92.73.68]:54147 helo=EUR04-HE1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ9Tf-0003H3-Mt for 47432@debbugs.gnu.org; Sat, 27 Mar 2021 09:59:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=awj6TcwcBmVwlQwH2ZILIS7SlEjSbmv58EQVW9umTz7EEDgNp+ByuG3PW76GKrtPaSX/QrJUXttRQ+sQVNl5a+Uwe00c8VRpQGdKj1Q9lOfjegXn9j31nc6DuFwwDbIdV0hqLEamTVPfaia0mntQErErF69BOONvD7Rf1ao8qjxIcaHr7rLIXFBAXQHp1L7OOq4ZqYI4evSAv3La3WKYw8rDH96E06r+ZQm+kcOJqbpccCJDeXpcrj+qsVmb6heWlzbD7D1x3SIsEly1vKXz6V4om6O9xicMs6c3BSA0+10FtVl9AuAFKDUnF/alx/KuK55U6SBZNuXXxPzkXbnU+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C4+gqMWnt1mN7688GpYZ1BPYmFeUUNl1LlrZGKPzRUM=; b=Ha76mAvjcHQ3c86TPPrEtByyA32Oky6sIRBoKHIvKnK8ox449IkrM1e1SrE15kawwEBF7d6vWoL2BQ8WSo1S9h0Kvxt8HQcoy2PJQvdaQwnAR6mFrqHuVOGnp5kcPimlln+GTac7FPeF6U1Cm+ArTO3h1RoNTk1CrlKScYKChP1fYSw9UYdQjX1r2btezHAiqAd11MrHckAFa+AVM4thO8tTLzBIdJSQy5tz10ZxzLUSluzX5UNCqzydfb4cJBt+1b0V1ocRX3diud+hXREKIGLkVsQUwmu5rmIHLeMhSE0FBMATy+ZfTMW5qOe1bhCeIy76IeXfTT4b/J01rkuo2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C4+gqMWnt1mN7688GpYZ1BPYmFeUUNl1LlrZGKPzRUM=; b=TkNxTPotS7aVqofCR3uQP+nffS/C+pIwM4Fis2y6LuFFdOhZy6W0DIP9NhSNseBWkUI80PHRu3iEAF0PCMjPDb44AKJ7n24CY0HDJlhHtf+Q7DAsAaGyerkdMQ63xJNBL6MrMCjdarHsHVRlvXT9xTcQWEtE/PParjINd8G8uhSdoSaNTxAykKYMWmKMGiop9nR7TpbGAQgl+W4nQLKz9nJp/Ex6ZC5CtlzCVUImbqzPCa3Zx9sjoCztVmBL7DNA1BNziE5uqHj4/mLFyrzWHHsoBlfmGL6Y1tGi/pDXQyrbRpdpwgDb6885EKOYdDoU4xABClA5N983zbUK8GkpBQ== Received: from HE1EUR04FT027.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::4f) by HE1EUR04HT201.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::399) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.29; Sat, 27 Mar 2021 13:59:41 +0000 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e0d::40) by HE1EUR04FT027.mail.protection.outlook.com (2a01:111:e400:7e0d::286) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Sat, 27 Mar 2021 13:59:41 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:276740E633605311D5D8F3DD47869F0CAEF30E4EEBBF6649DFAE1847A5C75162; UpperCasedChecksum:CD4E3C06B5FC38B9B693442B51641BCB182A52FF2678F36AC9913D531B45D50E; SizeAsReceived:7568; Count:46 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b%6]) with mapi id 15.20.3977.031; Sat, 27 Mar 2021 13:59:41 +0000 From: Arthur Miller To: Jean Louis Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied References: <86sg4hnkdo.fsf@protected.rcdrun.com> Date: Sat, 27 Mar 2021 14:59:40 +0100 In-Reply-To: (Jean Louis's message of "Sat, 27 Mar 2021 11:42:17 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [X4I1xd3BYCg2v0qWf9zj72KFgv8zVEJO] X-ClientProxiedBy: AS8PR04CA0094.eurprd04.prod.outlook.com (2603:10a6:20b:31e::9) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <874kgwbstv.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pascal.homepc (90.230.29.56) by AS8PR04CA0094.eurprd04.prod.outlook.com (2603:10a6:20b:31e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Sat, 27 Mar 2021 13:59:40 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8ac1cabc-c088-492c-b07c-08d8f12890fb X-MS-TrafficTypeDiagnostic: HE1EUR04HT201: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g4RblOjgbbRYNemsXKUYnjfymXxEBI54BIr2J7LkJbCQTeVlJW05dxk5sDcKBKskpRw3Nf240qWncaDtOeJS/haasLi/pw0myRJQ0I4+vkT1lOaxAY8gCTBS5UdtoNh3paTv3BxnRZSlrmE23uCiLb1H5O4yWZxEgwcr2NHArk5Df4HOstibBY7T2ZAKyzohmcppr6DBeEALtpunCHPonskAyJvTlX3RCaCypKLDHidlpY1MYrLl901cJ73vmpq5Yo9sZ70z1GWADHcMB8S/BtohlPr0yOdV8f2uwNKkaJYyPMyz7k3UAsF6gOO/GHmkNL6pPtPFS1pMUAG9Rvxm4Z+gbN+Fuj25fckzOn68bTxmCUuvgvsoFxCf2jQG6fajS5spVRpqdhUe94xCd92mVA== X-MS-Exchange-AntiSpam-MessageData: FKQFaOQOs3RT81Pv+3aHC5/m7+4NhsD+UYKLbxfxkLPXsJhNXOux0Nh2EWVAQew8orC12qbbjueZJHo6DT1bfLS3hVFWj5gvQFgGQ1A/aARpJu8GA7kopjqP/nFrO+aAqF3MXjkwWDyR9b+H2QdfgQ== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ac1cabc-c088-492c-b07c-08d8f12890fb X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2021 13:59:41.0347 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT027.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT201 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jean Louis writes: > * Arthur Miller [2021-03-27 10:52]: >> Jean Louis 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. >> >> Why is "Command not entered" to prefer to "Command not found"? > > It is meant as example, I leave those decisions to developers. > > Now I can see that ! and & without command are acting on the file as > the file should be executed. > > Let us say I have Screenshot.pl executable file, if I run ! on it, the > file is executed. Ja. I guess there is a shebang on it so bash invoked perl interpreter and executed the file. > This means there was attempt to execute ~/.asoundrc -- I find that > insecure and not logical. Ja. Because you invoked a command that will execute a script on a file. And since file wasn't executable it failed. So why is it insecured? > And I do not understand it quite how it works. Was there an attempt to > execute program with bash? How you seen the docs? For example C-h k ! RET: Signature (dired-do-shell-command COMMAND &optional ARG FILE-LIST) Documentation Run a shell command COMMAND on the marked files. > Why should there be attempt to execute non-executable files? Because you asked it to by calling ! or & on a file in Dired. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 27 14:54:34 2021 Received: (at 47432) by debbugs.gnu.org; 27 Mar 2021 18:54:34 +0000 Received: from localhost ([127.0.0.1]:44943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQE4v-00040c-ER for submit@debbugs.gnu.org; Sat, 27 Mar 2021 14:54:34 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:35353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQE4r-00040K-T8 for 47432@debbugs.gnu.org; Sat, 27 Mar 2021 14:54:32 -0400 Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E0AB.00000000605F7F5E.00004AA8; Sat, 27 Mar 2021 11:54:21 -0700 Date: Sat, 27 Mar 2021 21:54:16 +0300 From: Jean Louis To: Arthur Miller Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied Message-ID: References: <86sg4hnkdo.fsf@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.6 (2021-03-06) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * Arthur Miller [2021-03-27 17:00]: > How you seen the docs? For example C-h k ! RET: > > Signature > (dired-do-shell-command COMMAND &optional ARG FILE-LIST) > > Documentation > Run a shell command COMMAND on the marked files. > > > > Why should there be attempt to execute non-executable files? > > Because you asked it to by calling ! or & on a file in Dired. I have got a feeling you have not get really what is taking place: 1. Dired mode 2. Come on any file or directory, not executable 3. Press ! or & 4. Press ENTER 5. Get error, it can be different, depending of situation. Like /usr/bin/bash: line 1: admin_Leo: command not found where "admin_Leo" is directory I cannot see in the documentation that ! or & in Dired is supposed to run that specific marked file as COMMAND. I can understand that command is asked and user should enter the command. But I do not see that the marked file is supposed to be executed as COMMAND when command is not manually entered by user. Why is Emacs trying to execute a directory? Why is Emacs trying to execute non-executable file? - documentation of the function should maybe reflect that ! or & is meant to execute the marked file or current file in Dired if no COMMAND is supplied manually. - Emacs should stop trying to execute directories or non executable files. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 27 16:28:45 2021 Received: (at 47432) by debbugs.gnu.org; 27 Mar 2021 20:28:45 +0000 Received: from localhost ([127.0.0.1]:45018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQFY4-0000CU-Ka for submit@debbugs.gnu.org; Sat, 27 Mar 2021 16:28:45 -0400 Received: from mail-oln040092074062.outbound.protection.outlook.com ([40.92.74.62]:48110 helo=EUR04-DB3-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQFXz-0000CD-QW for 47432@debbugs.gnu.org; Sat, 27 Mar 2021 16:28:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h5Or85Fgg9/J3b6MYdSNPtPed/NAAXtsU2EFekKbbzcF7ykWKRnxCftFPthrmIkiFYczXTl37O+jfItKLLBE0sxyN1icEtzKREFWacuscVZUaXkgrN20/ns3xSsqye0/ay0GCV35ecDQjoObvz3RFxoUWfiqF1l9DzqD+iAprq923xxFvtOPTVfxYNg4GpD1fETblCBWesZ4ssepamU2RhRP/QMK7eoHR93kx1XAtkgc4JPuMzRCA1UpnFosxGtrX3ZCcw5L/BMCpuCJ+P+V+eNbrgV5obUh6RI4jgHLwvdUybs5gv+gzf2Mje3fIHMTt//02qmMaE3AYw4khswyJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7FcNycBED2YaIQj+3sY8AnBBCbJazVZJsleIDu1sVqQ=; b=WUBRjZCSCcsBPP90R/eZ4OqY9XKye/wtu7YSoJ+rXPA6hU1V0GZMC4Zdbf3f1CBoboOcn57kDGNKDjoDVs5xD/CPE7cmfyAZyUEXn1HNC4J7Sik3ExUIREbzIEA7bDFcXCshKaxSIkGabqotXSiQMmTU2AAC4EfisZa5E2emrFNb3Dvfc/rW9+M5q1u4MV1hmAsXPmva5xoJ4q+YzZrdlJEQTJrZX0rzoaAC+zgGhZvFPb+EkBZmBtLSs7l2PJV7JtpsCSjEebPUrEsBAe01NwIxVlKpF98Zs3LyUHO/r/zXXJsvjbefyQw4d4kYAJqSCa4ozYwu30ayqvSb9FGFAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7FcNycBED2YaIQj+3sY8AnBBCbJazVZJsleIDu1sVqQ=; b=lHQjCCKLDnwuZGy8RsCZ2IQmgSCA/pz9hqE79TzxjUFqvg6nL74yl5qRvRdOfWLPcpOOWJT06Dd5oRI+StMqhzVK4N3FtHL6Ub5dvTqya5376Hp2LXUY0fGgN2dhGOkK862vMqs6NinzmczLOp4uqvV48PX/JunshhiAG/WYFLFwECRFN9j0sbMUenKdNXkavO9mQrkGE3OCx7fO3am6QIQKIB+ZNSXn80EsnXhOduN+9750urkl35MwqUBRQYCiuE/4xHODymXmL4/RZZ/lEYDx+DZqRj8WjEZdqLKF5ilumterTVAzkQp4K379aBmDQ2zRm0ouEncglk5nWbeSgw== Received: from DB3EUR04FT010.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::51) by DB3EUR04HT038.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25; Sat, 27 Mar 2021 20:28:32 +0000 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e0c::49) by DB3EUR04FT010.mail.protection.outlook.com (2a01:111:e400:7e0c::146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Sat, 27 Mar 2021 20:28:32 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:50DFC0CF0FDEE677F481DBABE37D9E27D21546B5B3EFDCAD875526E0F3574572; UpperCasedChecksum:C557A4D5C57E6C1F584A093958A004BFB568364B6CE2E611184D55BE8E643D61; SizeAsReceived:7692; Count:46 Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b%6]) with mapi id 15.20.3977.032; Sat, 27 Mar 2021 20:28:32 +0000 From: Arthur Miller To: Jean Louis Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied References: <86sg4hnkdo.fsf@protected.rcdrun.com> Date: Sat, 27 Mar 2021 21:28:31 +0100 In-Reply-To: (Jean Louis's message of "Sat, 27 Mar 2021 21:54:16 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [aJyrldKKHBJv92Ld65NPuPc160ffNYhO] X-ClientProxiedBy: AM6P193CA0077.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::18) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87eeg01guo.fsf@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pascal.homepc (90.230.29.56) by AM6P193CA0077.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24 via Frontend Transport; Sat, 27 Mar 2021 20:28:32 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 12a775ba-0482-46ea-e043-08d8f15ee3dc X-MS-TrafficTypeDiagnostic: DB3EUR04HT038: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7zwib56Km4R8Nz2a2/ePAN7OtEQNHyQIcPosjvSPhJG8Re0JVrwuJxfUv93athfI3ZMHbenh6yFViUViGrY7jq3DAPBj6/R9/Ku7mYtu47NmMFdRxjYqc5WG9CHB8oGvq1HkQuiqp5JI2oTil1OAJ7gB3dMaZQTTiUwNwaQOcodfAnjfxb9b8dU7wSylm5aA9m/k8nw81d6M1KAjnR3hZGvZkY2e06s1tlVpkI0jDSrkFfCuFyGrI/9gd5FF7ygi6V0zk3o5cQnPns+k4hI31Q/Eug/71H30Oa2H3OmOGtG1wAfZvOrxVk6oJ2uzhnPaEFMmMke1eaq6xEGIPwxK+DKXxOsb+tySu4iZQOB/WORJU1ZfgpgDNIORFJ1ORXGsjllozOdhpGim5JIO1e5Wbw== X-MS-Exchange-AntiSpam-MessageData: secReWCYzBn6/pZKee3jUn6Y3d9B7XbAaqlo/8pj0B7gssB6UEoK+FU+LCbmGm5azRai9ztCrogN5oAYMVQjx/qcY6qWAJCEN62XVJJg+JaJhp3/dXoS2xIfZ7zhMOfN2i1FuGhJ4IdsBHQfPVeU0w== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12a775ba-0482-46ea-e043-08d8f15ee3dc X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2021 20:28:32.7776 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB3EUR04FT010.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3EUR04HT038 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jean Louis writes: > * Arthur Miller [2021-03-27 17:00]: >> How you seen the docs? For example C-h k ! RET: >> >> Signature >> (dired-do-shell-command COMMAND &optional ARG FILE-LIST) >> >> Documentation >> Run a shell command COMMAND on the marked files. >> >> >> > Why should there be attempt to execute non-executable files? >> >> Because you asked it to by calling ! or & on a file in Dired. > > I have got a feeling you have not get really what is taking place: > > 1. Dired mode > 2. Come on any file or directory, not executable > 3. Press ! or & > 4. Press ENTER > 5. Get error, it can be different, depending of situation. Like > /usr/bin/bash: line 1: admin_Leo: command not found where "admin_Leo" > is directory > > I cannot see in the documentation that ! or & in Dired is supposed to > run that specific marked file as COMMAND. I can understand that > command is asked and user should enter the command. But I do not see > that the marked file is supposed to be executed as COMMAND when > command is not manually entered by user. > > Why is Emacs trying to execute a directory? > > Why is Emacs trying to execute non-executable file? > > - documentation of the function should maybe reflect that ! or & is > meant to execute the marked file or current file in Dired if no > COMMAND is supplied manually. > > - Emacs should stop trying to execute directories or non executable > files. Emacs is not executing them, Emacs is passing them to the shell. Same happends as if you tried to execute that file from the command prompt. If you don't supply a COMMAND it just passes entire list to shell and shell tries to execute the first file in the list. If there is a shebang in that file it will get executed in proper interpretter. If not shell will repport you an error. Would you try to execute your admin_Leo in terminal? Guess not. So why would you try in Dired? You are asking it to do stuff that shell already does. Emacs can probably implement shell functionality on it's own, but I guess it was simplicity of implementation in that case. Doing extra checks would save one process invocation, but does it really matter in this case? From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 03:54:33 2021 Received: (at 47432) by debbugs.gnu.org; 28 Mar 2021 07:54:33 +0000 Received: from localhost ([127.0.0.1]:45368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQQFl-0000m4-EV for submit@debbugs.gnu.org; Sun, 28 Mar 2021 03:54:33 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:60481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQQFh-0000lq-Vs for 47432@debbugs.gnu.org; Sun, 28 Mar 2021 03:54:32 -0400 Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E082.000000006060362E.0000182E; Sun, 28 Mar 2021 00:54:22 -0700 Date: Sun, 28 Mar 2021 10:50:37 +0300 From: Jean Louis To: Arthur Miller Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied Message-ID: References: <86sg4hnkdo.fsf@protected.rcdrun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.0.6 (2021-03-06) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * Arthur Miller [2021-03-27 23:29]: > Emacs is not executing them, Emacs is passing them to the shell. Same > happends as if you tried to execute that file from the command > prompt. Maybe in your opinion, not that I have same opinion, look: In Emacs, I press ! because I wish to write a command to be executed on the file, not to execute empty command which I did not write. When I press RET without entering command, I expect nothing to happen. As in shell when I press RET after prompt, nothing happens. $ RET $ In Dired, if cursor is positioned on directory "admin_leo", the prompt says: ! on admin_leo: Even the prompt is pointing to direction that command is to be executed on the file "admin_leo". If I press RET without entering any command, why is there an error? It should not be there. > If you don't supply a COMMAND it just passes entire list to shell > and shell tries to execute the first file in the list. If there is a > shebang in that file it will get executed in proper interpretter. If > not shell will repport you an error. Would you try to execute your > admin_Leo in terminal? Guess not. So why would you try in Dired? That is your opinion that I have "tried executing admin_Leo" in terminal, not that I share it. In my opinion that is a bug: - description of function does not say that empty RET should be considered "COMMAND", there is no mentioning (I could miss it maybe) that file itself will be executed; - info manual does not reflect that what you are speaking. It says: "The Dired command ‘!’ (‘dired-do-shell-command’) reads a shell command string in the minibuffer, and runs that shell command on one or more files." Now if I press RET instead of providing "command string in the minibuffer" what is supposed to happen? I don't think there should be nonsensical error to the user. >From manual: File: emacs.info, Node: Shell Commands in Dired, Next: Transforming File Names, Prev: Operating on Files, Up: Dired 30.8 Shell Commands in Dired ============================ The Dired command ‘!’ (‘dired-do-shell-command’) reads a shell command string in the minibuffer, and runs that shell command on one or more files. The files that the shell command operates on are determined in the usual way for Dired commands (*note Operating on Files::). The command ‘X’ is a synonym for ‘!’. If I press in this mail-mode buffer M-! I am invited to enter string that will be executed as shell command, if I then press RET, I get message: (Shell command succeeded with no output) -- this is also wrong in my opinion, as if I have not entered any command, it should not say "Shell command succeeded" -- rather, "No shell command supplied." -- as trying to execute empty string as command does not make sense. When I press M-& in mail-mode buffer (or other but dired), and I press RET, I get message like: ": finished." -- which is also incorrect message, it also means nothing specific. It does not help user. It is confusing. What means colon in this space and how is colon finished? It is bug as if there was no command supplied message should say something like "No command supplied." In Dired if I press RET after !, without supplying command, it should say something like "No command supplied.". If it is expected to run the file where cursors is located, than this shall be reflected in the manual, I do not see that fact, but I can see that I can do ! on executable file and run that file this way. However, manual and function should be aligned in its descriptions. However, why should ! or & in Dired try to execute non-executable file, they shall verify if it is directory, if no command was supplied, they should not try to execute directory name as shell command. There shall be conditions before trying to do the impossible, so that user get proper message. Does it matter? Yes it does matter for quality of interaction. Jean From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 04:13:07 2021 Received: (at 47432) by debbugs.gnu.org; 28 Mar 2021 08:13:07 +0000 Received: from localhost ([127.0.0.1]:45372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQQXj-0001Ch-7V for submit@debbugs.gnu.org; Sun, 28 Mar 2021 04:13:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQQXg-0001CC-7d for 47432@debbugs.gnu.org; Sun, 28 Mar 2021 04:13:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49741) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQQXa-0006Sf-Do; Sun, 28 Mar 2021 04:12:58 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1278 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lQQXY-0000av-Qn; Sun, 28 Mar 2021 04:12:57 -0400 Date: Sun, 28 Mar 2021 11:13:02 +0300 Message-Id: <83czvjofw1.fsf@gnu.org> From: Eli Zaretskii To: Jean Louis In-Reply-To: (message from Jean Louis on Sun, 28 Mar 2021 10:50:37 +0300) Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied References: <86sg4hnkdo.fsf@protected.rcdrun.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org, arthur.miller@live.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Date: Sun, 28 Mar 2021 10:50:37 +0300 > From: Jean Louis > Cc: 47432@debbugs.gnu.org > > * Arthur Miller [2021-03-27 23:29]: > > Emacs is not executing them, Emacs is passing them to the shell. Same > > happends as if you tried to execute that file from the command > > prompt. > > Maybe in your opinion, not that I have same opinion, look: > > In Emacs, I press ! because I wish to write a command to be executed > on the file, not to execute empty command which I did not write. When > I press RET without entering command, I expect nothing to happen. Is this expectation consistent with the documentation of '!'? Specifically, how are you sure that an empty COMMAND does nothing in the shell? > As in shell when I press RET after prompt, nothing happens. > > $ RET > $ With that shell, perhaps. But Emacs doesn't know what shell will be invoked, it depends on various factors outside of Dired's control. > - description of function does not say that empty RET should be > considered "COMMAND", there is no mentioning (I could miss it maybe) > that file itself will be executed; > > - info manual does not reflect that what you are speaking. It says: > "The Dired command ‘!’ (‘dired-do-shell-command’) reads a shell > command string in the minibuffer, and runs that shell command on one > or more files." None of the above says anything about the effect of an empty string as COMMAND. > If I press in this mail-mode buffer M-! I am invited to enter string > that will be executed as shell command, if I then press RET, I get > message: (Shell command succeeded with no output) -- this is also > wrong in my opinion, as if I have not entered any command, it should > not say "Shell command succeeded" -- rather, "No shell command > supplied." -- as trying to execute empty string as command does not > make sense. You explicitly ignore the fact that many Emacs commands provide defaults when the user just types RET? > When I press M-& in mail-mode buffer (or other but dired), and I press > RET, I get message like: ": finished." -- which is also incorrect > message, it also means nothing specific. It does not help user. It is > confusing. What means colon in this space and how is colon finished? The colon is a shell command that does nothing. I's probably explained in the manual of your shell. > However, why should ! or & in Dired try to execute non-executable > file, they shall verify if it is directory, if no command was > supplied, they should not try to execute directory name as shell > command. You are assigning certain semantics to the command arguments, but the real semantics is assigned by the shell, not by Emacs. As Arthur says, Emacs just passes the arguments to the shell. So I think your expectations, while they are true in many cases, don't have to be true always. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 10:03:44 2021 Received: (at 47432) by debbugs.gnu.org; 28 Mar 2021 14:03:45 +0000 Received: from localhost ([127.0.0.1]:46665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQW12-0001Sr-Hj for submit@debbugs.gnu.org; Sun, 28 Mar 2021 10:03:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQW10-0001Sd-Je for 47432@debbugs.gnu.org; Sun, 28 Mar 2021 10:03:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+ADaiChFyZXapGG9dlJycJQSzSMDCWBm+VemSjZwC98=; b=bxtXx0iJieCca24Gt6W9eTM+40 HEBwPqfiHisSLbDGwEw08WrbPnfIYjk1b0VvDcWDO8D8K+JOAnrgd+pikF7mVwYjVzEXgqq+f1PJ8 9ILAk1YDkvH+4oYfplwcB3wGCATxGNYSPnj+XvzqMdcmPXrPyJVqxfx5g9YmP2Vxc8d0=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQW0r-00032G-Ko; Sun, 28 Mar 2021 16:03:36 +0200 From: Lars Ingebrigtsen To: Jean Louis Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied References: <86sg4hnkdo.fsf@protected.rcdrun.com> X-Now-Playing: The Style Council's _The Complete Adventures (2)_: "The Big Boss Groove" Date: Sun, 28 Mar 2021 16:03:32 +0200 In-Reply-To: <86sg4hnkdo.fsf@protected.rcdrun.com> (Jean Louis's message of "Sat, 27 Mar 2021 10:09:07 +0300") Message-ID: <877dlrs7d7.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Jean Louis 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: > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jean Louis 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. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 10:03:49 2021 Received: (at control) by debbugs.gnu.org; 28 Mar 2021 14:03:49 +0000 Received: from localhost ([127.0.0.1]:46668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQW16-0001TB-R4 for submit@debbugs.gnu.org; Sun, 28 Mar 2021 10:03:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQW15-0001Sj-9y for control@debbugs.gnu.org; Sun, 28 Mar 2021 10:03:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=odoxVoGrHcHfB9v2LYXFV+ceik0Z89NK1G/M/pdS/6U=; b=Yng7FUzpy5bMwBDtr5+aBByGn5 vepQ9uRCzIVq7RaqSW62mGQQbxH45prqXpTJ4AajeWx9oJ7+GyK6LYoXygOo6VlZWqBq3qtoSZP2R 0mO+sMypB/oexdHc29GvhpPDa/lMHR9MC04J/enNimSMnm0P8RmWnoLgBN0SDkimtv88=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQW0x-00032T-S5 for control@debbugs.gnu.org; Sun, 28 Mar 2021 16:03:41 +0200 Date: Sun, 28 Mar 2021 16:03:38 +0200 Message-Id: <875z1bs7d1.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #47432 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 47432 fixed close 47432 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 47432 fixed close 47432 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 11:00:14 2021 Received: (at 47432) by debbugs.gnu.org; 28 Mar 2021 15:00:14 +0000 Received: from localhost ([127.0.0.1]:46764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQWth-00053s-Qj for submit@debbugs.gnu.org; Sun, 28 Mar 2021 11:00:13 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:56429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQWtg-00053g-Cc for 47432@debbugs.gnu.org; Sun, 28 Mar 2021 11:00:13 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4F7f5Q5hPjz1s0tc; Sun, 28 Mar 2021 17:00:10 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4F7f5Q39D0z1qqkD; Sun, 28 Mar 2021 17:00:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 9-eblRHJ7Lii; Sun, 28 Mar 2021 17:00:09 +0200 (CEST) X-Auth-Info: blGAl62rk/rSlHHFwPli5FsHkqaZ782ciUZHut52H9rdLljohI6oaZZmkvoveyE7 Received: from igel.home (ppp-46-244-175-213.dynamic.mnet-online.de [46.244.175.213]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 28 Mar 2021 17:00:09 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 32E4F2C3613; Sun, 28 Mar 2021 17:00:09 +0200 (CEST) From: Andreas Schwab To: Lars Ingebrigtsen Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied References: <86sg4hnkdo.fsf@protected.rcdrun.com> <877dlrs7d7.fsf@gnus.org> X-Yow: ...PENGUINS are floating by... Date: Sun, 28 Mar 2021 17:00:09 +0200 In-Reply-To: <877dlrs7d7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 28 Mar 2021 16:03:32 +0200") Message-ID: <877dlrl3wm.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org, Jean Louis X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.5 (-) On Mär 28 2021, Lars Ingebrigtsen wrote: > 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. > ---- No, this is very wrong. The docstring already adequately and correctly documents that case: Otherwise, this runs COMMAND on each file individually with the file name added at the end of COMMAND (separated by a space). Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 28 11:06:45 2021 Received: (at 47432) by debbugs.gnu.org; 28 Mar 2021 15:06:45 +0000 Received: from localhost ([127.0.0.1]:46778 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQX00-0005Do-SL for submit@debbugs.gnu.org; Sun, 28 Mar 2021 11:06:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQWzz-0005Dc-CO for 47432@debbugs.gnu.org; Sun, 28 Mar 2021 11:06:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GB0U9hN9Y1dBa/k443Yb9UATdeyuxnmVSH/GbUi7mPs=; b=mO2stOGv4PWb1edsMge9C9FJD/ Qv69Ttxjxs/rZ0qHT8zjK5MjsCpgJfQMvqBMf39eev6aAFVXM8+L5A7LJ9F4TX88fxltXcu8jOxqd 3w+xmp16nSyVV/N5BPAlzBR45tu7O2L2JtaTnDFnU4d+WLV9Vs6oocFBYBQsofNDQ0Ek=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQWzm-0003XY-1b; Sun, 28 Mar 2021 17:06:37 +0200 From: Lars Ingebrigtsen To: Andreas Schwab Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied References: <86sg4hnkdo.fsf@protected.rcdrun.com> <877dlrs7d7.fsf@gnus.org> <877dlrl3wm.fsf@igel.home> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEXMXWjdoqivKDO2 Y2z///9wQRK5AAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UDHA8GEnmNI5UAAAF4SURBVDjLbZMLjsMg DETHPoHdXMBxL9BV7n+39Y+UViVShHgM/jAAAGkNgc9MRY/3uoLd6AeQBJg5bQABnOlWzK7YAI9h ug52R51jXJJv8HCLSUpoA8TeIyUUkRUNMOuWO07FDZbCVPIHRFZfQOOfCsk2JBiSCqcCeb7doNOS rooHWKzKKpEbgJFpsukO/AZasSPfb0VfyQ8grfmIUckEowJSWYFtsjzZTN6KDYgx/wAaLcAniG86 eA6wAVNXtNV34A2idJIqUMR3ELdQ/acsswEGdEuiBfIJ0DYBpYKzi9mQrL9bkLvDM20E0kcruLQy l1YmowT0KEnFqG5kwJhr28KkDZul1V2gzOD+jFIpA0s5XmiBv7Y4ZHsjLVC90Axj8kcL5lnAGXwW 4BFUKrAylS6XbIJy0DkhSnAsgLJJlXfeJy0w5n6fJPOU2r510msBW2+twHEQ5g628XdcOdD37/lm B1zXEKm1W3atAcV+0vMNjtdnkDX+AS4tWk8Sfa4BAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTAz LTI4VDE1OjA2OjE4KzAwOjAwbbbnyAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wMy0yOFQxNTow NjoxOCswMDowMBzrX3QAAAAASUVORK5CYII= X-Now-Playing: King Crimson's _The Complete 1969 Recordings (13): Sessions 1_: "21st Century Schizoid Man (Morgan Studio Instrumental)" Date: Sun, 28 Mar 2021 17:06:28 +0200 In-Reply-To: <877dlrl3wm.fsf@igel.home> (Andreas Schwab's message of "Sun, 28 Mar 2021 17:00:09 +0200") Message-ID: <87blb3qpvv.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Andreas Schwab writes: > No, this is very wrong. The docstring already adequately and correctly > documents that case: > > Otherwise, this runs COMMAND on each file individually with the > file name added at the end of COMM [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org, Jean Louis X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andreas Schwab writes: > No, this is very wrong. The docstring already adequately and correctly > documents that case: > > Otherwise, this runs COMMAND on each file individually with the > file name added at the end of COMMAND (separated by a space). Right; I've reverted the patch. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 29 14:36:41 2021 Received: (at 47432) by debbugs.gnu.org; 29 Mar 2021 18:36:41 +0000 Received: from localhost ([127.0.0.1]:49565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQwki-0000JT-LA for submit@debbugs.gnu.org; Mon, 29 Mar 2021 14:36:41 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:59747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQwkg-0000JF-Lk for 47432@debbugs.gnu.org; Mon, 29 Mar 2021 14:36:39 -0400 Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E064.0000000060621E2F.00000454; Mon, 29 Mar 2021 11:36:30 -0700 Date: Mon, 29 Mar 2021 21:34:47 +0300 From: Jean Louis To: Lars Ingebrigtsen Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied Message-ID: References: <86sg4hnkdo.fsf@protected.rcdrun.com> <877dlrs7d7.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <877dlrs7d7.fsf@gnus.org> User-Agent: Mutt/2.0.6 (2021-03-06) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * Lars Ingebrigtsen [2021-03-28 17:04]: > Jean Louis 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 29 14:56:47 2021 Received: (at 47432) by debbugs.gnu.org; 29 Mar 2021 18:56:47 +0000 Received: from localhost ([127.0.0.1]:49610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQx46-0000nK-5b for submit@debbugs.gnu.org; Mon, 29 Mar 2021 14:56:47 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:34719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQx42-0000my-5o for 47432@debbugs.gnu.org; Mon, 29 Mar 2021 14:56:41 -0400 Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E1BA.00000000606222DE.000005DA; Mon, 29 Mar 2021 11:56:30 -0700 Date: Mon, 29 Mar 2021 21:51:41 +0300 From: Jean Louis To: Eli Zaretskii Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied Message-ID: References: <86sg4hnkdo.fsf@protected.rcdrun.com> <83czvjofw1.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <83czvjofw1.fsf@gnu.org> User-Agent: Mutt/2.0.6 (2021-03-06) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org, Lars Ingebrigtsen , arthur.miller@live.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * Eli Zaretskii [2021-03-28 11:13]: > > Date: Sun, 28 Mar 2021 10:50:37 +0300 > > From: Jean Louis > > Cc: 47432@debbugs.gnu.org > > > > * Arthur Miller [2021-03-27 23:29]: > > > Emacs is not executing them, Emacs is passing them to the shell. Same > > > happends as if you tried to execute that file from the command > > > prompt. > > > > Maybe in your opinion, not that I have same opinion, look: > > > > In Emacs, I press ! because I wish to write a command to be executed > > on the file, not to execute empty command which I did not write. When > > I press RET without entering command, I expect nothing to happen. > > Is this expectation consistent with the documentation of '!'? > Specifically, how are you sure that an empty COMMAND does nothing in > the shell? In some cases it does call the marked file, but those other cases should be excluded -- or documentation improved to tell users why is it so. Since Larse explained about the concatenation of COMMAND and FILE-LIST, I understand technically why is that happening, but I do not understand logic behind it. When there are let us say 50 images that I wish to convert, and if I forget to give a command like ! * [on 50 files]: mogrify -format jpg and instead I give "" then all those pictures will be "executed", attempted to be executed. That makes no sense to me > > - description of function does not say that empty RET should be > > considered "COMMAND", there is no mentioning (I could miss it maybe) > > that file itself will be executed; > > > > - info manual does not reflect that what you are speaking. It says: > > "The Dired command ‘!’ (‘dired-do-shell-command’) reads a shell > > command string in the minibuffer, and runs that shell command on one > > or more files." > > None of the above says anything about the effect of an empty string as > COMMAND. That is basically what I am pointing out, thank you, but seem that we have disagreement. In my opinion: - it should be clear WHY is it useful to allow empty string to be accepted as COMMAND as the logical function should execute COMMAND as non-empty string; - document that so that it becomes clear; I am myself still trying to understand as the prompt says to execute ON files, not to execute files. - documentation of the function and info manual should be aligned with that functionality; - and still I think that images and various files, directories, should not be executed. Only if the file has executable bit it should be executed -- this is current behavior on executable files. 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. Jean Louis Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 29 14:56:47 2021 Received: (at 47432) by debbugs.gnu.org; 29 Mar 2021 18:56:47 +0000 Received: from localhost ([127.0.0.1]:49612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQx4B-0000nV-5v for submit@debbugs.gnu.org; Mon, 29 Mar 2021 14:56:47 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:54361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQx45-0000n3-6g for 47432@debbugs.gnu.org; Mon, 29 Mar 2021 14:56:41 -0400 Received: from localhost ([::ffff:41.202.241.58]) (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001E1DB.00000000606222E2.000005EB; Mon, 29 Mar 2021 11:56:34 -0700 Date: Mon, 29 Mar 2021 21:55:19 +0300 From: Jean Louis To: Andreas Schwab Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied Message-ID: References: <86sg4hnkdo.fsf@protected.rcdrun.com> <877dlrs7d7.fsf@gnus.org> <877dlrl3wm.fsf@igel.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <877dlrl3wm.fsf@igel.home> User-Agent: Mutt/2.0.6 (2021-03-06) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org, Lars Ingebrigtsen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andreas Schwab [2021-03-28 18:00]: > On Mär 28 2021, Lars Ingebrigtsen wrote: > > > 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. > > ---- > > No, this is very wrong. The docstring already adequately and correctly > documents that case: > > Otherwise, this runs COMMAND on each file individually with the > file name added at the end of COMMAND (separated by a space). I probably do not understand what you two understand, what I don't understand why should FILE-LIST be appended to empty string, as those files will not be executed unless they are in path, and unless they are executables. ! and & should verify if those files are executables -- and if not, not execute images and directors -- OR -- maybe developer shall decide what is meant with ! or & -- is it maybe meant to execute marked files? And if so, then marked files shall be executed in the default-directory with prepended ./ and not as general system commands searched only in $PATH. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 29 15:23:57 2021 Received: (at 47432) by debbugs.gnu.org; 29 Mar 2021 19:23:57 +0000 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 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 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 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 Date: Mon, 29 Mar 2021 22:23:49 +0300 Message-Id: <83eefxlq62.fsf@gnu.org> From: Eli Zaretskii To: Jean Louis In-Reply-To: (message from Jean Louis on Mon, 29 Mar 2021 21:51:41 +0300) Subject: Re: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied References: <86sg4hnkdo.fsf@protected.rcdrun.com> <83czvjofw1.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 47432 Cc: 47432@debbugs.gnu.org, larsi@gnus.org, arthur.miller@live.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > 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. From unknown Fri Jun 20 05:29:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 27 Apr 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator