[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/disk-usage c44cc97 01/26: Set default for directory-siz
From: |
Pierre Neidhardt |
Subject: |
[elpa] externals/disk-usage c44cc97 01/26: Set default for directory-size-function dynamically |
Date: |
Tue, 26 Feb 2019 03:06:35 -0500 (EST) |
branch: externals/disk-usage
commit c44cc97815b426bc840a166c6eb18f1adf32aa67
Author: Pierre Neidhardt <address@hidden>
Commit: Pierre Neidhardt <address@hidden>
Set default for directory-size-function dynamically
---
disk-usage.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/disk-usage.el b/disk-usage.el
index e3085ff..d5c8629 100644
--- a/disk-usage.el
+++ b/disk-usage.el
@@ -65,7 +65,13 @@
"Whether to kill the current `disk-usage' buffer before moving directory."
:type 'boolean)
-(defcustom disk-usage--directory-size-function
#'disk-usage--directory-size-with-du
+(defvar disk-usage--du-command "du")
+(defvar disk-usage--du-args "-sb")
+(defvar disk-usage--find-command "find")
+
+(defcustom disk-usage--directory-size-function (if (executable-find
disk-usage--du-command)
+
#'disk-usage--directory-size-with-du
+
#'disk-usage--directory-size-with-emacs)
"Function that returns the total disk usage of the directory passed as
argument."
:type '(choice (function :tag "Native (slow)"
disk-usage--directory-size-with-emacs)
(function :tag "System \"du\""
disk-usage--directory-size-with-du)))
@@ -141,10 +147,6 @@
:children (- (length
(directory-files path)) 2)))
(list (disk-usage--file-info-make :size 0 :name directory)))))
-(defvar disk-usage--du-command "du")
-(defvar disk-usage--du-args "-sb")
-(defvar disk-usage--find-command "find")
-
(defun disk-usage--list-recursively (directory)
"This is the equivalent of running the shell command
$ find . -type f -exec du -sb {} +"
- [elpa] externals/disk-usage updated (0bbb9a6 -> a53be8d), Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 349719b 11/26: Display symlink targets, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage c7f4597 16/26: Customize default filters, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage ea2bcd2 23/26: Set du-command dynamically for BSD/macOS and make command settings customizable, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 936b73d 06/26: Actually use disk-usage--find-command, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 20ed51e 13/26: Fix mark not being set, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 284c142 24/26: Inherit from error/warning faces instead of defining foreground colors, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 7fd6e43 19/26: Add filters to recursive listings, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage cec7fc6 02/26: Require Emacs 26 for file-attribute-* functions, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 2874158 03/26: Add TODOs about file-notify, date filtering, formatting and process-file, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage c44cc97 01/26: Set default for directory-size-function dynamically,
Pierre Neidhardt <=
- [elpa] externals/disk-usage 6846590 15/26: Add 1-hour filter, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 1d85ea5 10/26: Fix missing total-size in header, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 0feb208 18/26: Message instead of warning when no filters, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage aa7d267 17/26: Document filters, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage bcae407 21/26: Replace (delq (mapcar ...)) with cl-loop, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 54d4aee 25/26: Propertize size, percent and children columns, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 8bf5d5c 08/26: Break some long lines, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 0fff6a8 12/26: Fix 'nil' children issue on inaccessible directories, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage a53be8d 26/26: Version 1.2.0, Pierre Neidhardt, 2019/02/26
- [elpa] externals/disk-usage 6a01954 05/26: Rename disk-usage--path-at-point -> disk-usage--file-name-at-point, Pierre Neidhardt, 2019/02/26