From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.bugs Subject: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied Date: Sat, 27 Mar 2021 21:28:31 +0100 Message-ID: References: <86sg4hnkdo.fsf@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3718"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47432@debbugs.gnu.org To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 27 21:29:16 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 1lQFYY-0000qK-Ol for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 21:29:15 +0100 Original-Received: from localhost ([::1]:57904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQFYX-0005ya-Jw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 16:29:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQFYL-0005yM-W8 for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 16:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQFYL-000856-On for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 16:29:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQFYL-0000D3-L7 for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 16:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arthur Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Mar 2021 20:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47432 X-GNU-PR-Package: emacs Original-Received: via spool by 47432-submit@debbugs.gnu.org id=B47432.1616876925779 (code B ref 47432); Sat, 27 Mar 2021 20:29:01 +0000 Original-Received: (at 47432) by debbugs.gnu.org; 27 Mar 2021 20:28:45 +0000 Original-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 Original-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== Original-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 Original-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 Original-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 In-Reply-To: (Jean Louis's message of "Sat, 27 Mar 2021 21:54:16 +0300") 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> X-MS-Exchange-MessageSentRepresentingType: 1 Original-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-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:203136 Archived-At: 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?