From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Highlighting cursor for char before Date: Mon, 18 Oct 2021 16:26:24 +0300 Message-ID: <83fssyea67.fsf@gnu.org> References: <1844951.jBraE47yQ0@galex-713.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36212"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Alexandre Garreau Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 18 15:32:27 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcSkU-0008qI-PD for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Oct 2021 15:32:18 +0200 Original-Received: from localhost ([::1]:48152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcSkT-000495-Lh for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Oct 2021 09:32:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcSei-0002wQ-EO for emacs-devel@gnu.org; Mon, 18 Oct 2021 09:26:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39434) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcSeh-0006Ho-AZ; Mon, 18 Oct 2021 09:26:19 -0400 Original-Received: from [87.69.77.57] (port=3746 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcSeg-0001ps-Jj; Mon, 18 Oct 2021 09:26:19 -0400 In-Reply-To: <1844951.jBraE47yQ0@galex-713.eu> (message from Alexandre Garreau on Mon, 18 Oct 2021 14:36:30 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:277285 Archived-At: > From: Alexandre Garreau > 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.