[Top][All Lists]

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

Re: executable-find in files.el

From: Michael Albinus
Subject: Re: executable-find in files.el
Date: Mon, 16 May 2005 21:27:54 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Richard Stallman <address@hidden> 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

>                                                  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.

reply via email to

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