From: Jim Porter <jporterbugs@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs syntax for filenames to mean "absolute location on the current remote host"?
Date: Fri, 1 Sep 2023 11:36:02 -0700 [thread overview]
Message-ID: <18af9a0a-f3cf-ee01-7dcf-ee1641b13eca@gmail.com> (raw)
In-Reply-To: <874jkdrccr.fsf@gmx.de>
On 9/1/2023 11:13 AM, Michael Albinus wrote:
> Jim Porter <jporterbugs@gmail.com> writes:
>
>> But the Emacs manual says:
>>
>>> ‘/:’ can also prevent ‘~’ from being treated as a special character
>> for a user’s home directory.
>>
>> So according to that rule, "/:~" would mean "the file named tilde in
>> the current directory".
>
> Hmm, I've never stumbled over this sentence in the manual. And it is a
> little bit vague: "can also prevent".
>
> A short test shows that it doesn't if the tilde comes directly after the quoting:
>
> --8<---------------cut here---------------start------------->8---
> M-x cd RET /net RET
> M-x pwd
> => /net
> M-x cd RET /:~ RET
> M-x pwd
> => /home/albinus
>
> M-x cd RET /:~user RET
> M-x pwd
> => /home/user
> --8<---------------cut here---------------end--------------->8---
>
> It even works for remote file names (although there are still some quirks):
>
> --8<---------------cut here---------------start------------->8---
> C-x C-f /ssh:ford:/:~ RET
> => dired buffer of remote user's home directory
> --8<---------------cut here---------------end--------------->8---
>
> What doesn't work are file names like "/:/tmp/~hack", as said in the manual.
Huh. I never realized it worked that way (though I never actually
*tried* this case).
I think the first thing I'll do then is to try and understand *exactly*
how quoted file names work, and then update the manual to clarify this.
Once I know exactly how they work, it should be easier to be sure that I
won't mess anything up with these Eshell improvements.
next prev parent reply other threads:[~2023-09-01 18:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 3:51 Emacs syntax for filenames to mean "absolute location on the current remote host"? Jim Porter
2023-08-29 7:30 ` Michael Albinus
2023-08-29 11:57 ` Eli Zaretskii
2023-08-30 5:07 ` Jim Porter
2023-08-31 13:58 ` Michael Albinus
2023-09-01 17:36 ` Jim Porter
2023-09-01 18:13 ` Michael Albinus
2023-09-01 18:36 ` Jim Porter [this message]
2023-09-01 19:23 ` Jim Porter
2023-09-02 11:20 ` Michael Albinus
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=18af9a0a-f3cf-ee01-7dcf-ee1641b13eca@gmail.com \
--to=jporterbugs@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=michael.albinus@gmx.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).