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
41f54b73
Commit
41f54b73
authored
Sep 25, 2010
by
Chong Yidong
Browse files
* files.el (get-free-disk-space): Don't assume "df" output columns line up (Bug#6995).
parent
d24ec09a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/files.el
lisp/files.el
+10
-15
No files found.
lisp/ChangeLog
View file @
41f54b73
2010-09-25 Chong Yidong <cyd@stupidchicken.com>
* files.el (get-free-disk-space): Don't assume the "df" output
columns line up (Bug#6995).
2010-09-25 Juanma Barranquero <lekktu@gmail.com>
* finder.el (finder-unknown-keywords):
...
...
lisp/files.el
View file @
41f54b73
...
...
@@ -5622,22 +5622,17 @@ returns nil."
directory-free-space-args
dir
)
0
)))
;; Usual format is as follows:
;; Filesystem ... Used Available Capacity ...
;; /dev/sda6 ...48106535 35481255 10669850 ...
;; Assume that the "available" column is before the
;; "capacity" column. Find the "%" and scan backward.
(
goto-char
(
point-min
))
(
when
(
re-search-forward
" +Avail[^ \n]*"
(
line-end-position
)
t
)
(
let
((
beg
(
match-beginning
0
))
(
end
(
match-end
0
))
str
)
(
forward-line
1
)
(
setq
str
(
buffer-substring-no-properties
(
+
beg
(
point
)
(
-
(
point-min
)))
(
+
end
(
point
)
(
-
(
point-min
)))))
(
when
(
string-match
"\\` *\\([^ ]+\\)"
str
)
(
match-string
1
str
))))))))))
(
forward-line
1
)
(
when
(
re-search-forward
"[[:space:]]+[^[:space:]]+%[^%]*$"
(
line-end-position
)
t
)
(
goto-char
(
match-beginning
0
))
(
let
((
endpt
(
point
)))
(
skip-chars-backward
"^[:space:]"
)
(
buffer-substring-no-properties
(
point
)
endpt
)))))))))
;; The following expression replaces `dired-move-to-filename-regexp'.
(
defvar
directory-listing-before-filename-regexp
...
...
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