From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.bidi Subject: Re: Mixed L2R and R2L paragraphs and horizontal scroll Date: Mon, 01 Feb 2010 10:36:13 -0500 Message-ID: References: <83tyu3iu6b.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265038633 16383 80.91.229.12 (1 Feb 2010 15:37:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Feb 2010 15:37:13 +0000 (UTC) Cc: emacs-bidi@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 01 16:37:08 2010 Return-path: Envelope-to: ged-emacs-devel@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 1NbyKn-0005wt-V1 for ged-emacs-devel@m.gmane.org; Mon, 01 Feb 2010 16:37:06 +0100 Original-Received: from localhost ([127.0.0.1]:39667 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbyKn-0007Pp-Bb for ged-emacs-devel@m.gmane.org; Mon, 01 Feb 2010 10:37:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NbyK6-0006Tp-Tg for emacs-devel@gnu.org; Mon, 01 Feb 2010 10:36:22 -0500 Original-Received: from [199.232.76.173] (port=51894 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NbyK2-0006O8-J4 for emacs-devel@gnu.org; Mon, 01 Feb 2010 10:36:18 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NbyK1-0006T2-6E for emacs-devel@gnu.org; Mon, 01 Feb 2010 10:36:18 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:59982 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NbyJy-0006SK-Kg; Mon, 01 Feb 2010 10:36:14 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAEKDZktFpaN9/2dsb2JhbACBM9kDhEUEilo X-IronPort-AV: E=Sophos;i="4.49,383,1262581200"; d="scan'208";a="55063506" Original-Received: from 69-165-163-125.dsl.teksavvy.com (HELO pastel.home) ([69.165.163.125]) by ironport2-out.pppoe.ca with ESMTP; 01 Feb 2010 10:36:13 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 1D9647F8A; Mon, 1 Feb 2010 10:36:13 -0500 (EST) In-Reply-To: <83tyu3iu6b.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 30 Jan 2010 15:44:28 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:120780 gmane.emacs.bidi:491 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. That's a tricky question indeed. I don't know if there are other text editors with similar problems from which to get inspiration. So it seems we have 3 options: - "saturated scrolling" where hscroll can be positive or negative and l2r lines won't scroll at all when hscroll is negative and vice-versa. - "inverted scrolling" where hscroll is always positive and is interpreted as scrolling in the direction of the line, so the direction can change from one line to the next. - "rigid scrolling" where the window-width determines the distance between l2r's leftmost position and r2l's rightmost position and then the text is taken as extending both left and right from those, so hscroll can be positive or negative and lines can be scrolled "before their beginning". Inverted scrolling seem to be easier to implement. It has the downside that C-x > will scroll "the other way" in R2L contexts, but maybe it's not that terrible: there's always a source of confusion when talking about scrolling direction anyway, because we can either think of scrolling the text under a fixed window, or scrolling a window over a fixed text. Stefan