[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Saving a remote buffer into a local file
From: |
Eli Zaretskii |
Subject: |
Re: Saving a remote buffer into a local file |
Date: |
Tue, 24 Jan 2017 18:00:36 +0200 |
> From: Dani Moncayo <dmoncayo@gmail.com>
> Date: Tue, 24 Jan 2017 10:37:23 +0100
>
> > I think it would be nice to have some special syntax, so that I can
> > specify a path in my local host (and avoid the cumbersome
> > "/localuser@localhost:/localpath").
> >
> > Is there such a syntax?
>
> Answering myself: Yes, it seems so: Just quote the local path with "/:":
>
> C-x C-w /:~/file2
Yes. However, don't expect this to resolve to a file in your local
home directory. That's what currently happens on MS-Windows (not on
Unix), but it will go away in Emacs 26, where "~/" will no longer
expand to HOME in quoted file names. Instead, you will get
DEFDIR/~/file2, where DEFDIR is the default-directory of the buffer
from which you invoke the command. That's because "/:" is supposed to
quote the tilde as well, allowing to use it as a literal character in
a file name.