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


View this message in rfc822 format

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Jason Rumney <jasonr <at> gnu.org>
Cc: Andreas Schwab <schwab <at> linux-m68k.org>, 4839 <at> debbugs.gnu.org,
        Štěpán Němec <stepnem <at> gmail.com>
Subject: bug#4839: 23.1.50;	*Buffer List* -- incorrect handling of multibyte characters?
Date: Tue, 03 Nov 2009 11:05:13 -0500
> > If the double width characters are not exactly twice as wide as the
> > single width characters there is not much that can be done about that.
> >
>
> The columns should be aligned using tab-stops rather than spaces. (tab
> characters within file names would need special handling, but these
> are rare).

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



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.