Closed jpoiret closed 1 year ago
There is no need to make the API public. You can use it anyway but I won't give guarantees about API stability.
I don't think that there is no need for such a feature, I gave an example in the MR description, although not very fleshed out: Agda provides its own input method, and it is well suited to input the usual Unicode characters needed for Agda, but I don't like the input method mechanism itself, and would prefer a capf to be used with corfu. I understand why you would not want to stabilize this part of the API though.
Do you think a MR that only modifies eval-when-compile
to eval-and-compile
for the helper function so that it's possible to use cape-char--define
at runtime would be okay? That way one could still use those internals, without making any guarantees still.
I see the need, but now that you reminded me about how brittle the code is, I don't want to provide it at all. It is a hack with a fake pure function. It is amazing that I am not getting miscompilation reports. Sorry!
There are two possible solutions:
https://github.com/minad/cape/blob/3ccb3bbd6633e63444de3112a50a6b0f18d8122b/cape-char.el#L29-L31
I see the need, but now that you reminded me about how brittle the code is, I don't want to provide it at all. It is a hack with a fake pure function. It is amazing that I am not getting miscompilation reports. Sorry!
I didn't realize that at first (I'm not an elisp expert in any way) but I totally see your point now.
- Instead write a Capf based on the raw data in agda-mode. I am sure this will lead to a much better result in the end, also since you can integrate more cleanly with other Agda synthesis/completion features.
I realized that this should actually be the way to go right after writing my comment, so I ended up doing that instead. It's not as easy as just adding one elisp line to my config, but should definitely be cleaner and may end up in upstream if I find the time to do that. I took inspiration from your code to add annotations and the :exit-function
:) thanks for your feedback
This makes
cape-char-define
available publicly, so that people are able to translate their own input methods to capfs. This can be used with e.g. Agda's own input method.