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: Wed, 11 May 2005 19:16:46 -0400 Message-ID: <87zmv12wig.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> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115854266 11434 80.91.229.2 (11 May 2005 23:31:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 11 May 2005 23:31:06 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 12 01:31:02 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DW0f2-0001Tg-TV for ged-emacs-devel@m.gmane.org; Thu, 12 May 2005 01:30:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DW0ns-0003SS-97 for ged-emacs-devel@m.gmane.org; Wed, 11 May 2005 19:39:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DW0m5-0002f1-SA for emacs-devel@gnu.org; Wed, 11 May 2005 19:37:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DW0lk-0002Xd-D4 for emacs-devel@gnu.org; Wed, 11 May 2005 19:37:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DW0lg-0002HD-Su for emacs-devel@gnu.org; Wed, 11 May 2005 19:37:33 -0400 Original-Received: from [209.226.175.93] (helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DW0YB-00052R-JW; Wed, 11 May 2005 19:23:35 -0400 Original-Received: from alfajor ([67.68.217.114]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050511231650.VCCX16985.tomts36-srv.bellnexxia.net@alfajor>; Wed, 11 May 2005 19:16:50 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id AC93DD72FF; Wed, 11 May 2005 19:16:47 -0400 (EDT) Original-To: Eli Zaretskii In-Reply-To: <01c5567c$Blat.v2.4$d8bc9c20@zahav.net.il> (Eli Zaretskii's message of "Thu, 12 May 2005 01:56:43 +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:37000 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37000 >> > 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? > 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. >> Do you think it's more important to "do a subtly better job" or to "match >> the behavior of call-process"? > I think they should do the same. But the original executable-find > used file-executable-p, so your change is subtly incompatible, unless > you change openp to use the same method as file-executable-p. >> 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. > I agree. But the solution should be to make all 3 of these do exactly > the same job in exactly the same way. 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). 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. Stefan