GNU bug report logs - #4839
23.1.50; *Buffer List* -- incorrect handling of multibyte characters?

Previous Next

Package: emacs;

Reported by: stepnem <at> gmail.com

Date: Sat, 31 Oct 2009 13:55:05 UTC

Severity: minor

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #43 received at 4839 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Štěpán Němec <stepnem <at> gmail.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: Jason Rumney <jasonr <at> gnu.org>, Andreas Schwab <schwab <at> linux-m68k.org>,
        4839 <at> debbugs.gnu.org
Subject: Re: bug#4839: 23.1.50;	*Buffer List* -- incorrect handling of
 multibyte characters?
Date: Tue, 3 Nov 2009 18:02:55 +0100
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



This bug report was last modified 15 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.