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: bug#16961: left-char moves to beginning of line; visual-order-cursor-movement Date: Sat, 08 Mar 2014 10:03:12 +0200 Message-ID: <83siqtp16n.fsf@gnu.org> References: <974DC76B-2C9D-4A3A-90B8-EFEBA25D0885@gmail.com> <83wqg5pyhi.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1394265807 29843 80.91.229.3 (8 Mar 2014 08:03:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2014 08:03:27 +0000 (UTC) Cc: markoilcan@gmail.com, emacs-devel@gnu.org To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 08 09:03:34 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WMCEF-0004ff-Sl for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2014 09:03:32 +0100 Original-Received: from localhost ([::1]:39702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMCEF-0003R0-Hp for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2014 03:03:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMCE6-0003Qj-SM for emacs-devel@gnu.org; Sat, 08 Mar 2014 03:03:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMCE0-00017P-3v for emacs-devel@gnu.org; Sat, 08 Mar 2014 03:03:22 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:59333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMCDz-000170-St for emacs-devel@gnu.org; Sat, 08 Mar 2014 03:03:16 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0N2300G00Y0KC200@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Sat, 08 Mar 2014 10:03:14 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N2300GAKYDD7550@a-mtaout22.012.net.il>; Sat, 08 Mar 2014 10:03:14 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 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:170223 Archived-At: > From: David Reitter > Date: Fri, 7 Mar 2014 21:38:38 -0600 > Cc: M A , > "emacs-devel@gnu.org developers" >=20 > On Mar 7, 2014, at 2:03 PM, Eli Zaretskii wrote: >=20 > > HL Line Mode, the Mother Of All Evil=85 >=20 > Couldn=92t the core of this be implemented in redisplay instead of = in Lisp? Indeed, I think it could be, similarly to the current implementation of the region highlight. Volunteers are welcome. > (I=92m assuming it places overlays in the buffer.) It moves an overlay in a post-command-hook, which makes the window display "non-current", and disables a lot of redisplay optimizations as result. The default mode of operation of visual-order cursor-movement is to traverse the glyph matrices that describe what'= s on the glass, but it can only do that if the display is marked "current". Otherwise, it falls back to Plan B, which is much trickie= r (it needs to simulate the display without actually performing it), an= d where the use of word-wrap caused this bug. > > Does this mean "Aquamacs without customizations" has > > visual-order-cursor-movement set to t? If so, I think it's not a= good > > idea at all: that variable is user-level customization, it should= n't > > be forced on the users. >=20 > Users can change it the way the want it. Users can change the default no matter what its value. The question for defaults is what would most of the users want. > Aquamacs just sets a different default, as it does with a lot of se= ttings. I'm talking specifically about this one. You will notice that I didn't say anything about turning on visual-line-mode by default. > The reason why I=92m doing this is that otherwise, left/right keys = do not move left/right movement of the cursor (in RTL or mixed text),= and that would be incoherent with other situations in the system whe= re users edit RTL text. What other situations with bidirectional text trigger different behavior? And what do you mean by "the system" here? Anyway, AFAIK most, if not all, of the apps that support bidirectiona= l text default to logical-order cursor movement. Some don't even support visual-order movement as an option. Visual-order movement might look nice to someone who doesn't speak languages which use bidirectional scripts, but it is seldom needed by those who do speak them, because in some contexts it moves the cursor into a place that is significantly different from where it should be according to the reading order. Their other effects are also weird, e.g. try moving the cursor with the Shift key pressed, and watch the region highlight= . So I expect your default to be a significant surprise for users of bidirectional scripts. OTOH, users of unidirectional scripts will never notice it (apart of bugs such as this one), because the effect is indistinguishable from logical-order movement. The only effect on users of unidirectional scripts is that cursor motion is more expensive in CPU usage than the logical-order movement, which is hardly a good trade-off. > Do you have a better suggestion? Yes: keep the upstream default for this one. Its value is not an accident, but rather well thought-of.