From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.devel Subject: Re: Suggestions for corrections to executable.el - use of PATHEXT Date: Sun, 12 Sep 2004 12:56:08 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <018a01c498b7$24be1290$0200a8c0@sedrcw11488> References: <01c497f4$Blat.v2.2.2$380b5e20@zahav.net.il> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1094986565 6683 80.91.229.6 (12 Sep 2004 10:56:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Sep 2004 10:56:05 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 12 12:55:51 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C6S1P-0000ZC-00 for ; Sun, 12 Sep 2004 12:55:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C6S6s-0002Sd-N2 for ged-emacs-devel@m.gmane.org; Sun, 12 Sep 2004 07:01:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C6S6m-0002SY-FD for emacs-devel@gnu.org; Sun, 12 Sep 2004 07:01:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C6S6l-0002SM-EH for emacs-devel@gnu.org; Sun, 12 Sep 2004 07:01:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C6S6l-0002SJ-Av for emacs-devel@gnu.org; Sun, 12 Sep 2004 07:01:23 -0400 Original-Received: from [81.228.11.114] (helo=av7-2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C6S12-0002pW-U6; Sun, 12 Sep 2004 06:55:29 -0400 Original-Received: by av7-2-sn1.fre.skanova.net (Postfix, from userid 502) id 1615A37E98; Sun, 12 Sep 2004 12:55:28 +0200 (CEST) Original-Received: from smtp3-2-sn1.fre.skanova.net (smtp3-2-sn1.fre.skanova.net [81.228.11.164]) by av7-2-sn1.fre.skanova.net (Postfix) with ESMTP id 08C8437E45; Sun, 12 Sep 2004 12:55:28 +0200 (CEST) Original-Received: from sedrcw11488 (t4o58p131.telia.com [195.252.57.131]) by smtp3-2-sn1.fre.skanova.net (Postfix) with SMTP id 2FF2C37E54; Sun, 12 Sep 2004 12:55:26 +0200 (CEST) Original-To: "Eli Zaretskii" , "Davis Herring" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27040 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27040 From: "Eli Zaretskii" > First, I'm not sure we should look at PATHEXT. That variable is AFAIK > looked at by the shell, so if we want Emacs behave _exactly_ like the > shell does, we should at least look at the value of SHELL and/or > ComSpec (and COMSPEC for older systems). I mean, what if the user's > shell is Bash, which AFAIK doesn't look at PATHEXT at all? And if the > shell is COMMAND.COM, then ".cmd" should not be in the list. Etc., > etc. PATHEXT is looked at by cmd.exe (the default shell on the NT hereditary line). I do not know if it is used by command.com (the default shell on the 95 line) but I doubt it. When I tested now I found that the Run entry in Windows Start menu honor the default extensions for PATHEXT (.com, .exe., .bat, .cmd). It does not however not recognize .pl which I have in my PATHEXT (cmd.exe recognize it). I am using NT4 when testing this. So perhaps not even ms windows is consistent here. What seems clear however is that the main purpose of PATHEXT is as far as I can see to make it easier for the user when entering a command interactively. The user may for example type "notepad" instead of "notepad.exe". PATHEXT is set by the user and expresses the users wish to type less. It seems reasonable to use PATHEXT for this purpose in Emacs too. The variable executable-binary-suffixes is (if I understand this correctly) used for this purpose by executable-find. This is however not clearly expressed in the documentation. A note: w32-shell-execute does something quite different. It calls the ms windows API ShellExecute to do the action associated with a certain "verb" on a file type (on windows this means file extension). Typical verbs are "open" and "print". Windows Explorer uses this. Having said all this I just want to say that I regret that I took this issue up without looking closer at the problem. - Lennart