unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
Cc: eliz@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: executable-find in files.el
Date: Mon, 16 May 2005 21:27:54 +0200	[thread overview]
Message-ID: <87k6lzots5.fsf@gmx.de> (raw)
In-Reply-To: <E1DX6t4-0006kS-VC@fencepost.gnu.org> (Richard Stallman's message of "Sat, 14 May 2005 20:21:42 -0400")

Richard Stallman <rms@gnu.org> 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.

  reply	other threads:[~2005-05-16 19:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1DVuFh-0001h1-GE@monty-python.gnu.org>
2005-05-11 18:29 ` executable-find in files.el Eli Zaretskii
2005-05-11 19:07   ` Stefan Monnier
2005-05-11 22:56     ` Eli Zaretskii
2005-05-11 23:16       ` Stefan Monnier
2005-05-11 23:50         ` David Kastrup
2005-05-12  1:31           ` Stefan Monnier
2005-05-12  6:34         ` Eli Zaretskii
2005-05-12 12:42           ` Stefan Monnier
2005-05-12 13:14             ` Eli Zaretskii
2005-05-14 14:58     ` Michael Albinus
2005-05-15  0:21       ` Richard Stallman
2005-05-16 19:27         ` Michael Albinus [this message]
2005-05-16 22:38           ` Stefan Monnier
2005-05-17 22:03             ` Kim F. Storm
2005-05-17 22:23               ` Stefan Monnier
2005-05-18 13:08                 ` Richard Stallman
2005-05-17  4:36           ` Richard Stallman
2005-05-17 16:32             ` Michael Albinus
2005-05-18  5:19               ` Richard Stallman
2005-05-18 13:08           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k6lzots5.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).