[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs tramp and the remote environment
From: |
Michael Albinus |
Subject: |
Re: emacs tramp and the remote environment |
Date: |
Fri, 22 Jan 2010 15:16:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) |
"Drew Adams" <drew.adams@oracle.com> writes:
>> I use tramp every day from home (it is a so great tool!) to compile
>> and run applications in a remote set of machines. At this moment the
>> only thing I'm missing is a better way for moving around the remote
>> file system. I mean, in the remote environment I set a few variables
>> that when running emacs locally would quickly let me go to directories
>> I need to visit, that is, C-x C-f $MYVAR tab
>>
>> But with tramp on a remote machine all variable keep their local value
>> and, therefore, I cannot use them to browse the remote file system.
>>
>> I thought that hooking a function that would somehow replace process-
>> environment with the remote one would do the trick. Then I saw in
>> tramp that there is already a variable named tramp-remote-process-
>> environment, but it seems to be meant to some other purposes.
>>
>> Would it be there and advice on how to accomplish what I'm looking
>> for?
`tramp-remote-process-environment' is meant to *set* environment
variables on the remote host. There is no Tramp function which *reads*
them. The following code snippet might help you:
(let ((default-directory "/ssh:remotehost:"))
(with-output-to-string
(shell-command "set" standard-output)))
> However, it might also help to know that you can bookmark remote locations:
> files and directories, and then visit the bookmarks. IOW, just go to the
> trouble
> once of getting to the right places, and set bookmarks to them for subsequent
> quick access.
The Tramp FAQ explains several approaches, how to shorten remote file
names. See
(info "(tramp)Frequently Asked Questions")
Best regards, Michael.