From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bidi,gmane.emacs.devel Subject: Mixed L2R and R2L paragraphs and horizontal scroll Date: Sat, 30 Jan 2010 15:44:28 +0200 Message-ID: <83tyu3iu6b.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1264859136 30934 80.91.229.12 (30 Jan 2010 13:45:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Jan 2010 13:45:36 +0000 (UTC) Cc: emacs-bidi@gnu.org To: emacs-devel@gnu.org Original-X-From: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Sat Jan 30 14:45:33 2010 Return-path: Envelope-to: gnu-emacs-bidi@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NbDdg-0000TQ-OI for gnu-emacs-bidi@m.gmane.org; Sat, 30 Jan 2010 14:45:29 +0100 Original-Received: from localhost ([127.0.0.1]:41945 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbDdf-0002dd-CN for gnu-emacs-bidi@m.gmane.org; Sat, 30 Jan 2010 08:45:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NbDdU-0002d3-0S for emacs-bidi@gnu.org; Sat, 30 Jan 2010 08:45:16 -0500 Original-Received: from [199.232.76.173] (port=57397 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbDdT-0002cu-5l for emacs-bidi@gnu.org; Sat, 30 Jan 2010 08:45:15 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NbDdR-0005pQ-JG for emacs-bidi@gnu.org; Sat, 30 Jan 2010 08:45:14 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:56562) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NbDdR-0005pK-6F; Sat, 30 Jan 2010 08:45:13 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0KX200M00BGYU900@a-mtaout20.012.net.il>; Sat, 30 Jan 2010 15:44:26 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.180.161]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KX200M6PBI1U700@a-mtaout20.012.net.il>; Sat, 30 Jan 2010 15:44:26 +0200 (IST) X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-bidi@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of Emacs support for multi-directional text." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Errors-To: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bidi:466 gmane.emacs.devel:120697 Archived-At: Here's a peculiar design decision that needs to be made for the bidi display: how to display horizontally scrolled lines in a buffer with mixed L2R and R2L paragraphs. Let me start with an example of 2 single-line paragraphs (the frame around the text shows the window borders): +---------------------------------------+ |abcdefghijk | | KJIHGFEDCBA| | | +---------------------------------------+ Looks okay, right? But what if I split the window horizontally (with "C-x 3"): +-------------------+-------------------+ |abcdefghijk |abcdefghijk | | KJIHGFEDCBA| KJIHGFEDCBA| | | | +-------------------+-------------------+ Does this look correct? Is anyone bothered by the fact that the relative horizontal position of the two lines has changed, and yet there are no line truncation glyphs anywhere in sight? Some word processors have a rigid length of a line: they display a ruler somewhere above or below the text, and therefore a line's length is known as some fixed multiple of a standard character size. In these word processors, changing the window width preserves the relative horizontal position of L2R and R2L lines. But Emacs does not have a rigid line length, so flushing the R2L lines against the right margin of the window makes their position depend on the window width. Is that okay? (I think it is.) Now let's split the leftmost window again, so lines get truncated: +---------+---------+-------------------+ |abcdefgh$|abcdefgh$|abcdefghijk | |$HGFEDCBA|$HGFEDCBA| KJIHGFEDCBA| | | | | +---------+---------+-------------------+ Does this still look okay? (I think it does.) Now the crucial question: what do you think should happen if I scroll the leftmost window horizontally so that the end of the first line (the characters "ijk") become visible? I think it should be this: +---------+---------+-------------------+ |$ijk |abcdefgh$|abcdefghijk | |$HGFEDCBA|$HGFEDCBA| KJIHGFEDCBA| | | | | +---------+---------+-------------------+ Note that the display of the second line in the leftmost window did not change, and as result, the amounts of horizontal scroll in the 1st and the 2nd lines are different. This is unlike in the current unidirectional display, where all the lines are always hscrolled by the same amount. Does this behavior look reasonable? If not, what are the alternatives? Note that any alternative should be consistent about the fact that Emacs does not have a rigid line length, therefore any initial relative horizontal position of characters (before we split the window) is arbitrary, and is a function of the window's initial arbitrary width.