[Top][All Lists]

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

Re: executable-find in files.el

From: Stefan Monnier
Subject: Re: executable-find in files.el
Date: Wed, 11 May 2005 15:07:36 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> + (defun executable-find (command)
>> +   "Search for COMMAND in `exec-path' and return the absolute file name.
>> + Return nil if COMMAND is not found anywhere in `exec-path'."
>> +   ;; Use 1 rather than file-executable-p to better match the behavior of
>> +   ;; call-process.
>> +   (locate-file command exec-path exec-suffixes 1))

> Passing 1 as last arg of locate-file is subtly different from passing
> file-executable-p.  I think the latter does a better job, so I think
> executable-find should use file-executable-p.

Have you read the comment you quoted?  What do you reply to that?
Do you think it's more important to "do a subtly better job" or to "match
the behavior of call-process"?
In my view, the point of executable-find is to figure out whether there is
a command that we can run.  If it tells us "I found /ssh:foo/bar/baz", but
then call-process fails because it doesn't work through Tramp, I think it's
a problem.


reply via email to

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