unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Harald Judt <h.judt@gmx.at>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 56203@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#56203: 28.1; completing-read-multiple fails from inside the completion table
Date: Fri, 24 Jun 2022 23:58:24 +0200	[thread overview]
Message-ID: <ffef1020-2760-8d64-3ad4-cf3f8c30e0a0@gmx.at> (raw)
In-Reply-To: <87zgi1lpnd.fsf@gnus.org>


[-- Attachment #1.1: Type: text/plain, Size: 2326 bytes --]

Hi,

Am 24.06.22 um 23:25 schrieb Lars Ingebrigtsen:
> Harald Judt <h.judt@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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2022-06-24 21:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 17:12 bug#56203: 28.1; completing-read-multiple fails from inside the completion table Harald Judt
2022-06-24 21:25 ` Lars Ingebrigtsen
2022-06-24 21:58   ` Harald Judt [this message]
2022-06-24 22:04     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ffef1020-2760-8d64-3ad4-cf3f8c30e0a0@gmx.at \
    --to=h.judt@gmx.at \
    --cc=56203@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).