emacs-devel
[Top][All Lists]
Advanced

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

Re: Add completion to compilation-read-command


From: Spyros Roum
Subject: Re: Add completion to compilation-read-command
Date: Wed, 25 Dec 2024 15:44:42 +0000

Philip Kaludercic wrote:
To make sure I understand correctly, when using `completing-read` to
read user input, that is narrowing,
while the `C-x <up>` and *Completions* buffer is completion. 
No, `completing-read' just invokes an interface, that frontends can
implement a UI for.  The default UI provides a completing/expanding
interface, while Vertico, Helm, Ivy, etc. do selecting/narrowing.  When
using `completing-read' you cannot really assume one or the other, so in
effect one has to find a middle ground.  It is best you try your code in
emacs -Q without any changes and see how it behaves.  Things like SPC
doing something else than you would expect is just one pitfall, others
I can recall are providing text that is difficult to input (I wrote a
package a few years back called "insert-kaomoji" that used
`completing-read' to prompt the user eastern-style emoticons; it is easy
to use with a selecting framework, but more inconvenient if the user is
first made to complete a string that is difficult to write, as most of
the characters are not easy to type).

I tried the attached patch with `emacs -q` and now I understand how this would be very annoying without something like vertico installed haha. Nevertheless, it seems to work!

I'm attaching a patch based on the conversation so far to get feedback on.

I believe I should also write something to the NEWS file.

Also, I'm wondering if this counts as non-trivial enough that I would need to sign the FSF copyright.

Regarding testing, as far as I can tell, there are currently no tests for `compilation-read-command`.
Should I add anything? If yes, I'll probably need someone to point to existing tests for similar things that I can copy from.

Am I forgetting anything else?

Attachment: 0001-Add-option-for-making-compilation-read-command-use-c.patch
Description: Text Data


reply via email to

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