unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Štěpán Němec" <stepnem@gmail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 4839@emacsbugs.donarmstrong.com, Andreas Schwab <schwab@linux-m68k.org>
Subject: bug#4839: 23.1.50; *Buffer List* -- incorrect handling of multibyte characters?
Date: Tue, 3 Nov 2009 18:02:55 +0100	[thread overview]
Message-ID: <20091103170255.GA1007@headley> (raw)
In-Reply-To: <878wen4mrq.fsf@stupidchicken.com>

On Tue, Nov 03, 2009 at 11:05:13AM -0500, Chong Yidong wrote:
> Or use the :align-to display property, as in this patch below.  Could
> someone test it?
> 
> *** emacs/lisp/buff-menu.el.~1.129.~	2009-11-03 10:38:11.000000000 -0500
> --- emacs/lisp/buff-menu.el	2009-11-03 11:02:21.000000000 -0500
> ***************
> *** 678,689 ****
>       (setq name (copy-sequence name)))
>     (add-text-properties 0 (length name) name-props name)
>     (add-text-properties 0 (length size) size-props size)
> !   (concat name
> ! 	  (make-string (- Buffer-menu-buffer+size-width
> ! 			  (string-width name)
> ! 			  (string-width size))
> ! 		       ?\s)
> ! 	  size))
>   
>   (defun Buffer-menu-sort (column)
>     "Sort the buffer menu by COLUMN."
> --- 678,690 ----
>       (setq name (copy-sequence name)))
>     (add-text-properties 0 (length name) name-props name)
>     (add-text-properties 0 (length size) size-props size)
> !   (let ((name+space-width (- Buffer-menu-buffer+size-width
> ! 			     (string-width size))))
> !     (concat name
> ! 	    (propertize (make-string (- name+space-width (string-width name))
> ! 				     ?\s)
> ! 			'display `(space :align-to ,(+ 4 name+space-width)))
> ! 	    size)))
>   
>   (defun Buffer-menu-sort (column)
>     "Sort the buffer menu by COLUMN."

Tested; with this above change; the alignment is as expected.
Thanks!

Štěpán Němec





  reply	other threads:[~2009-11-03 17:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-10-31 13:46 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
2009-11-02 22:49       ` Jason Rumney
2009-11-02 15:44   ` Š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=20091103170255.GA1007@headley \
    --to=stepnem@gmail.com \
    --cc=4839@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.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).