unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Štěpán Němec" <stepnem@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 4839@emacsbugs.donarmstrong.com
Subject: bug#4839: 23.1.50; *Buffer List* -- incorrect handling of multibyte characters?
Date: Mon, 2 Nov 2009 16:55:45 +0100	[thread overview]
Message-ID: <20091102155545.GC14203@headley> (raw)
In-Reply-To: <m34opdue8s.fsf@hase.home>

On Mon, Nov 02, 2009 at 04:40:19PM +0100, Andreas Schwab wrote:
> Štěpán Němec <stepnem@gmail.com> writes:
> 
> > On Mon, Nov 02, 2009 at 04:08:16AM -0500, Glenn Morris wrote:
> >> stepnem@gmail.com wrote:
> >> 
> >> > Here is a part of my *Buffer List*:
> >> >
> >> >     desktop-menu.el      20228  Emacs-Lisp        ~/.emacs.d/load/desktop-menu.el
> >> [...]
> >> >     面無人色.org         11681  Org               ~/Documents/ling/cn/面無人色.org
> >> >     xhc.org               1833  Org               ~/Documents/ling/cn/xhc.org
> >> >     词典.org              2940  Org               ~/Documents/ling/cn/词典.org
> >> [...]
> >> > All the `Org' lines, with exception of `xhc.org', are misaligned.
> >> 
> >> 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 name
> >> 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 buffer,
> > it's misaligned again, the exact same way as displayed in the *Buffer List*...
> 
> 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 -- after
all, there are other than mono-spaced fonts, so the common base might in
fact not be a necessary condition...?





  reply	other threads:[~2009-11-02 15:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87ocnfmpm2.fsf@stupidchicken.com>
2009-10-31 13:46 ` bug#4839: 23.1.50; *Buffer List* -- incorrect handling of multibyte characters? stepnem
2009-11-02  9:08   ` Glenn Morris
2009-11-02 15:21     ` Štěpán Němec
2009-11-02 15:40       ` Andreas Schwab
2009-11-02 15:55         ` Štěpán Němec [this message]
2009-11-02 22:49         ` Jason Rumney
2009-11-02 15:44     ` Štěpán Němec
2009-11-06 19:20   ` bug#4839: marked as done (23.1.50; *Buffer List* -- incorrect handling of multibyte characters?) Emacs bug Tracking System
2009-11-03 16:05 bug#4839: 23.1.50; *Buffer List* -- incorrect handling of multibyte characters? Chong Yidong
2009-11-03 17:02 ` Štěpán Němec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091102155545.GC14203@headley \
    --to=stepnem@gmail.com \
    --cc=4839@emacsbugs.donarmstrong.com \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).