tramp-devel
[Top][All Lists]
Advanced

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

Re: // and ~


From: Michael Albinus
Subject: Re: // and ~
Date: Tue, 10 Jul 2018 11:33:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

積丹尼 Dan Jacobson <address@hidden> writes:

Hi Dan,

> Users would often like to add ~ or //bla_bla
> to the end of e.g.,
> /adb::/sdcard/DCIM/mei/temp/
> as the usual emacs shortcut to just a local directory,
> but tramp does not detect it.

A double slash or "/~" expand only the file name part of the remote file
name:

(substitute-in-file-name "/adb::/sdcard/DCIM/mei/temp//") => "/adb::/"
(substitute-in-file-name "/adb::/sdcard/DCIM/mei/temp/~") => "/adb::~"

For remote file names to expand to the local file name, you need an
additional slash:

(substitute-in-file-name "/adb::/sdcard/DCIM/mei/temp///") => "/"
(substitute-in-file-name "/adb::/sdcard/DCIM/mei/temp//~") => "~"

See also the Tramp manual (info "(tramp) File name completion")

Best regards, Michael.



reply via email to

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