From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Saving a remote buffer into a local file Date: Tue, 24 Jan 2017 18:00:36 +0200 Message-ID: <83sho830t7.fsf@gnu.org> References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1485273725 19784 195.159.176.226 (24 Jan 2017 16:02:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 24 Jan 2017 16:02:05 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 24 17:01:53 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cW3XM-00038h-45 for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Jan 2017 17:01:36 +0100 Original-Received: from localhost ([::1]:50926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cW3XR-000880-9p for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Jan 2017 11:01:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cW3Wm-00086B-6C for help-gnu-emacs@gnu.org; Tue, 24 Jan 2017 11:01:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cW3Wj-0003dn-6m for help-gnu-emacs@gnu.org; Tue, 24 Jan 2017 11:01:00 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cW3Wj-0003dj-4t for help-gnu-emacs@gnu.org; Tue, 24 Jan 2017 11:00:57 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1354 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cW3Wi-0000qf-Ce for help-gnu-emacs@gnu.org; Tue, 24 Jan 2017 11:00:56 -0500 In-reply-to: (message from Dani Moncayo on Tue, 24 Jan 2017 10:37:23 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112153 Archived-At: > From: Dani Moncayo > 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.