GNU bug report logs - #49776
28.0.50; Incorrect username completion results reported by `read-file-name-interal`

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Thu, 29 Jul 2021 22:19:02 UTC

Severity: normal

Merged with 49777

Found in version 28.0.50

Full log


Message #40 received at 49776 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>, 49776 <at> debbugs.gnu.org
Subject: Re: bug#49776: 28.0.50; Incorrect username completion results
 reported by `read-file-name-interal`
Date: Sat, 31 Jul 2021 14:07:38 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> (read-file-name-internal "~/foo/~man" nil t)
>> => (#("/foo/~man/" 0 9 (face completions-common-part)))
>
> Yup,. that's wrong.

I'm completely unfamiliar with this code...

(defun completion-table-with-quoting (table unquote requote)
...
           (boundary (car (completion-boundaries ustring table pred "")))
           (completions
            (completion--twq-all
             string ustring completions boundary unquote requote))

ustring here is "~man", and the boundary is 1, so completion--twq-all
returns "/foo/~man" (because it stripped off 1 character at the start).

But it should have stripped off "~/foo/~", I think?  Somehow?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 317 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.