emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suggestions for corrections to executable.el - use of PATHEXT


From: Lennart Borgman
Subject: Re: Suggestions for corrections to executable.el - use of PATHEXT
Date: Sun, 12 Sep 2004 12:56:08 +0200

From: "Eli Zaretskii" <address@hidden>

> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]