From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: `C-b' is backward-char, `left' is left-char - why? Date: Sun, 05 Jun 2011 22:22:12 +0300 Message-ID: <83lixgccd7.fsf@gnu.org> References: <6F4054004B154CFB8E2753172D316C13@us.oracle.com> <4DE4F8D0.7010800@lanl.gov> <82y61l16bg.fsf@gmail.com> <87vcwo40tn.fsf@fencepost.gnu.org> <834o48f6sa.fsf@gnu.org> <8762on3rvj.fsf@fencepost.gnu.org> <83lixjdkae.fsf@gnu.org> <201106051651.p55GpANm013542@beta.mvs.co.il> <83oc2ccign.fsf@gnu.org> <201106051719.p55HJDMZ023870@beta.mvs.co.il> <87y61g195p.fsf@fencepost.gnu.org> <83mxhwcgvn.fsf@gnu.org> <87pqms16fa.fsf@fencepost.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1307301764 25517 80.91.229.12 (5 Jun 2011 19:22:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Jun 2011 19:22:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 05 21:22:40 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QTIuG-000776-Eq for ged-emacs-devel@m.gmane.org; Sun, 05 Jun 2011 21:22:40 +0200 Original-Received: from localhost ([::1]:59952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTIuF-0001TB-9E for ged-emacs-devel@m.gmane.org; Sun, 05 Jun 2011 15:22:39 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTItw-0001Sh-DV for emacs-devel@gnu.org; Sun, 05 Jun 2011 15:22:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTItu-0004N7-Dn for emacs-devel@gnu.org; Sun, 05 Jun 2011 15:22:19 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:43803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTItq-0004IZ-PA; Sun, 05 Jun 2011 15:22:15 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LMC00700074MF00@a-mtaout23.012.net.il>; Sun, 05 Jun 2011 22:22:13 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.223.140]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LMC007SC0GZL620@a-mtaout23.012.net.il>; Sun, 05 Jun 2011 22:22:13 +0300 (IDT) In-reply-to: <87pqms16fa.fsf@fencepost.gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.175 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140210 Archived-At: > From: David Kastrup > Date: Sun, 05 Jun 2011 20:26:01 +0200 > > > The problems with this are not logical, they are with implementing it > > (both the movement itself and the resulting selection and highlight). > > Patches are welcome. > > The resulting selection and highlight appear to do just what is needed > already and don't seem to have a problem with visual discontinuity. > > So only the movement itself would appear to be an issue. Only if you accept the way the region is currently highlighted, as several disjoint stretches of text. People who want strict visual operations might want something else, like contiguous regions. > If one has text like > > llllllllRRRRRRRRllllll That's the easy use case. Try figuring out the more complicated ones with embeddings and directional overrides. UAX#9 allows up to 62 levels of nested embeddings, with or without directional overrides, and Emacs supports them all. Logical movement through that is clear, but visual one... last time I tried my mind boiled. > llllllllRRRRRrrrllllll > lllllllLrrrrrRRRllllll I find this flipping confusing and unexpected, but if someone wants this, I don't mind. > Actually, I've just tried entering mixed L2R and R2L stuff with the > keyboard and bidi-display-reordering set, and I find it quite > distracting that the insertion point for "reversed" text (with regard to > the current paragraph direction) gets increasingly distant from the > cursor itself. I just did the minimal change in the original redisplay design, whereby the cursor is placed on the character _after_ the insertion point in the logical order. Even that required a total rewrite of the function that figures out where to draw the cursor. Patches are welcome to rewrite it again so as to keep the cursor closer to the insertion point. Actually, TRT would be to split the cursor in two, because it plays two different roles whose correct positions in this case do not coincide. That would need an even deeper surgery, including in terminal-specific parts -- xterm.c, w32term.c, etc. And what to do on a TTY with its hardware cursor? IOW, if people are queuing up to improve the bidi display, there's enough work here for several lifetimes.