From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#8506: 24.0.50; Wrong column count Date: Fri, 15 Apr 2011 17:56:21 +0300 Message-ID: <83lizbpnqi.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1302880057 30145 80.91.229.12 (15 Apr 2011 15:07:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 15 Apr 2011 15:07:37 +0000 (UTC) Cc: 8506@debbugs.gnu.org To: Eli Barzilay Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 15 17:07:32 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QAkcM-0001fG-L0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Apr 2011 17:07:30 +0200 Original-Received: from localhost ([::1]:50912 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAkcM-0001ph-3q for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Apr 2011 11:07:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAkcJ-0001p9-TB for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2011 11:07:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QAkcF-0006sE-MU for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2011 11:07:27 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAkcF-0006sA-Kv for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2011 11:07:23 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QAkSE-0002Vg-G7; Fri, 15 Apr 2011 10:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Apr 2011 14:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8506-submit@debbugs.gnu.org id=B8506.13028793999617 (code B ref 8506); Fri, 15 Apr 2011 14:57:02 +0000 Original-Received: (at 8506) by debbugs.gnu.org; 15 Apr 2011 14:56:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QAkRq-0002V4-5A for submit@debbugs.gnu.org; Fri, 15 Apr 2011 10:56:38 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QAkRk-0002Un-MK for 8506@debbugs.gnu.org; Fri, 15 Apr 2011 10:56:37 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LJP00F006O4UM00@a-mtaout23.012.net.il> for 8506@debbugs.gnu.org; Fri, 15 Apr 2011 17:56:25 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.191.204]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LJP00FV485YTE60@a-mtaout23.012.net.il>; Fri, 15 Apr 2011 17:56:24 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 15 Apr 2011 10:57:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45823 Archived-At: > From: Eli Barzilay > Date: Fri, 15 Apr 2011 07:48:45 -0400 >=20 > Column numbers in the mode line are wrong with certain characters, = I've > seen this with angle brackets. To reproduce the problem: >=20 > * Start emacs and go to the scratch buffer > * M-x column-number-mode > * C-\ sgml RET > * enter ⟨ >=20 > The column number that is shown is 2. This is intentional. The character that is inserted by the above is =E2=8C=A9, u+2329 (LEFT-POINTING ANGLE BRACKET), and that character i= s marked as "W" (meaning Wide) in the Unicode Data Base, see here: http://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt Therefore, characters.el has this: ;; 2: East Asian Wide and Full-width characters. (let ((l '((#x1100 . #x115F) =09 (#x2329 . #x232A) <<<<<<<<<<<<<<<<<<<< =09 (#x2E80 . #x303E) =09 (#x3040 . #xA4CF) =09 (#xAC00 . #xD7A3) =09 (#xF900 . #xFAFF) =09 (#xFE30 . #xFE6F) =09 (#xFF01 . #xFF60) =09 (#xFFE0 . #xFFE6) =09 (#x20000 . #x2FFFF) =09 (#x30000 . #x3FFFF)))) (dolist (elt l) (set-char-table-range char-width-table elt 2))) and consequently (aref char-width-table ?\=E2=8C=A9) =3D> 2. That's = why Emacs thinks you are in column 2 after this character: it is told that its width is 2. However, at least on my machine, with "Arial Unicode MS" font, the character actually displays thinner than normal, so perhaps the font is wrong. OTOH, this page: http://en.wikipedia.org/wiki/Bracket says that these two characters "are canonically equivalent to the CJK code points U+300x and thus likely to render as double-width symbols"= . Unless someone comes up with a good reason why we should change the width of this character in char-width-table, or there are other characters which somehow defeat the column numbers, I suggest to clos= e this bug.