all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark Oteiza <mvoteiza@udel.edu>
To: Liu Hui <liuhui1610@gmail.com>
Cc: 24972@debbugs.gnu.org
Subject: bug#24972: 26.0.50; Multibyte characters are misaligned in ibuffer
Date: Mon, 21 Nov 2016 04:35:45 -0500	[thread overview]
Message-ID: <20161121093545.GA1654@holos.localdomain> (raw)
In-Reply-To: <39442582-6036-47de-1a7a-4d46e43496c1@gmail.com>

On 21/11/16 at 02:00pm, Liu Hui wrote:
> 在 2016年11月21日 02:58, Mark Oteiza 写道:
> > Liu Hui <liuhui1610@gmail.com> writes:
> > > As shown in the screenshot attached, multibyte characters (the second
> > > line) are misaligned in ibuffer. The problem seems at least relevant
> > > to the function `ibuffer-compile-format', which uses `length' rather
> > > than `string-width' for characters.
> > 
> > Indeed, changing to string-width improves it. ibuffer should probably
> > also be using display properties to align the columns, but that's
> > another issue.
> > 
> > Committed in 7e2a8b1. Thanks for reporting
> 
> Thank you, but I find it does not work when the multibyte string is long.
> For example, if the string-width of buffer name, e.g.
> "一个很长很长的文件名", exceeds the default width of ibuffer column, M-x
> ibuffer will fail and issue an error.
> 
> According to the backtrace, it is because `ibuffer-compile-format' calls
> `ibuffer-compile-make-substring-form'/`ibuffer-compile-make-eliding-form',
> which use `substring' to truncate the multibyte string. A similar issue was
> reported in https://github.com/emacs-helm/helm/issues/170. Probably
> replacing `substring' solves the problem.

Ah, thanks. I pushed another change that fixes the error.  Still, if the
name is a particular mix of half- and full-width though (e.g.
"aーーーーーー"), the next column(s) might be off by one.





  reply	other threads:[~2016-11-21  9:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-20 12:32 bug#24972: 26.0.50; Multibyte characters are misaligned in ibuffer Liu Hui
2016-11-20 18:58 ` Mark Oteiza
2016-11-21  6:00   ` Liu Hui
2016-11-21  9:35     ` Mark Oteiza [this message]
2016-11-22  3:51       ` Liu Hui
2016-11-22  5:12         ` Mark Oteiza
2016-11-22  6:54           ` Liu Hui
2016-11-22  7:49             ` Mark Oteiza

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

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

  git send-email \
    --in-reply-to=20161121093545.GA1654@holos.localdomain \
    --to=mvoteiza@udel.edu \
    --cc=24972@debbugs.gnu.org \
    --cc=liuhui1610@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.