GNU bug report logs - #5762
24.0.50; Show available disk space with -h option when using ls with -h option

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Wed, 24 Mar 2010 06:58:01 UTC

Severity: wishlist

Tags: wontfix

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: bug#5762: 24.0.50; Show available disk space with -h option when using ls with -h option
Date: Wed, 24 Mar 2010 08:29:24 +0100
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> Hi,
> in dired when using `dired-listing-switches' with -h option, the second
> line of dired buffer is like:
>
> total used in directory 24M available 19275100
>
> it should show:
>
> total used in directory 24M available 19G
>
> I suggest to modify `insert-directory' like this:
>
> ,----[ files.el (insert-directory) ]
> | [....]
> | (let* ((directory-free-space-args (if (string-match "h" dired-listing-switches)
> |                                       (concat directory-free-space-args "h")
> |                                       directory-free-space-args))
> |        (available (get-free-disk-space ".")))
> |   (when (re-search-forward "^ *\\(total\\)" nil t)
> |     (when available
> |       ;; Replace "total" with "used", to avoid confusion.
> |       (replace-match "total used in directory" nil nil nil 1)
> |       (end-of-line)
> |       (insert " available " available))))))))))
> `----
>
> Find a patch attached.

Even better is to parse `dired-actual-switches', like that it update
correctly when using C-u s in dired.

Find the precedent patch modified here.

-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/
[patch-r107473 (application/octet-stream, attachment)]

This bug report was last modified 13 years and 39 days ago.

Previous Next


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