From: Lars Ingebrigtsen <larsi@gnus.org>
To: Daniel Mendler <mail@daniel-mendler.de>
Cc: 49776@debbugs.gnu.org
Subject: bug#49776: 28.0.50; Incorrect username completion results reported by `read-file-name-interal`
Date: Fri, 30 Jul 2021 14:50:03 +0200 [thread overview]
Message-ID: <8735rwm0ec.fsf@gnus.org> (raw)
In-Reply-To: <48dff852-4ba9-730f-54c9-6800dffe9e8f@daniel-mendler.de> (Daniel Mendler's message of "Fri, 30 Jul 2021 14:29:18 +0200")
Daniel Mendler <mail@daniel-mendler.de> writes:
> On 7/30/21 1:47 PM, Lars Ingebrigtsen wrote:
>>> `(all-completions "~/.config/~man" #'read-file-name-internal)` returns
>>> the list `("/.config/~man")`. The file completion table incorrectly
>>> recognizes "/.config/~man" as the username instead of only "~man".
>>
>> I'm unable to reproduce this problem, and you haven't used `M-x
>> report-emacs-bug', so I don't know what system you're seeing this on.
>> I'm getting the expected on Debian/bullseye:
>>
>> (all-completions "~/.config/~man" #'read-file-name-internal)
>> => (#("/.config/~man/" 0 13 (face completions-common-part)))
>
> No, this is exactly the problem I meant (You reproduced it).
But you said it returned "/.config/~man" for you (while it returns
"/.config/~man/" for me) (note trailing slash)...
> "/.config/~man" is an invalid completion string. It is not a valid path
> nor a valid username on my system.
Oh, you don't have a user named "man" on your system? That explains why
we're getting different results. And I'm unable to reproduce that here:
(all-completions "~/.config/~notexist" #'read-file-name-internal)
=> nil
So what kind of system are you on?
> The file completion table should not return invalid completion
> candidates.
The confusing bit for me is why there's a "/" at the start of the
returned value, to be honest. ".config/~man/" should be the correct
value here, I think...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-07-30 12:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-29 22:17 bug#49776: 28.0.50; Incorrect username completion results reported by `read-file-name-interal` Daniel Mendler
2021-07-30 5:47 ` Eli Zaretskii
2021-07-30 11:47 ` Lars Ingebrigtsen
2021-07-30 12:29 ` Daniel Mendler
2021-07-30 12:50 ` Lars Ingebrigtsen [this message]
2021-07-30 13:12 ` Lars Ingebrigtsen
2021-07-30 13:31 ` Daniel Mendler
2021-07-30 17:18 ` Lars Ingebrigtsen
2021-07-30 21:45 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-31 12:07 ` Lars Ingebrigtsen
2021-08-02 11:57 ` Daniel Mendler
2021-08-04 6:13 ` Lars Ingebrigtsen
2021-07-30 13:22 ` Daniel Mendler
2021-07-30 12:45 ` bug#49777: " Daniel Mendler
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=8735rwm0ec.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=49776@debbugs.gnu.org \
--cc=mail@daniel-mendler.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.