From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: display question: should ^N and \NNN widths be fixed? Date: Mon, 27 May 2002 10:33:13 +0300 (IDT) Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1022485036 1614 127.0.0.1 (27 May 2002 07:37:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 27 May 2002 07:37:16 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17CF48-0000Pv-00 for ; Mon, 27 May 2002 09:37:16 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17CFLN-0008OL-00 for ; Mon, 27 May 2002 09:55:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17CF4R-0003Es-00; Mon, 27 May 2002 03:37:35 -0400 Original-Received: from is.elta.co.il ([199.203.121.2]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17CF25-00035P-00 for ; Mon, 27 May 2002 03:35:09 -0400 Original-Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id KAA07254; Mon, 27 May 2002 10:33:13 +0300 (IDT) X-Sender: eliz@is Original-To: Thien-Thi Nguyen In-Reply-To: Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4418 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4418 On 27 May 2002, Thien-Thi Nguyen wrote: > The current code in indent.c assumes that buffer positions increase > monotonically with screen positions. I'm not saying that you should do > my job of lifting that limitation, but please keep this in mind when you > design and code the new indent.c, so that changing it for bidi Emacs > would not be harder than it is today. > > what makes it difficult to support this lifting, today? Just a lot of coding ;-) The problem is that with bidi display, the relationship between buffer positions and screen positions is no longer a simple monotonically increasing function. For example, if the buffer's contents is this: abcABCdef where upper-case letters stand for right-to-left characters, then it is displayed as abcCBAdef and thus you cannot simply walk the buffer one character at a time and add their display widths to compute the display column. For example, the column of C is 3 (zero-based), not 5. Again, I'm not saying you should solve this problem when you work on your changes. I'm just asking to keep this at the back of your mind when you make design decisions.