emacs-devel
[Top][All Lists]
Advanced

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

Re: Ligatures


From: Clément Pit-Claudel
Subject: Re: Ligatures
Date: Tue, 19 May 2020 10:35:50 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 19/05/2020 09.59, Eli Zaretskii wrote:
>> Cc: address@hidden
>> From: Clément Pit-Claudel <address@hidden>
>> Date: Mon, 18 May 2020 22:44:27 -0400
>>
>>>> In an earlier thread, you mentioned programming font ligatures — wouldn't 
>>>> it be very common to deconstruct such ligatures, like → into ->?
>>>
>>> No, I don't think so.  Why would this be common?
>>
>> I thought it would be the default. Emacs shows →, and you can put the point 
>> either before (|→), in the middle (-|>), or after (→|).
> 
> Doesn't sound as a useful default to me.  It could be an optional
> feature, though.

Do we know of other editors that support ligatures but chose not to support 
moving through a composed character?  If not, that would be a fairly strong 
signal that it's a reasonable default, I'd expect.
 
>> Here's a fairly common case: when writing html or XML, you may type <, then 
>> >, then press C-b and type the tag name; or you may use < and a paredit-like 
>> setup that inserts the > automatically.  If the font has a ligature for <> 
>> and you can't put the point in the middle, this breaks.  Same for || — the 
>> notation |x| { … } is used for lambdas in some languages; if you type || 
>> then try to move the point back inside the composed || glyph it won't work.
> 
> Sounds like a bug or misfeature that needs a solution, not necessarily
> the one that's been proposed here.

Possibly! But the feature discussed here seems to fit the bill pretty 
perfectly, so …

> For example, how about a special
> insert command that would disable ligation with the character it
> inserts?

Would that command be called automatically, or would it require a different 
input?
I don't think Emacs can guess whether it should enable or disable ligation, so 
I imagine you mean different input, but that doesn't sound pleasant to use, so 
maybe I'm misunderstanding?



reply via email to

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