[Cuis-dev] [IMPROV] Code completion for backslash Unicode input

Gerald Klix cuis.01 at klix.ch
Mon Jul 31 07:05:28 PDT 2023


On 7/31/23 1:56 PM, Juan Vuletich wrote:
> Hi Gerald,
>
> (inline and abridged)
>
> On 7/30/2023 12:48 PM, Gerald Klix via Cuis-dev wrote:
>> Hi juan,
>>
>> please see below.
>>> 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?
>
> I think all of them should be displayed. For instance, in an empty 
> browser enter [7] [a] [tab]. The list will get shorter as you press 
> additional keys.
>
>>> - [\] [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?
>
> I'd display _only_ entries matching prefix. Just like any other list 
> shown by the completer. I think it is what everybody expects. If one 
> doesn't know how to spell something, we enter a reasonable prefix and 
> look for it in the list.
>
> When you are at it, please make '\o' match both 'omega' and 'Omega'. 
> And please sort them alphabetically by name, or by code point (not 
> sure what is better).
>
>>> - 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.
>
> Ok. It just wasn't clear to me.
>
>> 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.
>
> Maybe... But perhaps a specific dialog that can filter by code page or 
> kind of code point, do searches, etc would be better. It could also 
> handle code points both in hex and decimal.
>
>> BTW: Is UnicodeData.txt still needed at the image location?
>>
>>
>> Looking forward to your feedback,
>>
>>
>> Gerald
>
> Thanks!
>
OK, I will change it as you suggested.


Best Regards,

Gerald


More information about the Cuis-dev mailing list