all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Feature request: new function start-remote-process
Date: Mon, 25 Jun 2007 23:37:01 +0200	[thread overview]
Message-ID: <87d4zjk96q.fsf@gmx.de> (raw)
In-Reply-To: <E1I2ucT-00013s-TV@fencepost.gnu.org> (Richard Stallman's message of "Mon, 25 Jun 2007 15:53:05 -0400")

Richard Stallman <rms@gnu.org> writes:

>     > start-remote-process shall behave similar: if default-directory points
>     > to a remote host, the corresponding program shall be executed there.
>
>     Looks like nobody objects. I'll install it next days in the trunk,
>     unless there is a veto.
>
> But...how is it possible to do run a program on a remote host?
> In general, there is no way, right?

Why not? Tramp must call programs on a remote host permanently. It opens
a new buffer by

(start-process "name" tramp-buffer "ssh" host "-l" user)

Then it sends the program to that process, and reads the result in the
buffer.

A program can be regarded as the "basename" of an absolute file name.

(let ((default-directory "/ssh:user@host:"))
  (start-remote-process "example" "*scratch*" "hostname"))

does work in my implementation. It must be specified how the program
"hostname" is found. We've discussed shortly two years ago, how to
use `executable-find' and `exec-path' for that, with no result.

For the time being, I would propose that the search path for a program
on a remote host shall be the result of `getconf PATH` on the remote
host (that's what Tramp 2.1 does by default). If a program is not found
in that path, it could be called by its absolute file name:

(let ((default-directory "/ssh:user@host:"))
  (start-remote-process "example" "*scratch*" "/bin/hostname"))

However, there must be a better mechanism to define exec-path for remote
hosts. Tramp has an own, proprietary mechanism (see tramp-remote-path);
this needs to be generalized.

Best regards, Michael.magdalene

  parent reply	other threads:[~2007-06-25 21:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-17 13:45 Feature request: new function start-remote-process Michael Albinus
2007-06-17 14:40 ` Sean O'Rourke
2007-06-17 16:04   ` Michael Albinus
2007-06-25 18:49 ` Michael Albinus
2007-06-25 19:53   ` Richard Stallman
2007-06-25 20:00     ` David Kastrup
2007-06-25 21:37     ` Michael Albinus [this message]
2007-06-26 16:57       ` Richard Stallman
2007-06-26 18:57         ` Michael Albinus
2007-06-26 19:27           ` Michael Albinus
2007-06-26 15:17   ` Stefan Monnier
2007-06-27 10:37     ` Michael Albinus
2007-06-29 21:12     ` Michael Albinus
2007-06-30  2:40       ` Stefan Monnier
2007-06-30  8:43         ` Michael Albinus
2007-06-26 15:22   ` Stefan Monnier
2007-06-27 10:48     ` Michael Albinus

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

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

  git send-email \
    --in-reply-to=87d4zjk96q.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.