From: Ken Brown <kbrown@cornell.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "dan@dpsutton.com" <dan@dpsutton.com>,
"npostavs@gmail.com" <npostavs@gmail.com>,
"36502@debbugs.gnu.org" <36502@debbugs.gnu.org>,
Stefan Monnier <monnier@iro.umontreal.ca>,
"schwab@suse.de" <schwab@suse.de>
Subject: bug#36502: Fwd: bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p
Date: Wed, 10 Jul 2019 21:57:51 +0000 [thread overview]
Message-ID: <41c1033e-bd1c-d244-7293-00dfba900e8f@cornell.edu> (raw)
In-Reply-To: <83zhlo5tkm.fsf@gnu.org>
On 7/8/2019 1:23 PM, Eli Zaretskii wrote:
> LGTM, thanks. Can we have a test for this subtle use case, so that we
> never regress?
I just found another case where expand-file-name can yield a non-absolute
result. Assuming there is no user "foo", we have
(let ((default-directory "~foo"))
(expand-file-name "bar"))
=> "~foo/~foo/bar"
This is a ridiculous result, in addition to not being absolute.
Part of what's confusing here is that file-name-absolute-p returns t on file
names starting with "~", even though its doc string explicitly states that such
a file name is not absolute.
My inclination is that if default-directory starts with "~", then we should try
to convert it to a (truly) absolute file name. If this doesn't work, then we
should forget the special interpretation of "~" and just treat default-directory
the same as any other relative name. This means we would get
"<invocation-directory>/~foo" if invocation-directory is absolute, and "/~foo"
otherwise.
Does this seem reasonable? Or are there other suggestions?
Ken
next prev parent reply other threads:[~2019-07-10 21:57 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-04 16:48 bug#36502: 27.0.50; infinite loop in file-name-case-insensitive-p Daniel Sutton
2019-07-04 18:08 ` Ken Brown
[not found] ` <CAMfzp7bhcmeY7QP4-ALfmBE4OojJthcYEVLR79zj-FrGx5s+WA@mail.gmail.com>
2019-07-05 1:32 ` Ken Brown
[not found] ` <CAMfzp7brsFLdpi04pDAL+O_yVuF7=EERzinVBKoQyTaLUtgwDA@mail.gmail.com>
[not found] ` <CAMfzp7Y=wA8_V=Tvm1iOtyXM-kqKZyx41Q4phJfnwmygHhJWLA@mail.gmail.com>
2019-07-05 3:05 ` bug#36502: Fwd: " Daniel Sutton
2019-07-06 12:49 ` Ken Brown
2019-07-06 13:27 ` Noam Postavsky
2019-07-06 15:38 ` Ken Brown
2019-07-06 16:14 ` Eli Zaretskii
2019-07-07 14:09 ` Ken Brown
2019-07-07 14:37 ` Eli Zaretskii
2019-07-07 19:30 ` Ken Brown
2019-07-08 12:25 ` Eli Zaretskii
2019-07-08 13:36 ` Ken Brown
2019-07-08 13:59 ` Eli Zaretskii
2019-07-08 15:17 ` Ken Brown
2019-07-08 16:44 ` Ken Brown
2019-07-08 17:23 ` Eli Zaretskii
2019-07-10 21:57 ` Ken Brown [this message]
2019-07-11 23:36 ` Richard Stallman
2019-07-12 6:41 ` Eli Zaretskii
2019-07-12 20:18 ` Ken Brown
2019-07-15 13:39 ` Ken Brown
2019-07-19 7:00 ` Eli Zaretskii
2019-07-20 9:19 ` Eli Zaretskii
2019-07-20 14:27 ` Ken Brown
2019-07-20 15:52 ` Eli Zaretskii
2019-07-21 2:32 ` Paul Eggert
2019-07-21 14:21 ` Eli Zaretskii
2019-07-21 14:30 ` Ken Brown
2019-07-22 2:16 ` Ken Brown
2019-07-24 21:36 ` Paul Eggert
2019-07-24 22:47 ` Ken Brown
2019-07-26 11:04 ` Andy Moreton
2019-07-08 14:37 ` Andreas Schwab
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=41c1033e-bd1c-d244-7293-00dfba900e8f@cornell.edu \
--to=kbrown@cornell.edu \
--cc=36502@debbugs.gnu.org \
--cc=dan@dpsutton.com \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=npostavs@gmail.com \
--cc=schwab@suse.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.