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


在 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.





  reply	other threads:[~2016-11-21  6:00 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 [this message]
2016-11-21  9:35     ` Mark Oteiza
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=39442582-6036-47de-1a7a-4d46e43496c1@gmail.com \
    --to=liuhui1610@gmail.com \
    --cc=24972@debbugs.gnu.org \
    --cc=mvoteiza@udel.edu \
    /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.