* File size column width in dired
@ 2005-11-08 12:05 Slawomir Nowaczyk
2005-11-09 2:57 ` Richard M. Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Slawomir Nowaczyk @ 2005-11-08 12:05 UTC (permalink / raw)
Hello,
I was wondering if the following patch could be applied... I routinely
work with directories where files >100MB exist, and currently
filenames in dired buffer are misaligned in such cases. My patch
reserves one more character for file size.
I do not know if it would make sense to make it even bigger (files
larger than 1GB definitely exist, but I do not know how common they
are) or to provide this as user option.
*** c:/Emacs/lisp/ls-lisp.el Mon Oct 31 16:29:45 2005
--- c:/temp/buffer-content-960sNJ Tue Nov 8 13:00:45 2005
***************
*** 588,598 ****
(defun ls-lisp-format-file-size (file-size human-readable)
(if (or (not human-readable)
(< file-size 1024))
! (format (if (floatp file-size) " %8.0f" " %8d") file-size)
(do ((file-size (/ file-size 1024.0) (/ file-size 1024.0))
;; kilo, mega, giga, tera, peta, exa
(post-fixes (list "k" "M" "G" "T" "P" "E") (cdr post-fixes)))
! ((< file-size 1024) (format " %7.0f%s" file-size (car post-fixes))))))
(provide 'ls-lisp)
--- 588,598 ----
(defun ls-lisp-format-file-size (file-size human-readable)
(if (or (not human-readable)
(< file-size 1024))
! (format (if (floatp file-size) " %9.0f" " %9d") file-size)
(do ((file-size (/ file-size 1024.0) (/ file-size 1024.0))
;; kilo, mega, giga, tera, peta, exa
(post-fixes (list "k" "M" "G" "T" "P" "E") (cdr post-fixes)))
! ((< file-size 1024) (format " %8.0f%s" file-size (car post-fixes))))))
(provide 'ls-lisp)
--
Best wishes,
Slawomir Nowaczyk
( slawomir.nowaczyk.847@student.lu.se )
Duct tape is like the force:
it has a light side and a dark side, and it holds the universe together.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: File size column width in dired
2005-11-08 12:05 File size column width in dired Slawomir Nowaczyk
@ 2005-11-09 2:57 ` Richard M. Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard M. Stallman @ 2005-11-09 2:57 UTC (permalink / raw)
Cc: emacs-devel
I think one digit more is ok. I will ask someone to install that.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-09 2:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-08 12:05 File size column width in dired Slawomir Nowaczyk
2005-11-09 2:57 ` Richard M. Stallman
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.