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: Sat, 28 May 2011 00:09:31 +0300 Message-ID: <83tycfc0l0.fsf@gnu.org> References: <6F4054004B154CFB8E2753172D316C13@us.oracle.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1306530579 24131 80.91.229.12 (27 May 2011 21:09:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 May 2011 21:09:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 27 23:09:34 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 1QQ4Hm-0007It-Bl for ged-emacs-devel@m.gmane.org; Fri, 27 May 2011 23:09:34 +0200 Original-Received: from localhost ([::1]:37687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ4Hl-0003HX-J0 for ged-emacs-devel@m.gmane.org; Fri, 27 May 2011 17:09:33 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ4Hi-0003G0-Q6 for emacs-devel@gnu.org; Fri, 27 May 2011 17:09:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQ4Hh-0002uX-Qp for emacs-devel@gnu.org; Fri, 27 May 2011 17:09:30 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:49268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ4Hh-0002uK-JU for emacs-devel@gnu.org; Fri, 27 May 2011 17:09:29 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LLV00J00H8QM000@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Sat, 28 May 2011 00:09:28 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.126.221.158]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LLV00ID3HFQ9YM0@a-mtaout22.012.net.il>; Sat, 28 May 2011 00:09:28 +0300 (IDT) In-reply-to: <6F4054004B154CFB8E2753172D316C13@us.oracle.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.172 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:139777 Archived-At: > From: "Drew Adams" > Date: Fri, 27 May 2011 13:40:37 -0700 > > I'm curious. Why is it a good idea that `C-b' and `left' are no longer bound to > the same command? Because `left' and `right' behave differently depending on the bidirectional context, whereas C-f and C-b are independent of it. > I'm not asking about the difference; I can see that from the doc strings. I'm > wondering why we've broken their longstanding correspondence. Because users of right-to-left scripts expect the current behavior of the arrow keys. > Lots of Emacs and Emacs Lisp does things based on which commands are used. It's > sometimes not enough that two commands behave the same or similarly. If they > are different commands then some code will likely not DTRT - some code will at > least not treat them the same. If you can suggest a way of catering to expectations of bidi users without binding differently arrow and keyboard keys to cursor movement commands, please do. > Even if the bidi stuff specifies the same behavior for `backward-char' and > `left-char' whenever there is in fact no bidirectional stuff present It does. > Why not make bidi optional? It _is_ optional: you can set bidi-display-reordering to nil. (Well, actually it's nil now, but the plan is to make it t at some point before Emacs 24 is released.) > Why not have a minor mode for the bidi stuff Bidi cannot be a minor mode, because bidi reordering for display should happen automatically whenever there are right-to-left characters in a buffer. Minor modes don't work that way. Besides, the rest of the world does bidi automatically; it's high time Emacs does, too. > only bind keys such as `left' to commands that are specific to bidi when that > mode is turned on? Why make such an invasive, top-level change to Emacs? As I said: if you have practical suggestions (preferably with code), let's hear them. I made that change because every other program out there differentiates the functions bound to these keys, but of course if there's a better way of doing that in Emacs, I don't have any dogmas here. > I understand that bidi is a great addition to Emacs and will be welcomed by > folks around the world. I also realize that it is complex to implement. But > some of us will rarely, if ever, use it. Emacs should behave exactly the same as it does without bidi when the text doesn't include any right-to-left characters. Anything else is a bug. The only reason why the bidi-display-reordering flag will stay is because unibyte buffers should not be reordered.