unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: <tomas@tuxteam.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Find file locally from Tramp buffer
Date: Thu, 07 Jan 2016 21:14:21 +0100	[thread overview]
Message-ID: <87poxdrvtu.fsf@gmx.de> (raw)
In-Reply-To: <20160107084237.GB2936@tuxteam.de> (tomas@tuxteam.de's message of "Thu, 7 Jan 2016 09:42:37 +0100")

<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	other threads:[~2016-01-07 20:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 19:35 Find file locally from Tramp buffer Alexander Shukaev
2016-01-07  8:42 ` tomas
2016-01-07 20:14   ` Michael Albinus [this message]
2016-01-08  7:54     ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87poxdrvtu.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tomas@tuxteam.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).