From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: executable-find in files.el Date: Thu, 12 May 2005 08:42:32 -0400 Message-ID: <8764xo39nx.fsf-monnier+emacs@gnu.org> References: <01c55657$Blat.v2.4$7979dc20@zahav.net.il> <87fywt6128.fsf-monnier+emacs@gnu.org> <01c5567c$Blat.v2.4$d8bc9c20@zahav.net.il> <87zmv12wig.fsf-monnier+emacs@gnu.org> <01c556bc$Blat.v2.4$cc9849e0@zahav.net.il> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115901615 3697 80.91.229.2 (12 May 2005 12:40:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 May 2005 12:40:15 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 12 14:40:12 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DWCy7-0003Pw-6Z for ged-emacs-devel@m.gmane.org; Thu, 12 May 2005 14:39:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DWD73-0005pV-53 for ged-emacs-devel@m.gmane.org; Thu, 12 May 2005 08:48:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DWD4Z-0004Qo-62 for emacs-devel@gnu.org; Thu, 12 May 2005 08:45:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DWD4V-0004P3-QL for emacs-devel@gnu.org; Thu, 12 May 2005 08:45:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DWD4V-0004MA-5A for emacs-devel@gnu.org; Thu, 12 May 2005 08:45:47 -0400 Original-Received: from [209.226.175.188] (helo=tomts25-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DWD85-00041n-7Z; Thu, 12 May 2005 08:49:29 -0400 Original-Received: from alfajor ([67.68.217.114]) by tomts25-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050512124235.VLIW27245.tomts25-srv.bellnexxia.net@alfajor>; Thu, 12 May 2005 08:42:35 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id E6A9CD7301; Thu, 12 May 2005 08:42:33 -0400 (EDT) Original-To: Eli Zaretskii In-Reply-To: <01c556bc$Blat.v2.4$cc9849e0@zahav.net.il> (Eli Zaretskii's message of "Thu, 12 May 2005 09:34:31 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:37030 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37030 >> > 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. Stefan