From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.help Subject: Re: editing remote files with eshell Date: Sun, 04 Mar 2007 14:29:23 +0100 Organization: disorganized Message-ID: <87wt1x5e8c.fsf@localhorst.mine.nu> References: <85hct1wfkl.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1173015573 21068 80.91.229.12 (4 Mar 2007 13:39:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 4 Mar 2007 13:39:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 04 14:39:27 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HNqvv-0008Tx-9D for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Mar 2007 14:39:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HNqvu-0001W8-Og for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Mar 2007 08:39:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HNqvM-0001ME-Iu for help-gnu-emacs@gnu.org; Sun, 04 Mar 2007 08:38:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HNqvM-0001Lo-17 for help-gnu-emacs@gnu.org; Sun, 04 Mar 2007 08:38:52 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HNqvL-0001Lg-TP for help-gnu-emacs@gnu.org; Sun, 04 Mar 2007 08:38:51 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HNqvL-00082V-EO for help-gnu-emacs@gnu.org; Sun, 04 Mar 2007 08:38:51 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HNqv7-0006Jf-8Y for help-gnu-emacs@gnu.org; Sun, 04 Mar 2007 14:38:37 +0100 Original-Received: from e178058052.adsl.alicedsl.de ([85.178.58.52]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 04 Mar 2007 14:38:37 +0100 Original-Received: from david.hansen by e178058052.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 04 Mar 2007 14:38:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 39 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: e178058052.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) Cancel-Lock: sha1:IBmiwJOdErTR2tPh+uxYSX0ul4I= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:41643 Archived-At: On Sun, 04 Mar 2007 09:58:18 +0100 David Kastrup wrote: > "Andrew Yates" writes: > >> I've been using emacs for a little while and decided yesterday to try >> to use emacs with eshell as my primary terminal. I have most >> everything working satisfactorily, but I still haven't found a good >> way to edit files on remote hosts. I know that TRAMP can edit remote >> files using SSH, but it isn't as transparent as I would like. >> >> Is there any way that when I run "emacs filename" in a SSH session >> using eshell, the remote file can be opened in a new local buffer? > > What I do in eshell is just > cd /hostname:directory RET > > and then either C-x C-f filename RET or, alternatively, > find-file filename RET > (yes, use find-file as a shell command). Or (defun eshell/emacs (&rest files) (if (null files) (bury-buffer) (mapc #'find-file (mapcar #'expand-file-name (eshell-flatten-list (nreverse files)))))) (defun eshell/less (&rest files) (mapc #'view-file (mapcar #'expand-file-name (eshell-flatten-list (nreverse files))))) (defalias 'eshell/more 'eshell/less) And just type "emacs *" or "less *". David