[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: editing remote files with eshell
From: |
David Hansen |
Subject: |
Re: editing remote files with eshell |
Date: |
Sun, 04 Mar 2007 14:29:23 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) |
On Sun, 04 Mar 2007 09:58:18 +0100 David Kastrup wrote:
> "Andrew Yates" <andrewyates@gmail.com> 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 <file>*" or "less <file>*".
David