help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find file locally from Tramp buffer


From: Michael Albinus
Subject: Re: Find file locally from Tramp buffer
Date: Thu, 07 Jan 2016 21:14:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

<tomas@tuxteam.de> writes:

> On Wed, Jan 06, 2016 at 08:35:52PM +0100, Alexander Shukaev wrote:
>> Hey everyone,
>>
>> Suppose I run builds on a dedicated build machine with `compile' via
>> Tramp. [...]
>> it would be nice to somehow teach Emacs to first probe whether it
>> can access the corresponding file locally, and if not, fallback to
>> accessing it remotely via Tramp [...]
>
>> I do realize that the use case is very special and is not meant for
>> broad audience [...]
>
> This isn't as crazy as it sounds. Actually I would have had use for
> that from time to time.
>
> Kind of a file name mapping layer (perhaps the local files have a
> somewhat different path, typically one could get away by re-mapping
> some stem of the complete path).

In the compilation buffer, the buffer-local variable `default-directory'
points to the remote directory. If you change it to the corresponding
local directory path, it could do the trick. Just call in that buffer
"M-x cd".

> regards
> -- t

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]