bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55205: 28.1.50; completion--replace illegally mutates completion can


From: Daniel Mendler
Subject: bug#55205: 28.1.50; completion--replace illegally mutates completion candidates
Date: Sun, 1 May 2022 21:01:57 +0200

On 5/1/22 20:39, Lars Ingebrigtsen wrote:
> Yes, but if the strings are identical (except for the text properties),
> then that's not really an option.

Yes. Just disambiguate the candidate strings. For example in the imdb
use case, you could append the year when the movie appeared. You could
only do this when two movies share the same name. This way the user can
distinguish the candidates by typing the year. The alternative you
mentioned to add an image as annotation (the movie poster), wouldn't
allow to complete the different candidates since the strings themselves
are equal. You would necessarily have to start a *selection process*,
e.g., by opening the Completions buffer or by rotating the candidate
list in Icomplete.

In my Consult package I had similar disambiguation issues, e.g., the
Imenu Java backend produces duplicates for overloaded methods. One can
disambiguate them by appending type information or by simply appending a
number. Another disambiguation issue occurs for Swiper/consult-line
which lets you complete lines in the buffer and jump to them. In this
case on can disambiguate by appending the line number.

Daniel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]