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: Tue, 22 Nov 2016 11:51:50 +0800	[thread overview]
Message-ID: <1dbeb208-b7b5-e445-1946-c71aec1660da@gmail.com> (raw)
In-Reply-To: <20161121093545.GA1654@holos.localdomain>


在 2016年11月21日 17:35, Mark Oteiza 写道:
> 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.
>

Thank you, but the trailing "..." is missing for long buffer names, no 
matter whether they contain multibyte characters. For example, 
"01234567890123456789" becomes "012345678901234567". The normal result 
should be "012345678901234...".





  reply	other threads:[~2016-11-22  3:51 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
2016-11-22  3:51       ` Liu Hui [this message]
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=1dbeb208-b7b5-e445-1946-c71aec1660da@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.