Subject: bug#77754: 31.0.50; completion-table-with-quoting and completion-lazy-hilit don't work together

From: Spencer Baugh <[email-masked]>
Date: Mon, 11 Aug 2025 12:59:11 -0400

Stefan Monnier <[email-masked]> writes:

>> Fortunately it actually turns out to be much, much simpler than this.
>> We continue to return the quoted completions from
>> completion-all-completions, and just use completion--unquoted for
>> display instead of the quoted completion.
>
> Hmm... my first reaction is that it's an ugly hack, but it's growing
> on me.

Eh, I agree, it's a hack.

Luckily, my earlier rewrite of completion--file-name-table in bug#77718
to not use completion-table-with-quoting seems to be working fine at
this point.  So, we (probably) can just get rid of
completion-table-with-quoting, which will also fix this bug.

The only other in-tree users of completion-table-with-quoting are
pcomplete-completions-at-point and comint--complete-file-name-data.
These are both fairly similar: they are expecting to do completion on
file names which contain escaped characters, e.g. "\ ", as well as
environment variables.  I'll try to rewrite both of these using a
similar approach as completion--file-name-table.  Then we can get rid of
completion-table-with-quoting.

Stefan, does that sound reasonable to you?