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 11:44:31 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 19/05/2020 11.21, Eli Zaretskii wrote:
> And I don't think arguing about defaults in Emacs is useful, because
> changing the default if you don't like it is easy.  We do change the
> default behavior slowly, though.

I see this argument often (changing settings is easy), but I don't find it very 
convincing: in my experience, even after years of using Emacs, figuring which 
variable controls a given behavior, if there is even such a variable, is 
usually not easy: it requires reading manuals, guessing the right keywords, and 
often stepping through function implementations.

It's quite a bit easier in Emacs than in other editors, but still not easy at 
all.

>>> 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?
> 
> You'd invoke it when you either know in advance you don't want the
> next character to ligate, or after you saw the ligature to disable the
> ligation for the sequence at or before point.

That assumes that I know whether inserting a character will introduce a 
ligation, but I usually don't.  I can't keep in my head a list of all the 
ligatures that my font supports, so I'm bound to be surprised from time to time 
(besides, this is very contextual.  When I write a language where /\ and \/ are 
used to mean "and" and "or", I think of it when I type a / or a \.  But when 
I'm in a context where /…/ is used to delimit regular expressions and \ is used 
to escape a character, I don't think of the \/ ligature.

>> 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?
> 
> Emacs cannot, but the user can.  Thus a separate command.

I don't think that will work, but maybe I'm missing something.  How does this 
work if I open a file that already has a ligature and I want to modify it?  Do 
I have to explicitly break the ligature before I can edit it?

More importantly, though, I don't understand what problem it would solve, at 
least in the context of programming ligatures.  What is the problem with 
allowing cursor movement through ligatures like → for ->?



reply via email to

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