GNU bug report logs - #56203
28.1; completing-read-multiple fails from inside the completion table

Previous Next

Package: emacs;

Reported by: Harald Judt <h.judt <at> gmx.at>

Date: Fri, 24 Jun 2022 19:17:01 UTC

Severity: normal

Found in version 28.1

Full log


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

From: Harald Judt <h.judt <at> gmx.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56203 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#56203: 28.1; completing-read-multiple fails from inside the
 completion table
Date: Fri, 24 Jun 2022 23:58:24 +0200
[Message part 1 (text/plain, inline)]
Hi,

Am 24.06.22 um 23:25 schrieb Lars Ingebrigtsen:
> Harald Judt <h.judt <at> gmx.at> writes:
> 
>> Thanks! I can confirm this on Emacs 28.1. This is an upstream
>> bug. Please report it upstream via report-emacs-bug (maybe cc Stefan
>> Monnier who is the expert on the table quotation mechanism).
>>
>>      1. I argue that Vertico calls the API completion-all-completions
>>      in the correct way.
>>      2. Icomplete use the API completion-all-completions in the same
>>      way and fails too.
>>      3. Default completion fails too if you enter ~, M-x
>>      minibuffer-complete RET. Note that completing-read-multiple
>>      overrides minibuffer-complete with crm-complete which shadows the
>>     underlying bug in the completion table.
>>      4. The error occurs from inside the completion table, and not from
>>      Vertico code.
> 
> Do you have a recipe to reproduce the problem without Vertico?  I tried:
> 
> (completing-read-multiple "Directories: " #'read-file-name-internal #'file-directory-p t nil nil "~/")
> 
> And I didn't see any obvious failures.

Number 2:
emacs -Q
Evaluate the following:
(icomplete-mode)
(completing-read-multiple "Directories: " #'read-file-name-internal 
#'file-directory-p t nil nil "~/")
Enter "~/," and behold the debugger chiming in.

Number 3 is an easy one to replicate too, but you have to enable recursive 
mini-buffers:

emacs -Q
Evaluate the following:
(setq enable-recursive-minibuffers t)
(completing-read-multiple "Directories: " #'read-file-name-internal 
#'file-directory-p t nil nil "~/")

Enter "~, " at the prompt (without quotes), then hit M-x minibuffer-complete RET.

Debugger entered--Lisp error: (args-out-of-range "" 0 2)
  completion--file-name-table("" 2 completion--unquote)
  complete-with-action(completion--unquote completion--file-name-table "" 2)
  #f(compiled-function (table) #<bytecode 
0x17ee37158998d04e>)(completion--file-name-table)
  completion--some(#f(compiled-function (table) #<bytecode 
0x17ee37158998d04e>) (completion--embedded-envvar-table 
completion--file-name-table))
  read-file-name-internal("" 2 completion--unquote)
[...]


-- 
`Experience is the best teacher.'

PGP Key ID: 4FFFAB21B8580ABD
Fingerprint: E073 6DD8 FF40 9CF2 0665 11D4 4FFF AB21 B858 0ABD
[OpenPGP_signature (application/pgp-signature, attachment)]

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

Previous Next


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