Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
fc3e23a4
Commit
fc3e23a4
authored
Dec 07, 2000
by
Eli Zaretskii
Browse files
(dired-insert-directory): If file-system-info is
fboundp, call it instead of invoking dired-free-space-program.
parent
0f5f7c3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
18 deletions
+29
-18
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/dired.el
lisp/dired.el
+24
-18
No files found.
lisp/ChangeLog
View file @
fc3e23a4
2000-12-07 Eli Zaretskii <eliz@is.elta.co.il>
* dired.el (dired-insert-directory): If file-system-info is
fboundp, call it instead of invoking dired-free-space-program.
2000-12-07 Gerd Moellmann <gerd@gnu.org>
* server.el (server-visit-files): Push files on file-name-history.
...
...
lisp/dired.el
View file @
fc3e23a4
...
...
@@ -686,24 +686,30 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh."
(
goto-char
(
point-min
))
(
when
(
re-search-forward
"total [0-9]+$"
nil
t
)
(
insert
" free "
)
(
let
((
beg
(
point
)))
(
condition-case
nil
(
if
(
zerop
(
call-process
dired-free-space-program
nil
t
nil
dired-free-space-args
(
expand-file-name
dir-or-list
)))
(
progn
(
goto-char
beg
)
(
forward-line
1
)
(
skip-chars-forward
"^ \t"
)
(
forward-word
2
)
(
skip-chars-forward
" \t"
)
(
delete-region
beg
(
point
))
(
forward-word
1
)
(
delete-region
(
point
)
(
progn
(
forward-line
1
)
(
point
))))
;; The dired-free-space-program failed; delete its output
(
delete-region
(
-
beg
7
)
(
point
)))
(
error
(
delete-region
(
-
beg
7
)
(
point
)))))))))
;; Non-Posix systems don't always have dired-free-space-program,
;; but might have an equivalent system call.
(
if
(
fboundp
'file-system-info
)
(
insert
(
format
"%.0f"
(
/
(
nth
2
(
file-system-info
dir-or-list
))
1024
)))
(
let
((
beg
(
point
)))
(
condition-case
nil
(
if
(
zerop
(
call-process
dired-free-space-program
nil
t
nil
dired-free-space-args
(
expand-file-name
dir-or-list
)))
(
progn
(
goto-char
beg
)
(
forward-line
1
)
(
skip-chars-forward
"^ \t"
)
(
forward-word
2
)
(
skip-chars-forward
" \t"
)
(
delete-region
beg
(
point
))
(
forward-word
1
)
(
delete-region
(
point
)
(
progn
(
forward-line
1
)
(
point
))))
;; The dired-free-space-program failed; delete its output
(
delete-region
(
-
beg
7
)
(
point
)))
(
error
(
delete-region
(
-
beg
7
)
(
point
))))))))))
;; Quote certain characters, unless ls quoted them for us.
(
if
(
not
(
string-match
"b"
dired-actual-switches
))
(
save-excursion
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment