unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexandre Garreau <galex-713@galex-713.eu>
To: emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: Highlighting cursor for char before
Date: Wed, 27 Oct 2021 16:44:35 +0200	[thread overview]
Message-ID: <2960319.aSkrYHcR6s@galex-713.eu> (raw)
In-Reply-To: <83fssyea67.fsf@gnu.org>

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	other threads:[~2021-10-27 14:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 12:36 Highlighting cursor for char before Alexandre Garreau
2021-10-18 13:26 ` Eli Zaretskii
2021-10-27 14:44   ` Alexandre Garreau [this message]
2021-10-27 15:59     ` Eli Zaretskii
2021-10-27 18:49       ` Alexandre Garreau
2021-10-27 19:04         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2960319.aSkrYHcR6s@galex-713.eu \
    --to=galex-713@galex-713.eu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).