From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Drew Adams <drew.adams@oracle.com>
Cc: 13033@debbugs.gnu.org
Subject: bug#13033: 24.3.50; regression: read-file-name-internal handles "~" wrong
Date: Fri, 30 Nov 2012 13:44:53 -0500 [thread overview]
Message-ID: <jwv1ufbuebu.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <409B80A02CEB4F14B201BE9F3D5EE93C@us.oracle.com>
>> OK, that makes sense since older versions did not support
>> user-name completion. Now you say that (read-file-name-internal "~"
>> 'file-exists-p nil) returns "~/dradams/" and I can't understand where
>> the additional slash comes from.
>> Also arguably, "~/" should also be a completion candidate, so
>> the above calls should not complete to "~dradams/" but to "~"
>> (the common prefix between the two possible completions).
> I cannot speak to why the / is included or why ~ is not considered the common
> prefix.
Then let me state it more clearly: Are you really sure that
(read-file-name-internal "~" 'file-exists-p nil) returns "~/dradams/"
even though
(completion--file-name-table "~" 'file-exists-p nil) returns "~dradams/"
? I ask because read-file-name-internal is defined as:
(defalias 'read-file-name-internal
(completion-table-in-turn #'completion--embedded-envvar-table
#'completion--file-name-table)
And I don't see where/why completion-table-in-turn would add a /.
I just want to make extra sure that that's indeed the problem, and not
a simple typo.
> And there is no such directory ~dradams either.
Actually, there should be (in the same sense that there is a directory
named ~, i.e. it's a shorthand expanded by Emacs, more specifically by
`expand-file-name').
What does C-x C-f ~dradams/.emacs RET do? It should open your ~/.emacs file.
> I do not see why user-name completion (whatever that might mean for
> Unix/GNU/Linux file-name completion) is involved at all on Windows. The user
> login name has nothing to do with the user's home directory.
`expand-file-name's docstring says:
An initial `~USER/' expands to USER's home directory.
-- Stefan
next prev parent reply other threads:[~2012-11-30 18:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 21:44 bug#13033: 24.3.50; regression: read-file-name-internal handles "~" wrong Drew Adams
2012-11-29 23:58 ` Juanma Barranquero
2012-11-30 13:12 ` Michael Heerdegen
2012-11-30 13:55 ` Eli Zaretskii
2012-12-01 10:13 ` Michael Heerdegen
2012-11-30 3:56 ` Stefan Monnier
2012-11-30 4:08 ` Drew Adams
2012-11-30 17:00 ` Stefan Monnier
2012-11-30 17:24 ` Drew Adams
2012-11-30 18:44 ` Stefan Monnier [this message]
2012-11-30 19:50 ` Drew Adams
2012-11-30 20:07 ` Eli Zaretskii
2012-11-30 21:09 ` Drew Adams
2012-12-01 7:46 ` Eli Zaretskii
2012-12-01 16:34 ` Drew Adams
2012-11-30 20:08 ` Stefan Monnier
2012-11-30 20:42 ` Eli Zaretskii
2012-11-30 21:14 ` Drew Adams
2014-02-09 2:51 ` Lars Ingebrigtsen
2012-11-30 19:01 ` Eli Zaretskii
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=jwv1ufbuebu.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=13033@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/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.