From 415db5a3bd043be53cd7431f2b373897b86ba4ef Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 16 Feb 2025 11:40:44 +0000 Subject: Refactor +dired/--subdirs-not-inserted --- Emacs/.config/emacs/config.org | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Emacs') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 65ddcd9..ba8f9de 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -3247,13 +3247,12 @@ Here I setup dired with a few niceties (defun +dired/--subdirs-not-inserted () (dired-unmark-all-marks) (dired-mark-directories nil) - (let* ((subdirs-present (mapcar #'car dired-subdir-alist)) - (subdirs-left (thread-last - (dired-get-marked-files) - (mapcar #'(lambda (x) (concat x "/"))) - (cl-remove-if #'(lambda (f) (member f subdirs-present)))))) + (let* ((subdirs-inserted (mapcar #'car dired-subdir-alist)) + (subdirs-available (mapcar #'(lambda (x) (concat x "/")) + (dired-get-marked-files)))) (dired-unmark-all-marks) - subdirs-left)) + (cl-remove-if #'(lambda (f) (member f subdirs-present)) + subdirs-available))) (defun +dired/insert-all-subdirectories (&optional arg) "Insert all subdirectories recursively." -- cgit v1.2.3-13-gbd6f