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: Feature request: new function start-remote-process Date: Mon, 25 Jun 2007 23:37:01 +0200 Message-ID: <87d4zjk96q.fsf@gmx.de> References: <87sl8qpueb.fsf@gmx.de> <87k5trkgxn.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1182807434 5949 80.91.229.12 (25 Jun 2007 21:37:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Jun 2007 21:37:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 25 23:37:11 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I2wFC-0007Ag-SI for ged-emacs-devel@m.gmane.org; Mon, 25 Jun 2007 23:37:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2wFC-0000YM-6F for ged-emacs-devel@m.gmane.org; Mon, 25 Jun 2007 17:37:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I2wF8-0000Y7-O8 for emacs-devel@gnu.org; Mon, 25 Jun 2007 17:37:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I2wF7-0000Xt-28 for emacs-devel@gnu.org; Mon, 25 Jun 2007 17:37:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2wF6-0000Xq-VD for emacs-devel@gnu.org; Mon, 25 Jun 2007 17:37:04 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1I2wF6-0006xT-AX for emacs-devel@gnu.org; Mon, 25 Jun 2007 17:37:04 -0400 Original-Received: (qmail invoked by alias); 25 Jun 2007 21:37:03 -0000 Original-Received: from p57A24833.dip0.t-ipconnect.de (EHLO localhost.local) [87.162.72.51] by mail.gmx.net (mp051) with SMTP; 25 Jun 2007 23:37:03 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/2+dtBqj72RQxsf1OlELP0itt2iN3g0KDvUi4xxz 1MTviY33vVsJZC In-Reply-To: (Richard Stallman's message of "Mon, 25 Jun 2007 15:53:05 -0400") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:73867 Archived-At: Richard Stallman 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