[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/taxy f2f2a60: Example: Update diredy
From: |
ELPA Syncer |
Subject: |
[elpa] externals/taxy f2f2a60: Example: Update diredy |
Date: |
Wed, 8 Sep 2021 19:57:19 -0400 (EDT) |
branch: externals/taxy
commit f2f2a605280184957b4cdc2f68182bfc2f2fe9c5
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Example: Update diredy
---
examples/diredy.el | 40 +++++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 17 deletions(-)
diff --git a/examples/diredy.el b/examples/diredy.el
index 3e50122..0425afd 100644
--- a/examples/diredy.el
+++ b/examples/diredy.el
@@ -61,11 +61,17 @@
"< 10M")
(_ ">= 10M")))
(file-dir? (string) (if (file-directory-p (file-name string))
- "Directory" "File")))
- (make-taxy
+ "Directory" "File"))
+ (make-fn (&rest args)
+ (apply #'make-taxy-magit-section
+ :make #'make-fn
+ :heading-indent 1
+ :item-indent 2
+ args)))
+ (make-fn
:name "Diredy"
- :taxys (list (make-taxy :name "Types"
- :take (apply-partially #'taxy-take-keyed (list
#'file-dir? #'file-size-group #'file-type)))))))
+ :make #'make-fn
+ :take (apply-partially #'taxy-take-keyed (list #'file-dir?
#'file-size-group #'file-type)))))
(defvar dired-mode)
@@ -83,20 +89,20 @@
(goto-char (point-min))
(forward-line 2)
(let* ((lines (save-excursion
- (cl-loop until (eobp)
- collect (buffer-substring (point-at-bol)
(point-at-eol))
- do (forward-line 1))))
- (filled-taxy (thread-last diredy-taxy
- taxy-emptied
- (taxy-fill lines)
- (taxy-mapc* (lambda (taxy)
- (setf (taxy-taxys taxy)
- (cl-sort (taxy-taxys taxy)
#'string<
- :key #'taxy-name))))))
- (inhibit-read-only t)
- (taxy-magit-section-indent 2))
+ (cl-loop until (eobp)
+ collect (string-trim (buffer-substring
(point-at-bol) (point-at-eol)))
+ do (forward-line 1))))
+ (filled-taxy (thread-last diredy-taxy
+ taxy-emptied
+ (taxy-fill lines)
+ (taxy-mapc* (lambda (taxy)
+ (setf (taxy-taxys taxy)
+ (cl-sort (taxy-taxys taxy)
#'string<
+ :key #'taxy-name))))))
+ (inhibit-read-only t))
(delete-region (point) (point-max))
- (taxy-magit-section-insert filled-taxy :items 'first))))
+ (taxy-magit-section-insert filled-taxy :items 'last
+ :initial-depth 0 :blank-between-depth 1))))
;;;; Functions
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/taxy f2f2a60: Example: Update diredy,
ELPA Syncer <=