From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Newsgroups: gmane.emacs.bugs Subject: bug#4839: 23.1.50; *Buffer List* -- incorrect handling of multibyte characters? Date: Mon, 2 Nov 2009 16:55:45 +0100 Message-ID: <20091102155545.GC14203@headley> References: <87eiojy8tp.fsf@gmail.com> <20091102152117.GA14203@headley> Reply-To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= , 4839@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1257178074 28033 80.91.229.12 (2 Nov 2009 16:07:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Nov 2009 16:07:54 +0000 (UTC) Cc: 4839@emacsbugs.donarmstrong.com To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 02 17:07:47 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 1N4zRY-0004KD-7i for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2009 17:07:44 +0100 Original-Received: from localhost ([127.0.0.1]:38321 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4zRX-0006DJ-MK for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Nov 2009 11:07:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4zRD-00064G-3d for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2009 11:07:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4zR8-00062Q-I4 for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2009 11:07:22 -0500 Original-Received: from [199.232.76.173] (port=53941 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4zR8-00062F-EP for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2009 11:07:18 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:49759) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N4zR7-0002JZ-Ou for bug-gnu-emacs@gnu.org; Mon, 02 Nov 2009 11:07:18 -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 nA2G7FZt003414; Mon, 2 Nov 2009 08:07:16 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nA2G04mR001794; Mon, 2 Nov 2009 08:00:04 -0800 Resent-Date: Mon, 2 Nov 2009 08:00:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 02 Nov 2009 16:00:04 +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.12571773111303 (code B ref 4839); Mon, 02 Nov 2009 16:00:04 +0000 Original-Received: (at 4839) by emacsbugs.donarmstrong.com; 2 Nov 2009 15:55:11 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail-bw0-f227.google.com (mail-bw0-f227.google.com [209.85.218.227]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA2Ft9nd001164 for <4839@emacsbugs.donarmstrong.com>; Mon, 2 Nov 2009 07:55:10 -0800 Original-Received: by bwz27 with SMTP id 27so8259633bwz.1 for <4839@emacsbugs.donarmstrong.com>; Mon, 02 Nov 2009 07:55:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=2EBb/hHqexm8nYZpQnQ5tr2246rU8s6HUH/wuzQn/CE=; b=LeZBYvrEEFJZV52up9rMpNed3pwuw50usf/E/Jx75xgaoNV/9/SSEFj6dlZRm+jb5d S+tQByQTPWUvI7Au/cLy/xRbM6C0r7MdJSLxZRxUdYhQX1eer82ilotl6guaVrcg+/4T 325g67hsspYjz/BQnyfRF21gp1xbeQH9tvTgU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=CzHT7LmHjthEJHAMtcCtqQemgBrmKfOxlbTRBiHuxX/S+4MkTgJxxB4NbiLRTyetYy mTOOXFaztbnl9a1WbKrCLSag37ZrSTrrkJ3VC0yiRvvyx3+rppMM/1stcu6N7t8RKEuq RCEK67a29I3VVWG5aTpo/nrkxl51APipQ0NGA= Original-Received: by 10.204.34.78 with SMTP id k14mr4099918bkd.106.1257177303087; Mon, 02 Nov 2009 07:55:03 -0800 (PST) Original-Received: from localhost ([88.103.132.186]) by mx.google.com with ESMTPS id z10sm8155641fka.3.2009.11.02.07.55.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 02 Nov 2009 07:55:01 -0800 (PST) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-08-27) X-MIME-Autoconverted: from 8bit to quoted-printable by rzlab.ucr.edu id nA2G7FZt003414 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 02 Nov 2009 11:07:22 -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:32376 Archived-At: On Mon, Nov 02, 2009 at 04:40:19PM +0100, Andreas Schwab wrote: > =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec writes: >=20 > > On Mon, Nov 02, 2009 at 04:08:16AM -0500, Glenn Morris wrote: > >> stepnem@gmail.com wrote: > >>=20 > >> > Here is a part of my *Buffer List*: > >> > > >> > desktop-menu.el 20228 Emacs-Lisp ~/.emacs.d/load/= desktop-menu.el > >> [...] > >> > =E9=9D=A2=E7=84=A1=E4=BA=BA=E8=89=B2.org 11681 Org = ~/Documents/ling/cn/=E9=9D=A2=E7=84=A1=E4=BA=BA=E8=89=B2.org > >> > xhc.org 1833 Org ~/Documents/ling= /cn/xhc.org > >> > =E8=AF=8D=E5=85=B8.org 2940 Org ~/= Documents/ling/cn/=E8=AF=8D=E5=85=B8.org > >> [...] > >> > All the `Org' lines, with exception of `xhc.org', are misaligned. > >>=20 > >> When I copy and paste your buffer names, the issue seems to be that > >> `string-width' returns an incorrect value (eg 13 when the buffer nam= e > >> actually seems to occupy 12). Although some of these characters seem > >> to have a non-integer width on my system, so I don't see that it is > >> possible to get this right. But it still looks more wrong than it > >> should be (off by > 1 character). > > > > Yes -- when I view your quotation from my mail above in Mutt, it's > > aligned correctly, but as soon as I cut & paste it into an Emacs buff= er, > > it's misaligned again, the exact same way as displayed in the *Buffer= List*... >=20 > 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. Indeed, that's what I just realized, too :-) Probably not much, apart from making Emacs smarter in choosing fonts that= do align properly (i.e. the widths are multiples of some common base). I'm not sure how other GUI apps go about that... but I'm guessing there must be ways to align columns properly even in cases like this one -- aft= er all, there are other than mono-spaced fonts, so the common base might in fact not be a necessary condition...?