all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
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 10:36:56 -0700	[thread overview]
Message-ID: <0585b415-4b54-95c3-4454-9317d7a79c61@gmail.com> (raw)
In-Reply-To: <87o7injouu.fsf@gmx.de>

On 8/31/2023 6:58 AM, Michael Albinus wrote:
> Jim Porter <jporterbugs@gmail.com> writes:
> 
>> The one edge case I'm not quite sure what to do about is: how should
>> we spell "the user's home directory on localhost"? Using "/:~" *could*
>> work (in that Eshell could recognize it and do the right thing), but
>> it's also the way that you spell "the file named ~" elsewhere in
>> Emacs. (Eshell would spell that \~ or '~'). Maybe that's not such a
>> big deal though: we can just document this corner case and hope users
>> don't get *too* confused.
> 
> IIUC, "~" in a file name means always the home directory when it is the
> first character (of the local part in remote file names), or it comes
> after a slash like in "/~". See (info "(elisp) File Name Expansion")

The main thing I'm worried about is this: if we say that in Eshell, 
"/foo/bar" is relative to the current remote host, then the same should 
be true for "~": it would refer to your remote homedir when applicable.

Then we'd want a way to refer to your *local* homedir no matter where 
you are. If we use "/:/foo/bar" to refer to the always-local "/foo/bar", 
then we might say "/:~" means your local homedir. 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".

I *think* what we'd want to do is to say, "Eshell's quoted file names 
work slightly differently from quoted filenames elsewhere in Emacs. 
Since Eshell expands tildes in file names on its own, '/:~' always means 
your local home directory. If you want to refer to a file whose name is 
tilde, you can use Eshell's escape sequences (etc, etc)."

I'll try to put together a patch that does this, and then people can try 
it out and see if it makes sense.



  reply	other threads:[~2023-09-01 17: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 [this message]
2023-09-01 18:13         ` Michael Albinus
2023-09-01 18:36           ` Jim Porter
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0585b415-4b54-95c3-4454-9317d7a79c61@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.