From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: executable-find in files.el Date: Mon, 16 May 2005 21:27:54 +0200 Message-ID: <87k6lzots5.fsf@gmx.de> References: <01c55657$Blat.v2.4$7979dc20@zahav.net.il> <87fywt6128.fsf-monnier+emacs@gnu.org> <87ekc9lurh.fsf@gmx.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1116368508 22119 80.91.229.2 (17 May 2005 22:21:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 May 2005 22:21:48 +0000 (UTC) Cc: eliz@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 18 00:21:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DYAPh-0000cT-7c for ged-emacs-devel@m.gmane.org; Wed, 18 May 2005 00:19:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DYAS0-0003LN-Iq for ged-emacs-devel@m.gmane.org; Tue, 17 May 2005 18:22:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DXs3F-00057l-NC for emacs-devel@gnu.org; Mon, 16 May 2005 22:43:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DXpHr-0001vc-LK for emacs-devel@gnu.org; Mon, 16 May 2005 19:46:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DXlTZ-0007Cu-Of for emacs-devel@gnu.org; Mon, 16 May 2005 15:42:05 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1DXlTx-0000Ko-JL for emacs-devel@gnu.org; Mon, 16 May 2005 15:42:29 -0400 Original-Received: (qmail invoked by alias); 16 May 2005 19:27:55 -0000 Original-Received: from pD9E712F0.dip0.t-ipconnect.de (EHLO localhost.local) [217.231.18.240] by mail.gmx.net (mp013) with SMTP; 16 May 2005 21:27:55 +0200 X-Authenticated: #3708877 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sat, 14 May 2005 20:21:42 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 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:37199 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:37199 Richard Stallman writes: > I am having trouble understanding your message. > > I agree with Stefan that, as long as `file-executable-p' returns > meaningful values for remote files, there must be a meaning for > `exec-path', `executable-find' and `start-process' as well in the > remote case. > > I can't translate the second half of that sentence into a concrete > meaning. What concrete cases are you talking about? Sorry for being too short. I wanted to say that there should be a general concept for running commands on remote hosts. Given that a command is an executable file, I believe the same mechanism used for remote files via file name handler could be used. For `file-executable-p' that is implemented already (but this is a simple file name operation). For `start-process' and `call-process' I would prefer to have such a mechanism as well. Determining the file to be executed as command IS a file name operation, so it would make sense to extend both commands for that case (running on remote hosts). `exec-path' and `executable-find' could be extended in the same way: `exec-path' could provide a list of directories to be searched on a remote host (yes, I see the problem of ambiguity), and `executable-find' would return the path name on remote hosts. That's what Stefan has said: `executable-find' returns already remote path names, but the result is not useful for `call-process'. > For `call-process' this has been done already, > > What is "this"? Oh, I was too short, again. "This" means "provide the possibility to run a command on a remote host ...". It does not mean yet "... via `call-process'". > although I don't > understand why a new function (`process-file') was needed. > > process-file looks for a file handler. It would be incorrect > for call-process to do that; it is NOT meant as an operation > on a file. I'm really happy to have `process-file' as mean for running remote commands. But during migrating existing packages, the drawback has been obvious: Everywhere there is the need of checking a command for being remote or not, and then to call `process-file' or `call-process'. If `call-process' would be able to handle remote commands, most of the cases nothing would be needed to be changed - the existing code would simply work. And the same for `start-process'. An example is `compile': Internally, it uses `start-process'. Tramp provides a dingy redefinition using `shell-command' (I can say it offending because I've written it partly by myself). See tramp-util.el. Best regards, Michael. PS: Unfortunately for this discussion, I'll start a trip on Wednesday being mostly offline next 4 weeks. Please be patient when I don't respond immediately.