From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#5762: 24.0.50; Show available disk space with -h option when using ls with -h option Date: Wed, 24 Mar 2010 08:29:24 +0100 Organization: ThierryVolpiatto Message-ID: <874ok6rxd7.fsf@tux.homenetwork> References: <87y6hitdmp.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1269417345 25131 80.91.229.12 (24 Mar 2010 07:55:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 24 Mar 2010 07:55:45 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 24 08:55:41 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NuLRE-00066a-PR for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Mar 2010 08:55:41 +0100 Original-Received: from localhost ([127.0.0.1]:52754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuLRD-0003R6-Ra for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Mar 2010 03:55:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuLQx-0003QD-KZ for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2010 03:55:24 -0400 Original-Received: from [140.186.70.92] (port=50599 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuLQt-0003PN-J8 for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2010 03:55:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuLQs-0005jf-8t for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2010 03:55:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44623) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuLQs-0005jZ-7B for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2010 03:55:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NuL7G-0005it-IJ; Wed, 24 Mar 2010 03:35:02 -0400 X-Loop: bug-gnu-emacs@gnu.org In-Reply-To: <87y6hitdmp.fsf@tux.homenetwork> Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Mar 2010 07:35:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-GNU-PR-Message: followup 5762 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.126941604521992 (code B ref -1); Wed, 24 Mar 2010 07:35:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Mar 2010 07:34:05 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuL6J-0005if-4z for submit@debbugs.gnu.org; Wed, 24 Mar 2010 03:34:05 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuL65-0005iK-0r for submit@debbugs.gnu.org; Wed, 24 Mar 2010 03:34:02 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:60987) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NuL61-0007g6-GF for submit@debbugs.gnu.org; Wed, 24 Mar 2010 03:33:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuL5z-0006Qj-3u for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2010 03:33:43 -0400 Original-Received: from [140.186.70.92] (port=49498 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuL5t-0006Pw-LI for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2010 03:33:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuL5r-0002un-Ty for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2010 03:33:37 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:54324) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuL5r-0002uN-IX for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2010 03:33:35 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NuL5o-0004YS-Jz for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2010 08:33:32 +0100 Original-Received: from 105.77.197-77.rev.gaoland.net ([77.197.77.105]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Mar 2010 08:33:32 +0100 Original-Received: from thierry.volpiatto by 105.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 24 Mar 2010 08:33:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 78 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 105.77.197-77.rev.gaoland.net Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUHBARgJRFPS0WbMBTC TSG/uJs0yyVHAAAACXBIWXMAAAsSAAALEgHS3X78AAAACXZwQWcAAAAwAAAAMADO7oxXAAABpUlE QVQ4y3VTQXKDMAyUnD7AwvQOhtxj5N4LFh9ow/+/UtlpM0BczWSS0Wola7UBeEb3+3kJ/5p9ZLz3 UI0n0J0Y4K/lh1nG24FhlJOR2LdSKtpV5gfi/Zd+NdaJBbB4D5N0JnfUIVp6obZURkJwS2a8b9uX AkgxA5gCEcknAH1s2z0DPooWmjGKcJR+HNZt+9bm0GtGRycRuZGs98Ffr02vABWGopIAhmXmxnQN BwBXZjgFLHRoqbfeYxCLWqsjLyKhbEHW+A5nEs699Q2O80ALrgHTmUTy6P0MnKyKQpKHpoNWokxs F0D5VegvWmEozyE6nuMiS98mWzlUQ9bW8qYfqOaFtzWlYCqGeIs6HEyl08jkrxUG9MF5ipXpOOpd ZMoXPPVSLWJiiwNNB+eRSyxJZmQKcacikgucnCRiHuJOLmyYJRDPwOqAvY4pA+Wy+VS8G26BAsdb Ph2Hw7ORy/H0IOG0TnaM8Cp0XrFYyU0v2z8AqkifPVbLZ0qo/gsRg60C7p+8Ov9jrUIxFde+jnAq X42hyp/c+ZcnVyUYBarrqZt3+R8450png3cWKgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAwOC0wNS0z MVQyMjoxNDoyMiswMjowMK3VBDcAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMDctMTAtMjhUMTc6MDg6 NDgrMDE6MDDLdIcLAAAAEXRFWHRqcGVnOmNvbG9yc3BhY2UAMix1VZ8AAAAgdEVYdGpwZWc6c2Ft cGxpbmctZmFjdG9yADJ4MiwxeDEsMXgxSfqmtAAAAABJRU5ErkJggg== User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:lJyu2MB4U1lDvlLZgHJTBhh+FJg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 24 Mar 2010 03:35:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35719 Archived-At: --=-=-= Thierry Volpiatto 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/ --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=patch-r107473 Content-Transfer-Encoding: base64 IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIFRoaWVycnkgVm9scGlhdHRvIDx0aGllcnJ5LnZv bHBpYXR0b0BnbWFpbC5jb20+CiMgRGF0ZSAxMjY5NDE1NDIyIC0zNjAwCiMgTm9kZSBJRCA2YTM1 NTVlYmU2NDE3NGFlZWE1NWY4Y2NlNzI1ZWY2OGYzMjhmZGQ4CiMgUGFyZW50ICA3Y2NlYWI5M2Y2 MWM0ODIzOWM2OTBjOGJmOGFiZTBlMzRjNjRlNzQ2CmZpbGVzLmVsIChpbnNlcnQtZGlyZWN0b3J5 KTogVXNlIC1oIG9wdGlvbiBpbiBgZGlyZWN0b3J5LWZyZWUtc3BhY2UtYXJ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CIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBkaXJlY3RvcnktZnJlZS1zcGFjZS1hcmdzKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgKGF2YWlsYWJsZSAoZ2V0LWZyZWUtZGlzay1zcGFjZSAiLiIpKSkKKyAgICAgICAg ICAgICAgICAgICh3aGVuIChyZS1zZWFyY2gtZm9yd2FyZCAiXiAqXFwodG90YWxcXCkiIG5pbCB0 KQorICAgICAgICAgICAgICAgICAgICAod2hlbiBhdmFpbGFibGUKKyAgICAgICAgICAgICAgICAg ICAgICA7OyBSZXBsYWNlICJ0b3RhbCIgd2l0aCAidXNlZCIsIHRvIGF2b2lkIGNvbmZ1c2lvbi4K KyAgICAgICAgICAgICAgICAgICAgICAocmVwbGFjZS1tYXRjaCAidG90YWwgdXNlZCBpbiBkaXJl Y3RvcnkiIG5pbCBuaWwgbmlsIDEpCisgICAgICAgICAgICAgICAgICAgICAgKGVuZC1vZi1saW5l KQorICAgICAgICAgICAgICAgICAgICAgIChpbnNlcnQgIiBhdmFpbGFibGUgIiBhdmFpbGFibGUp KSkpKSkpKSkpCiAKIChkZWZ1biBpbnNlcnQtZGlyZWN0b3J5LWFkai1wb3MgKHBvcyBlcnJvci1s aW5lcykKICAgIkNvbnZlcnQgYGxzIC0tZGlyZWQnIGZpbGUgbmFtZSBwb3NpdGlvbiB2YWx1ZSBQ T1MgdG8gYSBidWZmZXIgcG9zaXRpb24uCg== --=-=-=--