From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#3452: 23.0.94; display Date: Mon, 08 Jun 2009 20:57:06 +0900 Message-ID: References: <877hzoogc1.fsf@cyd.mit.edu> Reply-To: Kenichi Handa , 3452@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1244463501 24031 80.91.229.12 (8 Jun 2009 12:18:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jun 2009 12:18:21 +0000 (UTC) Cc: 3452@emacsbugs.donarmstrong.com, cyd@stupidchicken.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 08 14:18:17 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 1MDdns-0002HO-N7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jun 2009 14:18:17 +0200 Original-Received: from localhost ([127.0.0.1]:48727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDdnr-0006Bp-Uk for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jun 2009 08:18:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDdn5-00067n-HA for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2009 08:17:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDdn0-000661-CY for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2009 08:17:26 -0400 Original-Received: from [199.232.76.173] (port=37913 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDdn0-00065u-7A for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2009 08:17:22 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42537) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MDdmz-0006mn-J0 for bug-gnu-emacs@gnu.org; Mon, 08 Jun 2009 08:17:22 -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 n58CHJ1a016591; Mon, 8 Jun 2009 05:17:19 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n58C55NY013854; Mon, 8 Jun 2009 05:05:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Kenichi Handa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 08 Jun 2009 12:05:04 +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.124446223412794 (code B ref 3452); Mon, 08 Jun 2009 12:05:04 +0000 Original-Received: (at 3452) by emacsbugs.donarmstrong.com; 8 Jun 2009 11:57:14 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n58Bv9gU012789 for <3452@emacsbugs.donarmstrong.com>; Mon, 8 Jun 2009 04:57:11 -0700 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id n58Bv8Ba013054; Mon, 8 Jun 2009 20:57:08 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id n58Bv7bA027948; Mon, 8 Jun 2009 20:57:07 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id n58Bv6Bi009734; Mon, 8 Jun 2009 20:57:06 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken with local (Exim 4.69) (envelope-from ) id 1MDdTO-00031x-Np; Mon, 08 Jun 2009 20:57:06 +0900 In-reply-to: (message from Eli Zaretskii on Mon, 08 Jun 2009 04:44:50 -0400) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 08 Jun 2009 08:17:26 -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:28554 Archived-At: In article , Eli Zaretskii writes: > > From: Kenichi Handa > > CC: 3452@emacsbugs.donarmstrong.com, cyd@stupidchicken.com > > Date: Mon, 08 Jun 2009 17:10:27 +0900 > > > > Not for U+202D, but such combining characters as U+0300 are > > treated correctly by xterm (not by gnome-terminal). > > > > > > To conclude, I think there's not that much we can do for > > > > this situation. I think the current behaviour of > > > > gnome-terminal (displaying standalone U+202D as a space of > > > > width 1) is a bug. > > > > > If other terminals behave correctly, I would agree. But if not, > > > perhaps we need to work around this, if possible. For example, we > > > could have an entry in display tables for these characters. > > > > It seems xterm, gnome-terminal, GNU/Linux console, and > > mlterm treat U+202D as spacing character, but, Konsole > > (KDE's terminal) and kterm treats it as non-spacing > > character. > Wasn't gnome-terminal the one that started this bug report? I don't know exactly. RMS's bug report just says "a 37-line Linux terminal". > And you even tell above that gnome-terminal does NOT treat > U+202D correctly. So which terminals do? > If xterm, the Linux console and mlterm do work, then maybe your > suggestion to do nothing is good enough. ??? I wrote "Konsole and kterm" treats U+202D as non-spacing character. I think that is the correct way, and the others (gnome-terminal, xterm, and Linux console) are wrong. > Btw, what do you think about my idea to add a display table entry for > these characters? A display table is used both for terminal and window system, but, on a window system, some font may have special glyphs for those characters. If we setup a display table for U+202D, Emacs can't display U+202D by such a glyph on window system. So, if we implement some work-around for such terminal as gnome-terminal, I think it is better to modify compose-gstring-for-terminal so that it replaces U+202D (actually all zero-width characters of Unicode category Cf) with a single SPACE instead of prepending a SPACE. Please try the attached patch. --- Kenichi Handa handa@m17n.org --- composite.el.~1.46.~ 2009-04-20 10:11:33.000000000 +0900 +++ composite.el 2009-06-08 20:45:50.000000000 +0900 @@ -681,7 +681,14 @@ (lglyph-set-from-to glyph i i) (setq i (1+ i)))) (if (= (lglyph-width glyph) 0) - (progn + (if (eq (get-char-code-property (lglyph-char glyph) + 'general-category) + 'Cf) + (progn + ;; Compose by replacing with a space. + (lglyph-set-char glyph 32) + (lglyph-set-width glyph 1) + (setq i (1+ i))) ;; Compose by prepending a space. (setq gstring (lgstring-insert-glyph gstring i (lglyph-copy glyph))