unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4839: 23.1.50; *Buffer List* -- incorrect handling of multibyte characters?
@ 2009-11-03 16:05 Chong Yidong
  2009-11-03 17:02 ` Štěpán Němec
  0 siblings, 1 reply; 10+ messages in thread
From: Chong Yidong @ 2009-11-03 16:05 UTC (permalink / raw)
  To: Jason Rumney; +Cc: Štěpán Němec, 4839, Andreas Schwab

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-11-06 19:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87ocnfmpm2.fsf@stupidchicken.com>
2009-10-31 13:46 ` bug#4839: 23.1.50; *Buffer List* -- incorrect handling of multibyte characters? 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
2009-11-06 19:20   ` bug#4839: marked as done (23.1.50; *Buffer List* -- incorrect handling of multibyte characters?) Emacs bug Tracking System
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

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