reddit / emacs

How do you hide available disk space in Dired?

rrdoa · 2022-07-13 18:37
In all Dired buffers, I have this line ``` /home/user: (123 GiB available) ``` Is there an option to turn off the display of the available disk space?
rrdoa · 2022-07-13 19:07
Answering my own question: Emacs 29 added a new option `dired-free-space` which I can set to `nil` to remove it!
00-11 · 2022-07-13 20:28
You can also just use `(` to hide details (in most Emacs versions). (I leave details hidden most of the time. I show them when I want to do something like check file sizes.)
rrdoa · 2022-07-14 06:57
No. This is not an answer to the question. I also use `(` all the time, but it is irrelevant.
00-11 · 2022-07-14 14:43
You asked how I (we) hide disk space in Dired. That's how, and when, I hide it. YMMV. (FWIW, I also show more useful information in that line, when I do show it.)
rrdoa · 2022-07-14 22:35
`(` does not hide free disk space in Dired. The variable `dired-free-space` does.
00-11 · 2022-07-14 23:06
It hides it for me. Including with `emacs -Q`. But I'm not using Emacs 29. As I said, YMMV.
rrdoa · 2022-07-15 19:03
Right. It seems specific to Emacs 29.
00-11 · 2022-07-15 20:20
Dunno the particulars, or whether you care (you have your solution to your problem, as posed). But if you did care then you might consider filing a bug that it's a regression for `dired-hide-details-mode` to not hide that detail when it's on. IMO, at least, that shouldn't happen.
rrdoa · 2022-07-16 02:35
The information is not in the same place in Emacs 28 and 29. In Emacs 28, the available space is on its own line starting with "total available ..." below the path of the directory. In Emacs 29, the available space is in parenthesis beside the path of the directory (on the same line). I think it may be intentional that `(` does not hide it anymore and they provide the new setting `dired-free-space` for that.
00-11 · 2022-07-16 03:54
I see; thanks. I won't use that. I use [Dired+](https://www.emacswiki.org/emacs/DiredPlus), which won't adopt that change. (No idea whether Dired+ works out of the box with Emacs 29 now, however. And no plans to update it to ensure compatibility till 29 is actually released.) The vanilla "available space" info is anyway not what I prefer. I use [`files+.el`](https://www.emacswiki.org/emacs/download/files%2b.el), which shows, for each listing (including subdirs) in the Dired buffer: files 19/90 space used 373 available 12756064 where 19 is the number of files shown in the current listing (doesn't include omitted files etc.), and 90 is the number of files total in the main listing (including omitted etc.). That text is also a link to a `*Help*` description of the directory (times of last access, modification, status change; other info).
rrdoa · 2022-07-17 01:54
Thanks for the info! Seems nice, but I don't think I would use it often.