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: Mon, 18 May 2020 22:44:27 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 18/05/2020 22.25, Eli Zaretskii wrote:
>> From: Clément Pit-Claudel <address@hidden>
>> Date: Mon, 18 May 2020 15:44:01 -0400
>>
>>> The idea is that this is used only rarely.  Most use cases don't need
>>> to deconstruct a ligature that way; after all, that's what ligatures
>>> are for.
>>
>> 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 (→|).
This is what prettify-symbols-unprettify-at-point exists for, I believe, though 
it doesn't work perfectly often the composed glyph doesn't have the same width 
as the non-composed one.
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.

>> Maybe the effect wouldn't be jarring with monospaced fonts, but for these 
>> the simple approach of subdividing the glyph works nicely too.
> 
> It might work in some simple cases, but I wonder what gains would that
> give the users.  It sounds very unusual to me to do something like
> that, and I don't think we ever heard any such complaints until now,
> although prettify-symbols-mode exists for several years.

I thought I did complain in the past, but I can't find the thread any more :/ 
prettify-symbols-unprettify-at-point helps, and it's the default in some 
popular Emacs configs.



reply via email to

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