unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alexandre Garreau <galex-713@galex-713.eu>
Cc: emacs-devel@gnu.org
Subject: Re: Highlighting cursor for char before
Date: Mon, 18 Oct 2021 16:26:24 +0300	[thread overview]
Message-ID: <83fssyea67.fsf@gnu.org> (raw)
In-Reply-To: <1844951.jBraE47yQ0@galex-713.eu> (message from Alexandre Garreau on Mon, 18 Oct 2021 14:36:30 +0200)

> 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.

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

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.

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.  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.



  reply	other threads:[~2021-10-18 13:26 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 [this message]
2021-10-27 14:44   ` Alexandre Garreau
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=83fssyea67.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=galex-713@galex-713.eu \
    /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).