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#4839: 23.1.50; *Buffer List* -- incorrect handling of multibyte characters? Date: Tue, 03 Nov 2009 11:05:13 -0500 Message-ID: <878wen4mrq.fsf@stupidchicken.com> Reply-To: Chong Yidong , 4839@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 1257265737 13090 80.91.229.12 (3 Nov 2009 16:28:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Nov 2009 16:28:57 +0000 (UTC) Cc: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= , 4839@emacsbugs.donarmstrong.com, Andreas Schwab To: Jason Rumney Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 03 17:28:49 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 1N5MEE-0007KK-4s for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Nov 2009 17:27:30 +0100 Original-Received: from localhost ([127.0.0.1]:42345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5MED-00073W-CH for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Nov 2009 11:27:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5ME9-00073O-1A for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2009 11:27:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5ME3-00072c-QK for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2009 11:27:24 -0500 Original-Received: from [199.232.76.173] (port=35970 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5ME3-00072Z-N1 for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2009 11:27:19 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52162) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N5ME3-0004bt-97 for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2009 11:27:19 -0500 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 nA3GRG3M002559; Tue, 3 Nov 2009 08:27:16 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nA3GA58r001109; Tue, 3 Nov 2009 08:10:05 -0800 Resent-Date: Tue, 3 Nov 2009 08:10:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Tue, 03 Nov 2009 16:10:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4839 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4839-submit@emacsbugs.donarmstrong.com id=B4839.1257264322947 (code B ref 4839); Tue, 03 Nov 2009 16:10:05 +0000 Original-Received: (at 4839) by emacsbugs.donarmstrong.com; 3 Nov 2009 16:05:22 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from pantheon-po25.its.yale.edu (pantheon-po25.its.yale.edu [130.132.50.119]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA3G5KNF000805 for <4839@emacsbugs.donarmstrong.com>; Tue, 3 Nov 2009 08:05:22 -0800 Original-Received: from furry (dhcp128036014244.central.yale.edu [128.36.14.244]) (authenticated bits=0) by pantheon-po25.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id nA3G5EA8024841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 3 Nov 2009 11:05:14 -0500 Original-Received: by furry (Postfix, from userid 1000) id 151BCC070; Tue, 3 Nov 2009 11:05:14 -0500 (EST) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Tue, 03 Nov 2009 11:27:24 -0500 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:32389 Archived-At: > > If the double width characters are not exactly twice as wide as the > > single width characters there is not much that can be done about that. > > > > The columns should be aligned using tab-stops rather than spaces. (tab > characters within file names would need special handling, but these > are rare). Or use the :align-to display property, as in this patch below. Could someone test it? *** emacs/lisp/buff-menu.el.~1.129.~ 2009-11-03 10:38:11.000000000 -0500 --- emacs/lisp/buff-menu.el 2009-11-03 11:02:21.000000000 -0500 *************** *** 678,689 **** (setq name (copy-sequence name))) (add-text-properties 0 (length name) name-props name) (add-text-properties 0 (length size) size-props size) ! (concat name ! (make-string (- Buffer-menu-buffer+size-width ! (string-width name) ! (string-width size)) ! ?\s) ! size)) (defun Buffer-menu-sort (column) "Sort the buffer menu by COLUMN." --- 678,690 ---- (setq name (copy-sequence name))) (add-text-properties 0 (length name) name-props name) (add-text-properties 0 (length size) size-props size) ! (let ((name+space-width (- Buffer-menu-buffer+size-width ! (string-width size)))) ! (concat name ! (propertize (make-string (- name+space-width (string-width name)) ! ?\s) ! 'display `(space :align-to ,(+ 4 name+space-width))) ! size))) (defun Buffer-menu-sort (column) "Sort the buffer menu by COLUMN."