[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: Thu, 12 May 2005 08:42:32 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> > Yes.  But since you obviously didn't read my identical comment posted
>> > in response to your suggestion to do what you just did in this version
>> > of executable-find (or perhaps you read it, but disregarded it), I
>> > posted the same comment again.
>> Hmm... I replied to it in
>> http://lists.gnu.org/archive/html/emacs-devel/2005-05/msg00381.html but
>> haven't seen any answer.

> That's not the comment I meant.  I meant what I said here:

>   http://lists.gnu.org/archive/html/emacs-devel/2005-05/msg00379.html

> which got no responses.

I don't see any difference in actual content.  Both messages basically say
"subtle differences, thus file-executable-p", so msg00379 is also the answer
I'd have given.

>> Fine, but as long as noone changes call-process to do something meaningful
>> when requested to execute a file which is only available via
>> a file-name-handler, I think we should stick to 1 because I think it's more
>> important to match the behavior of call-process (as I wrote in the comment).

> I think we don't know what is more important.  Software is funny: it
> can use the infrastructure in ways that are unimaginable when the
> infrastructure was written.  That is why infrastructure needs to be
> consistent.  I'm sure I'm not saying anything you didn't already know.

Of course, I don't know, but I grepped for uses and they seem to corroborate
my intuition.

>> But, really, this is all academic anyway since I don't know of anyone who
>> has funny file-name-handled directories on her exec-path.

> That's not the only difference between openp and file-executable-p.
> Please compare check_executable and openp, and you will see that:

>   . on Windows, check_executable uses stat to verify executability
>   . on Posix systems, check_executable uses euidaccess if it's available
>   . by contrast, openp always uses access

> These are subtle differences, but they are real.

These are too subtle for me, indeed.  Are you saying that:
1- call-process on w32 doesn't use check_executable but should
2- are you saying that call-process on w32 does use check_executable whereas
   a "1" arg to locate-file doesn't, and thus that a `file-executable-p' arg
   to locate-file better mimicks call-process on w32.

If (1), it's beyond the scope of my patch.


reply via email to

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