emacs-devel
[Top][All Lists]
Advanced

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

Re: Highlighting cursor for char before


From: Alexandre Garreau
Subject: Re: Highlighting cursor for char before
Date: Wed, 27 Oct 2021 16:44:35 +0200

Sorry I missed your mail:

Le lundi 18 octobre 2021, 15:26:24 CEST Eli Zaretskii a écrit :
> > From: Alexandre Garreau <galex-713@galex-713.eu>
> > Date: Mon, 18 Oct 2021 14:36:30 +0200
> > 
> > TL;DR:  I know we can make the cursor so thin it becomes a bar like in
> > other apps, instead of highlighted following char… but how to make it
> > highlight the *previous* char? is there a way? that would be more
> > logical and less confusing, especially when switching between ltr and
> > rtl
> Your assumptions and some facts are not entirely correct.

Which ones? I’m not sure you understood me correctly

> First, the default block cursor is displayed correctly both in LTR and
> RTL context in Emacs.  I'm not aware of any problems there.

I never said it was incorrect, in fact the display of the block cursor is 
totally consistent whatever the direction is, and follow the same legacy 
semantics.  What I’m questioning is the confuseness of that legacy 
semantic, and I ask/propose for an option to reverse that semantic.  I’d 
like the cursor to highlight the char before point instead of the char 
after.  Currently in emacs (and any program with a block cursor (with 
which emacs is consistent as well), for the matter), it’s the opposite.

> Next, which character will be erased by DEL is indeed
> context-dependent, but experienced readers of bidirectional scripts
> have no trouble knowing which one almost instinctively.

Wait no, DEL always erase the char *before* isn’t it? (then, the question 
of “where is displayed ‘before’ and ‘after’” is the context-changing 
thing, right?)

> Most importantly, it is entirely non-trivial to determine which is the
> "character before", in bidirectional text.  Look at the code of
> move-point-visually to see how non-trivial it is to solve a similar,
> but different problem: which character is the one to the right or to
> the left of the current one.

I do a distinction in phrasing between “before” and “to the left”, and 
“after” and “to the right”, for semantical and confusion-avoiding purpose.  
So, if I understand correctly (and I always though to understand that but 
maybe the terminology I don’t): the “character before” is trivial but 
what’s not trivial is “the character at left/right”, right?  I mean, 
before/after, for me, is only a matter of time and/or order in the buffer 
(most near to beginning = before, most near to end = after), and that 
stays linear and context-independent (like if I only use C-b and C-f, 
which follows not spatial direction but semantical order of chars as 
stored in the buffer), while only the visual thing is…

Do we understand each other correctly?

I mean, a blind user using emacspeak, and only using semantical commands 
such as C-b and C-f, and never the arrows (or other visual commands such 
as move-point-visually), should never see a difference between ltr and rtl, 
right? that’s purely a display/visual thing, all languages have 
“beginning” and “end” and serialized orally (remove “orally” in the 
exceptional case of sign languages) in a temporally linear way, afaik.

Anyway what I meant is that I find the current display of block cursor 
consistent and anti-confusing when you use a computer in erase/ovrwt-mode, 
while I find it confusing in insert-mode.  I only just found that this 
confusion is further increased when you switch text direction while you 
are a newbie at it

> So if someone wants to submit patches to
> support such "before" cursor, I'm sure such patches will be welcome,
> but it's a significant job to come up with something like that, IMO.

Ok that was precisely what I wanted to know (especially as I totally trust 
your opinion for that matter, as a beginning (is that treated in xdisp.c 
as well?)), except given the misunderstandment above I’m unsure you 
correctly understood what I meant… I meant the precise opposite of what 
the block cursor currently does… is that so complex?



reply via email to

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