The variable 'ibuffer-formats' configures the Ibuffer formats. Add
'recency' to the format to display the column.
+*** New user option 'ibuffer-human-readable-size'.
+When non-nil, buffer sizes are shown in human readable format.
+
** Smerge
*** New command 'smerge-extend' extends a conflict over surrounding lines.
(sexp :tag "Test Form")
face)))
+(defcustom ibuffer-human-readable-size nil
+ "Show buffer sizes in human-readable format.
+Use the function `file-size-human-readable' for formatting."
+ :type 'boolean
+ :version "31.1")
+
(defcustom ibuffer-use-other-window nil
"If non-nil, display Ibuffer in another window by default."
:type 'boolean)
(:inline t
:header-mouse-map ibuffer-size-header-map
:summarizer
- (lambda (column-strings)
- (let ((total 0))
- (dolist (string column-strings)
- (setq total
- ;; like, ewww ...
- (+ (float (string-to-number string))
- total)))
- (format "%.0f" total))))
- (format "%s" (buffer-size)))
+ (lambda (strings)
+ (let ((total
+ (cl-loop
+ for s in strings
+ for i = (text-property-not-all 0 (length s) 'ibuffer-size nil s)
+ if i sum (get-text-property i 'ibuffer-size s))))
+ (if ibuffer-human-readable-size
+ (file-size-human-readable total)
+ (number-to-string total)))))
+ (let ((size (buffer-size)))
+ (propertize (if ibuffer-human-readable-size
+ (file-size-human-readable size)
+ (number-to-string size))
+ 'ibuffer-size size)))
(define-ibuffer-column recency
(:inline t :summarizer ignore :header-mouse-map ibuffer-recency-header-map)