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.