[Cuis-dev] [IMPROV] Code completion for backslash Unicode input
Gerald Klix
cuis.01 at klix.ch
Sun Jul 30 08:48:18 PDT 2023
Hi juan,
please see below.
On 7/30/23 4:51 PM, Juan Vuletich wrote:
> On 7/28/2023 2:30 PM, Gerald Klix via Cuis-dev wrote:
>> Hi all, Hi Juan, Hi Hernán,
>>
>> I implemented my suggestion concerning code completion for Unicode.
>> It offers code completion for any "\Unicode" prefix.
>> The Unicode character is inserted directly without displaying
>> its name and replacing it.
>>
>> Please review and test this stuff before integration.
>>
>>
>> HTH and Best Regards,
>>
>> Gerald
>
> Hi Gerald,
>
> When I tried loading this in a fresh Cuis image and tried to use it I
> saw several issues:
> - Just doing [\] [tab] would not open the completion list
That is the intended behavior, but as long as the list of names remains
short,
the whole list can be displayed in this case, probably it should. What
do you think?
> - [\] [o] [tab]. Expected a list including \omega, but got a walkback
Shouldn't happen (of course). Just retested it.
The issue is that the completer's instance variable
"possibleInvalidSelectors"
is obviously set as a side effect of the selector computation, which
does compute
nothing in this case. Of course there is a solution -- check for nil.
Maybe Hernán can comment on this one.
> - Don't remember what I did with the walkback, but when I got rid of
> it, the completion list had many entries that didn't match what I had
> entered ('\o')
It uses #correctAgainstDictionary:continuedFrom:, because a I thought
the names are hard to guess, unless you know Latex.
Of course this can be changed.
Probably exact prefix matches should be displayed first.
Again, what's your opinion?
> - Found no way to use it with your new hex input
Jup, won't work. Actually if you have '\+' the list would be too long,
comprising more than one code plane (17 according to Wikipedia).
IHMO, Completion for numerical input does not make sense.
Maybe -- I am not sure -- if you have '\+*61' we could interpret
this as a pattern and show 61, 161, 261, ... 9161 ...
Probably still to long a list.
I strongly prefer not to implement completion for this case,
until we know better.
I also thought about something like '\+UNICODE_NAME' where UNICODE_NAME is
taken from UnicodeData.txt: '\, so one write
"\+LATIN_CAPITAL_LETTER_A_WITH_TILDE" and it will be replaced with "Ã".
For such a form of input, completion would make sense;
actually it is unusable without completion.
Of course, this should not be in the standard image,
because it will consume a lot of memory.
BTW: Is UnicodeData.txt still needed at the image location?
Looking forward to your feedback,
Gerald
More information about the Cuis-dev
mailing list