From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: file-relative-name and remote files
Date: Sun, 16 Mar 2003 23:52:21 -0500 [thread overview]
Message-ID: <E18umbl-0003wS-00@fencepost.gnu.org> (raw)
In-Reply-To: <84heaex5cc.fsf@lucy.is.informatik.uni-duisburg.de> (kai.grossjohann@uni-duisburg.de)
Actually, what Tramp does to expand "/foo:../.." is the following:
* The localname part ("../..") is not absolute, so it must be relative
to the remote home dir. Prepend "~/" to the localname, giving
"/foo:~/../..".
* Expand tildes, giving, say, "/foo:/home/jrl/../..".
* Expand the localname part, giving "/", then tack on the prefix.
The final result is "/foo:/".
Is this the right behavior so far?
I wouldn't say it is wrong, but it has a drawback: expanding the
remote ~/ requires getting info from the remote machine, which is
slow (for this operation).
I don't see an obvious better alternative, though.
One might look at file name in the following two ways:
1. An optional remote prefix followed by something.
2. A sequence of strings separated by slashes.
Which view should be given highest precedence?
They both make logical sense, and the second is much easier for Emacs
to implement, but I think the former is more useful.
That just doesn't make sense. It neglects "~". IMHO, a filename
such as "~/../bla" makes perfect sense, and I think that "~" should
be expanded first, before processing "..".
It doesn't address the question of what to do with "~", but I would not
say that makes it nonsense.
expand-file-name does handle "~" the way you suggest.
But Richard wants to allow ".." to cross file handler boundaries.
So "/foo:/../bar" should expand to "/bar", just like "/foo/../bar"
does.
That's what I thought at first, but in my last message on this issue
I recognized the arguments for the other side.
One approach that might work is this: if expand-file-name does not
find a handler, it does its thing and then looks again if it finds a
handler. Then it invokes that.
I guess that is necessary. However, once expand-file-name has found
and called one handler, I hope it can avoid looking for another
handler.
next prev parent reply other threads:[~2003-03-17 4:52 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E18nLzM-0001k5-01@monty-python.gnu.org>
2003-02-24 21:24 ` file-relative-name and remote files Lars Hansen
2003-02-24 21:36 ` Stefan Monnier
2003-02-24 21:52 ` Lars Hansen
2003-02-25 16:57 ` Richard Stallman
2003-02-26 9:41 ` Lars Hansen
2003-02-26 23:24 ` Richard Stallman
2003-02-27 14:22 ` Lars Hansen
2003-03-01 2:25 ` Richard Stallman
2003-03-03 10:22 ` Lars Hansen
2003-03-07 20:57 ` Kai Großjohann
2003-03-17 4:52 ` Richard Stallman [this message]
2003-03-21 14:20 ` Kai Großjohann
2003-03-24 2:05 ` Richard Stallman
2003-03-07 21:02 ` Kai Großjohann
2003-03-09 19:25 ` Richard Stallman
2003-02-27 17:02 ` Kai Großjohann
2003-02-27 17:05 ` Kai Großjohann
2003-02-27 17:37 ` Andreas Schwab
2003-02-28 14:53 ` Kai Großjohann
2003-02-28 15:43 ` Andreas Schwab
2003-02-28 16:27 ` Miles Bader
2003-02-28 18:35 ` Stefan Monnier
2003-02-28 21:32 ` Andreas Schwab
2003-03-01 13:00 ` Kai Großjohann
2003-03-02 15:06 ` Richard Stallman
[not found] <E18xZCF-0008JB-04@monty-python.gnu.org>
2003-03-25 12:22 ` Lars Hansen
2003-03-25 14:46 ` Kai Großjohann
[not found] <E18xQiP-00067n-01@monty-python.gnu.org>
2003-03-24 12:58 ` Lars Hansen
2003-03-24 18:24 ` Kai Großjohann
[not found] <E18t79a-00069E-04@monty-python.gnu.org>
2003-03-14 20:40 ` Lars Hansen
[not found] <E18sn8p-0003dO-01@monty-python.gnu.org>
2003-03-12 7:20 ` Lars Hansen
2003-03-12 11:53 ` Kai Großjohann
[not found] <E18s4BL-0000Xi-00@monty-python.gnu.org>
2003-03-11 10:05 ` Lars Hansen
2003-03-11 10:34 ` Lars Hansen
2003-03-11 15:08 ` Kai Großjohann
[not found] <E18rhhr-0005Oc-03@monty-python.gnu.org>
2003-03-08 20:05 ` Lars Hansen
2003-03-09 13:36 ` Kai Großjohann
[not found] <E18rQiV-0004PA-00@monty-python.gnu.org>
2003-03-08 8:38 ` Lars Hansen
2003-03-08 8:46 ` Lars Hansen
2003-03-08 14:41 ` Kai Großjohann
2003-02-27 20:03 Lars Hansen
2003-03-01 2:25 ` Richard Stallman
2003-03-24 11:43 ` Kai Großjohann
2003-03-25 0:52 ` Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2003-02-23 15:42 Lars Hansen
2003-02-23 16:41 ` Kai Großjohann
2003-02-23 18:30 ` Stefan Monnier
2003-02-23 20:42 ` Lars Hansen
2003-02-26 9:46 ` Richard Stallman
2003-02-23 10:36 Lars Hansen
2003-02-23 11:03 ` Kai Großjohann
2003-02-24 16:38 ` Richard Stallman
2003-02-28 18:33 ` Kai Großjohann
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=E18umbl-0003wS-00@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
/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).