From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#3452: 23.0.94; display Date: Sat, 06 Jun 2009 23:47:26 -0400 Message-ID: <877hzoogc1.fsf@cyd.mit.edu> Reply-To: Chong Yidong , 3452@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1244347058 20382 80.91.229.12 (7 Jun 2009 03:57:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Jun 2009 03:57:38 +0000 (UTC) Cc: 3452@emacsbugs.donarmstrong.com To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 07 05:57:35 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MD9Vm-0002nD-1n for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jun 2009 05:57:34 +0200 Original-Received: from localhost ([127.0.0.1]:35620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MD9Vl-0000SC-9V for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Jun 2009 23:57:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MD9Vg-0000PS-A1 for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2009 23:57:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MD9Va-0000Jb-Vi for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2009 23:57:27 -0400 Original-Received: from [199.232.76.173] (port=59305 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MD9Va-0000Iq-7l for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2009 23:57:22 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52318) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MD9VZ-00068m-FV for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2009 23:57:21 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n573vIqD015351; Sat, 6 Jun 2009 20:57:19 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n573t6BR014786; Sat, 6 Jun 2009 20:55:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 07 Jun 2009 03:55:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3452 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3452-submit@emacsbugs.donarmstrong.com id=B3452.124434644713896 (code B ref 3452); Sun, 07 Jun 2009 03:55:06 +0000 Original-Received: (at 3452) by emacsbugs.donarmstrong.com; 7 Jun 2009 03:47:27 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n573lNwU013889 for <3452@emacsbugs.donarmstrong.com>; Sat, 6 Jun 2009 20:47:24 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 7C2A257E233; Sat, 6 Jun 2009 23:47:26 -0400 (EDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 06 Jun 2009 23:57:27 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:28534 Archived-At: > The problem stems from the character 8237 (#o20055, #x202d), > LEFT-TO-RIGHT OVERRIDE. For some reason, the composition for this > character screws up line wrapping. Hi Handa-san, I investigated some more. Let me know what you think. The entry for 8237 (#x202d) in char-width-table is 0: that is to say, char-width-table reports that the composition has zero width. This is because of the following code in characters.el: (let ((l '((#x0300 . #x036F) ... (#x202A . #x202E) (#xE0001 . #xE01EF)))) (dolist (elt l) (set-char-table-range char-width-table elt 0))) The function fill_gstring_body in composite.c uses char-width-table. However, composition_gstring_width for this character, called in term.c:1830, returns 1. This inconsistency leads to the bug. Sure enough, if I do (aset char-width-table #x202d 1) then the screen corruption goes away. Maybe we should reconsider setting these characters to have zero-width for char-width-table in characters.el, since fill-gstring-body seems to handle zero-width compositions poorly. WDYT?