* bug#5762: 24.0.50; Show available disk space with -h option when using ls with -h option
@ 2010-03-24 6:52 Thierry Volpiatto
2010-03-24 7:29 ` Thierry Volpiatto
0 siblings, 1 reply; 8+ messages in thread
From: Thierry Volpiatto @ 2010-03-24 6:52 UTC (permalink / raw)
To: 5762
[-- Attachment #1: Type: text/plain, Size: 26442 bytes --]
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.
In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.18.7)
of 2010-03-21 on tux
Windowing system distributor `The X.Org Foundation', version 11.0.10605000
configured using `configure '--prefix=/usr' '--build=i686-pc-linux-gnu' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-24' '--infodir=/usr/share/info/emacs-24' '--with-sound' '--with-x' '--without-gconf' '--without-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=i686 -pipe -O2' 'LDFLAGS=-Wl,-O1''
Important settings:
value of $LC_ALL: C
value of $LC_COLLATE: C
value of $LC_CTYPE: fr_FR.UTF-8
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: fr_FR.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Dired by name
Minor modes in effect:
global-undo-tree-mode: t
undo-tree-mode: t
delete-selection-mode: t
minibuffer-depth-indicate-mode: t
auto-image-file-mode: t
shell-dirtrack-mode: t
partial-completion-mode: t
show-paren-mode: t
display-battery-mode: t
display-time-mode: t
diff-auto-refine-mode: t
savehist-mode: t
desktop-save-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<f5> a q <tab> <down> <down> <return> C-c C-c C-x k
<return> <S-up> C-x C-=b2 <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
C-x V l = <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> = q <S-up> C-x C-=b2 <f5> a q <tab> <down> <down>
<down> <down> <return> <down> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
t m p <return> C-M-x C-x C-f <return> <up> <up> <up>
<right> <right> C-SPC C-e M-w C-x C-b <down> <down>
<down> <return> <up> <up> <up> <right> <right> C-SPC
C-e M-w <left> <left> <left> <left> <left> <left> <left>
<left> <left> <left> <left> <left> <left> <left> <left>
<left> <left> <left> C-SPC C-e M-w M-x r e p o r t
- r <backspace> e <return>
Recent messages:
Saving file /tmp/xhg-qrefresh10991RMz...
Wrote /tmp/xhg-qrefresh10991RMz
Exported revision 107517 to /home/thierry/labo/tmp/patch-r107473.
insert-directory
Mark set
Mark set [2 times]
Load-path shadows:
/home/thierry/elisp/ngnus/lisp/lpath hides /usr/share/emacs/site-lisp/dictionary/lpath
/home/thierry/elisp/ngnus/lisp/lpath hides /usr/share/emacs/site-lisp/emacs-wget/lpath
/home/thierry/elisp/ngnus/lisp/ntlm hides /usr/share/emacs/site-lisp/flim/ntlm
/home/thierry/elisp/ngnus/lisp/hmac-def hides /usr/share/emacs/site-lisp/flim/hmac-def
/home/thierry/elisp/ngnus/lisp/hex-util hides /usr/share/emacs/site-lisp/flim/hex-util
/home/thierry/elisp/ngnus/lisp/sha1 hides /usr/share/emacs/site-lisp/flim/sha1
/home/thierry/elisp/ngnus/lisp/sasl-digest hides /usr/share/emacs/site-lisp/flim/sasl-digest
/home/thierry/elisp/ngnus/lisp/sasl hides /usr/share/emacs/site-lisp/flim/sasl
/home/thierry/elisp/ngnus/lisp/md4 hides /usr/share/emacs/site-lisp/flim/md4
/home/thierry/elisp/ngnus/lisp/hmac-md5 hides /usr/share/emacs/site-lisp/flim/hmac-md5
/home/thierry/elisp/ngnus/lisp/sasl-cram hides /usr/share/emacs/site-lisp/flim/sasl-cram
/home/thierry/elisp/ngnus/lisp/sasl-ntlm hides /usr/share/emacs/site-lisp/flim/sasl-ntlm
/home/thierry/elisp/lua-mode/lua-mode hides /usr/share/emacs/site-lisp/lua-mode/lua-mode
/home/thierry/elisp/ngnus/lisp/pgg-pgp hides /usr/share/emacs/24.0.50/lisp/pgg-pgp
/home/thierry/elisp/ngnus/lisp/pgg hides /usr/share/emacs/24.0.50/lisp/pgg
/home/thierry/elisp/ngnus/lisp/format-spec hides /usr/share/emacs/24.0.50/lisp/format-spec
~/elisp/g-client/json hides /usr/share/emacs/24.0.50/lisp/json
/home/thierry/elisp/ngnus/lisp/pgg-gpg hides /usr/share/emacs/24.0.50/lisp/pgg-gpg
/home/thierry/elisp/ngnus/lisp/hex-util hides /usr/share/emacs/24.0.50/lisp/hex-util
/home/thierry/elisp/ngnus/lisp/sha1 hides /usr/share/emacs/24.0.50/lisp/sha1
/home/thierry/elisp/ngnus/lisp/md4 hides /usr/share/emacs/24.0.50/lisp/md4
/home/thierry/elisp/ngnus/lisp/pgg-pgp5 hides /usr/share/emacs/24.0.50/lisp/pgg-pgp5
/home/thierry/elisp/ngnus/lisp/password-cache hides /usr/share/emacs/24.0.50/lisp/password-cache
/home/thierry/elisp/ngnus/lisp/pgg-def hides /usr/share/emacs/24.0.50/lisp/pgg-def
/home/thierry/elisp/ngnus/lisp/pgg-parse hides /usr/share/emacs/24.0.50/lisp/pgg-parse
/home/thierry/elisp/ngnus/lisp/dns-mode hides /usr/share/emacs/24.0.50/lisp/textmodes/dns-mode
/usr/share/emacs/site-lisp/ruby-mode/ruby-mode hides /usr/share/emacs/24.0.50/lisp/progmodes/ruby-mode
/home/thierry/elisp/ngnus/lisp/tls hides /usr/share/emacs/24.0.50/lisp/net/tls
/home/thierry/elisp/ngnus/lisp/ntlm hides /usr/share/emacs/24.0.50/lisp/net/ntlm
/home/thierry/elisp/ngnus/lisp/dig hides /usr/share/emacs/24.0.50/lisp/net/dig
/home/thierry/elisp/ngnus/lisp/hmac-def hides /usr/share/emacs/24.0.50/lisp/net/hmac-def
/home/thierry/elisp/ngnus/lisp/sasl-digest hides /usr/share/emacs/24.0.50/lisp/net/sasl-digest
/home/thierry/elisp/ngnus/lisp/sasl hides /usr/share/emacs/24.0.50/lisp/net/sasl
/home/thierry/elisp/ngnus/lisp/imap hides /usr/share/emacs/24.0.50/lisp/net/imap
/home/thierry/elisp/ngnus/lisp/hmac-md5 hides /usr/share/emacs/24.0.50/lisp/net/hmac-md5
/home/thierry/elisp/ngnus/lisp/sasl-cram hides /usr/share/emacs/24.0.50/lisp/net/sasl-cram
/home/thierry/elisp/ngnus/lisp/netrc hides /usr/share/emacs/24.0.50/lisp/net/netrc
/home/thierry/elisp/ngnus/lisp/sasl-ntlm hides /usr/share/emacs/24.0.50/lisp/net/sasl-ntlm
/home/thierry/elisp/ngnus/lisp/dns hides /usr/share/emacs/24.0.50/lisp/net/dns
/home/thierry/elisp/ngnus/lisp/uudecode hides /usr/share/emacs/24.0.50/lisp/mail/uudecode
/home/thierry/elisp/ngnus/lisp/binhex hides /usr/share/emacs/24.0.50/lisp/mail/binhex
/home/thierry/elisp/ngnus/lisp/hashcash hides /usr/share/emacs/24.0.50/lisp/mail/hashcash
/home/thierry/elisp/ngnus/lisp/gnus-msg hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-msg
/home/thierry/elisp/ngnus/lisp/nngateway hides /usr/share/emacs/24.0.50/lisp/gnus/nngateway
/home/thierry/elisp/ngnus/lisp/utf7 hides /usr/share/emacs/24.0.50/lisp/gnus/utf7
/home/thierry/elisp/ngnus/lisp/gnus-delay hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-delay
/home/thierry/elisp/ngnus/lisp/nndraft hides /usr/share/emacs/24.0.50/lisp/gnus/nndraft
/home/thierry/elisp/ngnus/lisp/gnus-bcklg hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-bcklg
/home/thierry/elisp/ngnus/lisp/mml hides /usr/share/emacs/24.0.50/lisp/gnus/mml
/home/thierry/elisp/ngnus/lisp/mml-smime hides /usr/share/emacs/24.0.50/lisp/gnus/mml-smime
/home/thierry/elisp/ngnus/lisp/gnus-demon hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-demon
/home/thierry/elisp/ngnus/lisp/mail-source hides /usr/share/emacs/24.0.50/lisp/gnus/mail-source
/home/thierry/elisp/ngnus/lisp/nnspool hides /usr/share/emacs/24.0.50/lisp/gnus/nnspool
/home/thierry/elisp/ngnus/lisp/nnkiboze hides /usr/share/emacs/24.0.50/lisp/gnus/nnkiboze
/home/thierry/elisp/ngnus/lisp/rfc2231 hides /usr/share/emacs/24.0.50/lisp/gnus/rfc2231
/home/thierry/elisp/ngnus/lisp/spam hides /usr/share/emacs/24.0.50/lisp/gnus/spam
/home/thierry/elisp/ngnus/lisp/nnimap hides /usr/share/emacs/24.0.50/lisp/gnus/nnimap
/home/thierry/elisp/ngnus/lisp/nndb hides /usr/share/emacs/24.0.50/lisp/gnus/nndb
/home/thierry/elisp/ngnus/lisp/gnus-soup hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-soup
/home/thierry/elisp/ngnus/lisp/nndir hides /usr/share/emacs/24.0.50/lisp/gnus/nndir
/home/thierry/elisp/ngnus/lisp/deuglify hides /usr/share/emacs/24.0.50/lisp/gnus/deuglify
/home/thierry/elisp/ngnus/lisp/gnus-registry hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-registry
/home/thierry/elisp/ngnus/lisp/gnus hides /usr/share/emacs/24.0.50/lisp/gnus/gnus
/home/thierry/elisp/ngnus/lisp/nndoc hides /usr/share/emacs/24.0.50/lisp/gnus/nndoc
/home/thierry/elisp/ngnus/lisp/nnrss hides /usr/share/emacs/24.0.50/lisp/gnus/nnrss
/home/thierry/elisp/ngnus/lisp/auth-source hides /usr/share/emacs/24.0.50/lisp/gnus/auth-source
/home/thierry/elisp/ngnus/lisp/mail-parse hides /usr/share/emacs/24.0.50/lisp/gnus/mail-parse
/home/thierry/elisp/ngnus/lisp/gnus-sieve hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-sieve
/home/thierry/elisp/ngnus/lisp/pop3 hides /usr/share/emacs/24.0.50/lisp/gnus/pop3
/home/thierry/elisp/ngnus/lisp/nnultimate hides /usr/share/emacs/24.0.50/lisp/gnus/nnultimate
/home/thierry/elisp/ngnus/lisp/ecomplete hides /usr/share/emacs/24.0.50/lisp/gnus/ecomplete
/home/thierry/elisp/ngnus/lisp/nnmh hides /usr/share/emacs/24.0.50/lisp/gnus/nnmh
/home/thierry/elisp/ngnus/lisp/gnus-bookmark hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-bookmark
/home/thierry/elisp/ngnus/lisp/mail-prsvr hides /usr/share/emacs/24.0.50/lisp/gnus/mail-prsvr
/home/thierry/elisp/ngnus/lisp/mm-url hides /usr/share/emacs/24.0.50/lisp/gnus/mm-url
/home/thierry/elisp/ngnus/lisp/mml1991 hides /usr/share/emacs/24.0.50/lisp/gnus/mml1991
/home/thierry/elisp/ngnus/lisp/gnus-int hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-int
/home/thierry/elisp/ngnus/lisp/gnus-mlspl hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-mlspl
/home/thierry/elisp/ngnus/lisp/gnus-cache hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-cache
/home/thierry/elisp/ngnus/lisp/nnmail hides /usr/share/emacs/24.0.50/lisp/gnus/nnmail
/home/thierry/elisp/ngnus/lisp/gnus-salt hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-salt
/home/thierry/elisp/ngnus/lisp/nnmbox hides /usr/share/emacs/24.0.50/lisp/gnus/nnmbox
/home/thierry/elisp/ngnus/lisp/smime hides /usr/share/emacs/24.0.50/lisp/gnus/smime
/home/thierry/elisp/ngnus/lisp/gnus-diary hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-diary
/home/thierry/elisp/ngnus/lisp/spam-stat hides /usr/share/emacs/24.0.50/lisp/gnus/spam-stat
/home/thierry/elisp/ngnus/lisp/webmail hides /usr/share/emacs/24.0.50/lisp/gnus/webmail
/home/thierry/elisp/ngnus/lisp/nnnil hides /usr/share/emacs/24.0.50/lisp/gnus/nnnil
/home/thierry/elisp/ngnus/lisp/gnus-async hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-async
/home/thierry/elisp/ngnus/lisp/nnslashdot hides /usr/share/emacs/24.0.50/lisp/gnus/nnslashdot
/home/thierry/elisp/ngnus/lisp/gnus-setup hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-setup
/home/thierry/elisp/ngnus/lisp/flow-fill hides /usr/share/emacs/24.0.50/lisp/gnus/flow-fill
/home/thierry/elisp/ngnus/lisp/gnus-art hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-art
/home/thierry/elisp/ngnus/lisp/earcon hides /usr/share/emacs/24.0.50/lisp/gnus/earcon
/home/thierry/elisp/ngnus/lisp/mailcap hides /usr/share/emacs/24.0.50/lisp/gnus/mailcap
/home/thierry/elisp/ngnus/lisp/html2text hides /usr/share/emacs/24.0.50/lisp/gnus/html2text
/home/thierry/elisp/ngnus/lisp/nnir hides /usr/share/emacs/24.0.50/lisp/gnus/nnir
/home/thierry/elisp/ngnus/lisp/gnus-topic hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-topic
/home/thierry/elisp/ngnus/lisp/gnus-win hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-win
/home/thierry/elisp/ngnus/lisp/gnus-score hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-score
/home/thierry/elisp/ngnus/lisp/nnweb hides /usr/share/emacs/24.0.50/lisp/gnus/nnweb
/home/thierry/elisp/ngnus/lisp/nnsoup hides /usr/share/emacs/24.0.50/lisp/gnus/nnsoup
/home/thierry/elisp/ngnus/lisp/rfc2047 hides /usr/share/emacs/24.0.50/lisp/gnus/rfc2047
/home/thierry/elisp/ngnus/lisp/gnus-group hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-group
/home/thierry/elisp/ngnus/lisp/gnus-kill hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-kill
/home/thierry/elisp/ngnus/lisp/gnus-move hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-move
/home/thierry/elisp/ngnus/lisp/mml2015 hides /usr/share/emacs/24.0.50/lisp/gnus/mml2015
/home/thierry/elisp/ngnus/lisp/gnus-eform hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-eform
/home/thierry/elisp/ngnus/lisp/gnus-ems hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-ems
/home/thierry/elisp/ngnus/lisp/gmm-utils hides /usr/share/emacs/24.0.50/lisp/gnus/gmm-utils
/home/thierry/elisp/ngnus/lisp/mm-bodies hides /usr/share/emacs/24.0.50/lisp/gnus/mm-bodies
/home/thierry/elisp/ngnus/lisp/legacy-gnus-agent hides /usr/share/emacs/24.0.50/lisp/gnus/legacy-gnus-agent
/home/thierry/elisp/ngnus/lisp/nnagent hides /usr/share/emacs/24.0.50/lisp/gnus/nnagent
/home/thierry/elisp/ngnus/lisp/gnus-spec hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-spec
/home/thierry/elisp/ngnus/lisp/gnus-dup hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-dup
/home/thierry/elisp/ngnus/lisp/nnwfm hides /usr/share/emacs/24.0.50/lisp/gnus/nnwfm
/home/thierry/elisp/ngnus/lisp/gnus-logic hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-logic
/home/thierry/elisp/ngnus/lisp/mm-decode hides /usr/share/emacs/24.0.50/lisp/gnus/mm-decode
/home/thierry/elisp/ngnus/lisp/spam-report hides /usr/share/emacs/24.0.50/lisp/gnus/spam-report
/home/thierry/elisp/ngnus/lisp/gnus-range hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-range
/home/thierry/elisp/ngnus/lisp/spam-wash hides /usr/share/emacs/24.0.50/lisp/gnus/spam-wash
/home/thierry/elisp/ngnus/lisp/nndiary hides /usr/share/emacs/24.0.50/lisp/gnus/nndiary
/home/thierry/elisp/ngnus/lisp/nnvirtual hides /usr/share/emacs/24.0.50/lisp/gnus/nnvirtual
/home/thierry/elisp/ngnus/lisp/gnus-mh hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-mh
/home/thierry/elisp/ngnus/lisp/gnus-uu hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-uu
/home/thierry/elisp/ngnus/lisp/mm-view hides /usr/share/emacs/24.0.50/lisp/gnus/mm-view
/home/thierry/elisp/ngnus/lisp/nnheader hides /usr/share/emacs/24.0.50/lisp/gnus/nnheader
/home/thierry/elisp/ngnus/lisp/gnus-ml hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-ml
/home/thierry/elisp/ngnus/lisp/messcompat hides /usr/share/emacs/24.0.50/lisp/gnus/messcompat
/home/thierry/elisp/ngnus/lisp/nnbabyl hides /usr/share/emacs/24.0.50/lisp/gnus/nnbabyl
/home/thierry/elisp/ngnus/lisp/nnoo hides /usr/share/emacs/24.0.50/lisp/gnus/nnoo
/home/thierry/elisp/ngnus/lisp/mm-extern hides /usr/share/emacs/24.0.50/lisp/gnus/mm-extern
/home/thierry/elisp/ngnus/lisp/nnlistserv hides /usr/share/emacs/24.0.50/lisp/gnus/nnlistserv
/home/thierry/elisp/ngnus/lisp/sieve-manage hides /usr/share/emacs/24.0.50/lisp/gnus/sieve-manage
/home/thierry/elisp/ngnus/lisp/rfc2045 hides /usr/share/emacs/24.0.50/lisp/gnus/rfc2045
/home/thierry/elisp/ngnus/lisp/ietf-drums hides /usr/share/emacs/24.0.50/lisp/gnus/ietf-drums
/home/thierry/elisp/ngnus/lisp/sieve-mode hides /usr/share/emacs/24.0.50/lisp/gnus/sieve-mode
/home/thierry/elisp/ngnus/lisp/starttls hides /usr/share/emacs/24.0.50/lisp/gnus/starttls
/home/thierry/elisp/ngnus/lisp/sieve hides /usr/share/emacs/24.0.50/lisp/gnus/sieve
/home/thierry/elisp/ngnus/lisp/nneething hides /usr/share/emacs/24.0.50/lisp/gnus/nneething
/home/thierry/elisp/ngnus/lisp/gnus-fun hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-fun
/home/thierry/elisp/ngnus/lisp/canlock hides /usr/share/emacs/24.0.50/lisp/gnus/canlock
/home/thierry/elisp/ngnus/lisp/gnus-dired hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-dired
/home/thierry/elisp/ngnus/lisp/gnus-nocem hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-nocem
/home/thierry/elisp/ngnus/lisp/gnus-srvr hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-srvr
/home/thierry/elisp/ngnus/lisp/nnwarchive hides /usr/share/emacs/24.0.50/lisp/gnus/nnwarchive
/home/thierry/elisp/ngnus/lisp/gnus-cite hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-cite
/home/thierry/elisp/ngnus/lisp/gnus-audio hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-audio
/home/thierry/elisp/ngnus/lisp/nnml hides /usr/share/emacs/24.0.50/lisp/gnus/nnml
/home/thierry/elisp/ngnus/lisp/nnmairix hides /usr/share/emacs/24.0.50/lisp/gnus/nnmairix
/home/thierry/elisp/ngnus/lisp/yenc hides /usr/share/emacs/24.0.50/lisp/gnus/yenc
/home/thierry/elisp/ngnus/lisp/nnmaildir hides /usr/share/emacs/24.0.50/lisp/gnus/nnmaildir
/home/thierry/elisp/ngnus/lisp/nnfolder hides /usr/share/emacs/24.0.50/lisp/gnus/nnfolder
/home/thierry/elisp/ngnus/lisp/gnus-draft hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-draft
/home/thierry/elisp/ngnus/lisp/rfc2104 hides /usr/share/emacs/24.0.50/lisp/gnus/rfc2104
/home/thierry/elisp/ngnus/lisp/mml-sec hides /usr/share/emacs/24.0.50/lisp/gnus/mml-sec
/home/thierry/elisp/ngnus/lisp/nntp hides /usr/share/emacs/24.0.50/lisp/gnus/nntp
/home/thierry/elisp/ngnus/lisp/gnus-vm hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-vm
/home/thierry/elisp/ngnus/lisp/message hides /usr/share/emacs/24.0.50/lisp/gnus/message
/home/thierry/elisp/ngnus/lisp/mm-encode hides /usr/share/emacs/24.0.50/lisp/gnus/mm-encode
/home/thierry/elisp/ngnus/lisp/gnus-util hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-util
/home/thierry/elisp/ngnus/lisp/gnus-cus hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-cus
/home/thierry/elisp/ngnus/lisp/compface hides /usr/share/emacs/24.0.50/lisp/gnus/compface
/home/thierry/elisp/ngnus/lisp/mm-uu hides /usr/share/emacs/24.0.50/lisp/gnus/mm-uu
/home/thierry/elisp/ngnus/lisp/rfc1843 hides /usr/share/emacs/24.0.50/lisp/gnus/rfc1843
/home/thierry/elisp/ngnus/lisp/gnus-sum hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-sum
/home/thierry/elisp/ngnus/lisp/gnus-agent hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-agent
/home/thierry/elisp/ngnus/lisp/gnus-picon hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-picon
/home/thierry/elisp/ngnus/lisp/qp hides /usr/share/emacs/24.0.50/lisp/gnus/qp
/home/thierry/elisp/ngnus/lisp/mm-partial hides /usr/share/emacs/24.0.50/lisp/gnus/mm-partial
/home/thierry/elisp/ngnus/lisp/mm-util hides /usr/share/emacs/24.0.50/lisp/gnus/mm-util
/home/thierry/elisp/ngnus/lisp/gnus-undo hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-undo
/home/thierry/elisp/ngnus/lisp/smiley hides /usr/share/emacs/24.0.50/lisp/gnus/smiley
/home/thierry/elisp/ngnus/lisp/score-mode hides /usr/share/emacs/24.0.50/lisp/gnus/score-mode
/home/thierry/elisp/ngnus/lisp/gnus-start hides /usr/share/emacs/24.0.50/lisp/gnus/gnus-start
/home/thierry/elisp/emms/lisp/tq hides /usr/share/emacs/24.0.50/lisp/emacs-lisp/tq
/home/thierry/elisp/ngnus/lisp/time-date hides /usr/share/emacs/24.0.50/lisp/calendar/time-date
/home/thierry/elisp/ngnus/lisp/parse-time hides /usr/share/emacs/24.0.50/lisp/calendar/parse-time
Features:
(shadow gnus-cite gnus-demon gnus-namazu gnus-dired nnshimbun shimbun
luna eword-encode eword-decode std11 mel path-util mime-def mcharset
mcs-20 mcs-e20 pces pces-e20 pces-20 broken pcustom poe gnus-bcklg spam
spam-stat gnus-uu yenc gnus-alias mail-extr gnus-msg emacsbug xhg-dvc
xhg xhg-annotate xhg-mq xhg-log bzr-core cg-core xdarcs-core xgit-core
xhg-core xmtn-minimal tla smerge-mode dvc-state dvc-config dvc-diff
dvc-fileinfo diff dvc-cmenu dvc-about dvc-version dvc-revlist uniquify
align-let server minimap csv2org iedit eieio zop-to-char wave-list
wave-display wave-client json g g-cus-load elscreen-server
elscreen-dired elscreen-w3m undo-tree smallurl mm-url xml-weather
rectangle-utils windmove sdcv woof screenshot auto-document eiv tv-utils
eldoc pcvs pcvs-parse pcvs-info pcvs-defs showtip delsel
init-anything-thierry descbinds-anything anything-ipython ipython
executable anything-grep grep anything-dabbrev-expand dabbrev
shell-history anything-complete anything-show-completion anything-etags
anything-match-plugin etags anything-traverse anything-delicious
anything-mercurial anything-config w3m-bookmark mule-util alist pym
static apel-ver product elscreen rx anything firefox-protocol
bookmark-firefox-handler bookmark-extensions bookmark install-elisp
find-func mb-depth autodoc ioccur traverselisp thumb-page moz
stumpwm-mode cl-info slime-banner slime-tramp slime-asdf slime-fancy
slime-fontifying-fu slime-package-fu slime-references slime-xref-browser
slime-scratch slime-presentations slime-highlight-edits slime-fuzzy
slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
slime-parse slime-repl slime apropos hideshow hyperspec thingatpt
slime-autoloads bbdb-autoloads bbdb-gui bbdb-com bbdb boxquote rect
image-file tramp-imap tramp-gw tramp-fish tramp-smb tramp-cache
tramp-ftp tramp-cmds tramp shell tramp-compat trampver complete
newsticker newst-treeview tree-widget newst-plainview newst-reader
newst-ticker newst-backend ledger pcomplete esh-arg esh-util extview lpr
woman man assoc two-column shell-command em-term term ehelp electric
esh-toggle em-xtra dirtrack flymake pdbtrack pycomplete python-mode
info-look ansi-color pymacs no-word regex-tool whitespace htmlfontify
text-translator-load paren battery time dired-tar compile comint
dired-extension image-dired dired-details yaoddmuse skeleton sgml-mode
emms-mpd-config emms-lastfm-client emms-playlist-limit emms-volume
emms-volume-amixer emms-tag-editor emms-i18n emms-mark emms-history
emms-bookmarks emms-score emms-stream-info emms-metaplaylist-mode
emms-cue emms-mode-line-icon emms-browser sort emms-playlist-sort
emms-last-played emms-player-xine emms-player-mpd tq emms-playing-time
emms-lyrics emms-url emms-mode-line emms-cache emms-info-ogginfo
emms-info-mp3info emms-playlist-mode emms-player-vlc emms-player-mplayer
emms-info emms-streams later-do emms-source-playlist emms-source-file
emms-player-simple emms-setup emms emms-compat winner dvc-init bzr-gnus
tla-gnus xgit-gnus xhg-gnus gnus-art mm-uu mml2015 mm-view smime dig
dvc-gnus tla-core pp tla-autoconf tla-defs dvc-log vc vc-dispatcher
dvc-unified dvc-tips dired-x dired-aux ffap ediff-merg ediff-diff
ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff
dvc-autoloads dvc-core dvc-lisp dvc-buffers dvc-ui dvc-register
dvc-utils dvc-emacs ewoc dvc-defs dvc-site psvn log-edit ring pcvs-util
add-log diff-mode lisppaste-extension lisppaste xml-rpc url-http tls
url-auth url-gw xml htmlize-hack htmlize muse-colors muse-docbook
muse-texinfo texnfo-upd texinfo muse-latex muse-html muse-xml-common
muse-wiki cus-edit cus-start cus-load muse-publish muse-project
muse-protocols muse-regexps muse muse-nested-tags muse-mode
muse-autoloads org-config-thierry cal-china lunar solar cal-dst
cal-bahai cal-islam cal-hebrew holidays hol-loaddefs vc-hg org-wl
org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs
org-html org-exp org-exp-blocks org-info org-gnus org-bibtex org-bbdb
org-agenda appt diary-lib diary-loaddefs cal-menu calendar cal-loaddefs
org-annotation-helper url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-util url-parse url-vars remember org-remember
org-datetree org byte-opt bytecomp byte-compile org-footnote org-src
org-list org-faces org-compat org-macs noutline outline config-w3m w3m
browse-url doc-view jka-compr image-mode timezone w3m-hist w3m-fb
w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util mime-w3m
w3m-load savehist epa-file epa derived epg epg-config auth-source dired
gnus-async nntp gnus-sum nnoo gnus-group gnus-undo nnmail mail-source
format-spec gnus-start gnus-spec gnus-int gnus-range message sendmail
regexp-opt ecomplete rfc822 mml mml-sec password-cache mm-decode
mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp
ietf-drums mailabbrev gmm-utils mailheader canlock sha1 hex-util
hashcash gnus-win gnus gnus-ems nnheader gnus-util netrc time-date
mail-utils mm-util mail-prsvr wid-edit info easymenu gnus-load
usage-memo desktop midnight punycode idna mybest-theme edmacro kmacro
eev-thierry iterator eev-all eev-mini-steps eev-browse-url eev-langs
eev-compose eev-glyphs disp-table eev-insert eev-steps eev-bounded eev
easy-mmode advice help-fns advice-preload cl cl-19 site-gentoo w3m-wget
preview-latex tex-site auto-loads tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process dbusbind
font-render-setting gtk x-toolkit x multi-tty emacs)
--
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/
[-- Attachment #2: patch-r107473 --]
[-- Type: application/octet-stream, Size: 1736 bytes --]
# HG changeset patch
# User Thierry Volpiatto <thierry.volpiatto@gmail.com>
# Date 1269412781 -3600
# Node ID c50dee5f0876f94ef0772a3be214492ccb123f88
# Parent 7cceab93f61c48239c690c8bf8abe0e34c64e746
files.el (insert-directory): Use -h option in `directory-free-space-args' when using -h option in `dired-listing-switches'.
diff --git a/lisp/files.el b/lisp/files.el
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5891,13 +5891,17 @@
(save-excursion
(goto-char beg)
;; First find the line to put it on.
- (when (re-search-forward "^ *\\(total\\)" nil t)
- (let ((available (get-free-disk-space ".")))
- (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))))))))))
+ ;(when (re-search-forward "^ *\\(total\\)" nil t)
+ (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))))))))))
(defun insert-directory-adj-pos (pos error-lines)
"Convert `ls --dired' file name position value POS to a buffer position.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5762: 24.0.50; Show available disk space with -h option when using ls with -h option
2010-03-24 6:52 bug#5762: 24.0.50; Show available disk space with -h option when using ls with -h option Thierry Volpiatto
@ 2010-03-24 7:29 ` Thierry Volpiatto
2012-04-11 14:38 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 8+ messages in thread
From: Thierry Volpiatto @ 2010-03-24 7:29 UTC (permalink / raw)
To: bug-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]
Thierry Volpiatto <thierry.volpiatto@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/
[-- Attachment #2: patch-r107473 --]
[-- Type: application/octet-stream, Size: 1735 bytes --]
# HG changeset patch
# User Thierry Volpiatto <thierry.volpiatto@gmail.com>
# Date 1269415422 -3600
# Node ID 6a3555ebe64174aeea55f8cce725ef68f328fdd8
# Parent 7cceab93f61c48239c690c8bf8abe0e34c64e746
files.el (insert-directory): Use -h option in `directory-free-space-args' when using -h option in `dired-listing-switches'.
diff --git a/lisp/files.el b/lisp/files.el
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5891,13 +5891,17 @@
(save-excursion
(goto-char beg)
;; First find the line to put it on.
- (when (re-search-forward "^ *\\(total\\)" nil t)
- (let ((available (get-free-disk-space ".")))
- (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))))))))))
+ ;(when (re-search-forward "^ *\\(total\\)" nil t)
+ (let* ((directory-free-space-args (if (string-match "h" dired-actual-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))))))))))
(defun insert-directory-adj-pos (pos error-lines)
"Convert `ls --dired' file name position value POS to a buffer position.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5762: 24.0.50; Show available disk space with -h option when using ls with -h option
2010-03-24 7:29 ` Thierry Volpiatto
@ 2012-04-11 14:38 ` Lars Magne Ingebrigtsen
2012-04-11 16:33 ` Thierry Volpiatto
0 siblings, 1 reply; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-11 14:38 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: 5762
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>> 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
Makes sense.
However:
+ (let* ((directory-free-space-args (if (string-match "h" dired-actual-switches)
This would match "--hide" or anything else that contains an "h",
wouldn't it?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5762: 24.0.50; Show available disk space with -h option when using ls with -h option
2012-04-11 14:38 ` Lars Magne Ingebrigtsen
@ 2012-04-11 16:33 ` Thierry Volpiatto
2012-04-11 16:47 ` Glenn Morris
0 siblings, 1 reply; 8+ messages in thread
From: Thierry Volpiatto @ 2012-04-11 16:33 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: 5762
Hi Lars,
this old bug come back from hell! :-).
Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>
>>> 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
>
> Makes sense.
>
> However:
>
> + (let* ((directory-free-space-args (if (string-match "h" dired-actual-switches)
>
> This would match "--hide" or anything else that contains an "h",
> wouldn't it?
Why one would have "--hide" in this var.
See `dired-listing-switches', I think you can't put something else that
contain "h" into it (I use -alh here), and "--hide" AFAIK is not allowed
there. But verify, I don't use dired anymore.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#5762: 24.0.50; Show available disk space with -h option when using ls with -h option
2012-04-11 16:33 ` Thierry Volpiatto
@ 2012-04-11 16:47 ` Glenn Morris
2012-04-11 17:26 ` Thierry Volpiatto
2012-04-11 20:32 ` Andreas Schwab
0 siblings, 2 replies; 8+ messages in thread
From: Glenn Morris @ 2012-04-11 16:47 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: Lars Magne Ingebrigtsen, 5762
If you want to go down this road, you also need to consider --si,
--human-readable, -k, --block-size, etc. Personally I don't think it's
worth it, I'd just put cross-refs in the docs of dired-listing-switches
and directory-free-space-args, saying that if you customize one you
might want to set the other to match. Also, do all "df's" support -h?
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-04-12 13:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-24 6:52 bug#5762: 24.0.50; Show available disk space with -h option when using ls with -h option Thierry Volpiatto
2010-03-24 7:29 ` Thierry Volpiatto
2012-04-11 14:38 ` Lars Magne Ingebrigtsen
2012-04-11 16:33 ` Thierry Volpiatto
2012-04-11 16:47 ` Glenn Morris
2012-04-11 17:26 ` Thierry Volpiatto
2012-04-12 13:25 ` Lars Magne Ingebrigtsen
2012-04-11 20:32 ` Andreas Schwab
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).