diff options
| author | Christopher Schmidt | 2019-11-23 15:45:56 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-11-23 15:45:56 +0100 |
| commit | b9e99ab5ac49f8cb03fc1c27eb830a24e9bdf83c (patch) | |
| tree | ef8fbb048ae0cf46b73dc1c6a3a1d95c6256b1b2 | |
| parent | 311ca036f4f6d366747072b518e1026347368f8c (diff) | |
| download | emacs-b9e99ab5ac49f8cb03fc1c27eb830a24e9bdf83c.tar.gz emacs-b9e99ab5ac49f8cb03fc1c27eb830a24e9bdf83c.zip | |
Always expand "total" in dired
* lisp/files.el (insert-directory): Always replace "total" with
"total used in directory", even when we don't have free disk space
(bug#13191). This makes the display more consistent.
| -rw-r--r-- | lisp/files.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index 2c45a8b1078..a384e7136e8 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -7153,10 +7153,11 @@ normally equivalent short `-D' option is just passed on to | |||
| 7153 | (goto-char beg) | 7153 | (goto-char beg) |
| 7154 | ;; First find the line to put it on. | 7154 | ;; First find the line to put it on. |
| 7155 | (when (re-search-forward "^ *\\(total\\)" nil t) | 7155 | (when (re-search-forward "^ *\\(total\\)" nil t) |
| 7156 | ;; Replace "total" with "total used in directory" to | ||
| 7157 | ;; avoid confusion. | ||
| 7158 | (replace-match "total used in directory" nil nil nil 1) | ||
| 7156 | (let ((available (get-free-disk-space "."))) | 7159 | (let ((available (get-free-disk-space "."))) |
| 7157 | (when available | 7160 | (when available |
| 7158 | ;; Replace "total" with "used", to avoid confusion. | ||
| 7159 | (replace-match "total used in directory" nil nil nil 1) | ||
| 7160 | (end-of-line) | 7161 | (end-of-line) |
| 7161 | (insert " available " available)))))))))) | 7162 | (insert " available " available)))))))))) |
| 7162 | 7163 | ||