emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dired subdirectories & the ls option time-style with the %R sequence


From: Gautier Ponsinet
Subject: Re: Dired subdirectories & the ls option time-style with the %R sequence
Date: Sat, 27 May 2023 13:07:14 +0200

There is a typo in my previous patch.
Here is the corrected version:

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index a07406e4c0d..967bdbd3e44 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -3142,7 +3142,7 @@ dired-insert-subdir
     (and (not switches) cons (setq switches (cdr cons)))
     (dired-insert-subdir-validate dirname switches)
     ;; case-fold-search is nil now, so we can test for capital `R':
-    (if (setq switches-have-R (and switches (string-match-p "R" switches)))
+    (if (setq switches-have-R (and switches (string-match-p "R" 
(string-replace "%R" "%H:%M" switches))))
        ;; avoid duplicated subdirs
        (setq mark-alist (dired-kill-tree dirname t)))
     (if elt
@@ -3157,7 +3157,7 @@ dired-insert-subdir
        (push (cons dirname switches) dired-switches-alist)))
     (when switches-have-R
       (dired-build-subdir-alist switches)
-      (setq switches (string-replace "R" "" switches))
+      (setq switches (string-replace "R" "" (string-replace "%R" "%H:%M" 
switches)))
       (dolist (cur-ass dired-subdir-alist)
        (let ((cur-dir (car cur-ass)))
          (and (dired-in-this-tree-p cur-dir dirname)
@@ -3258,7 +3258,7 @@ dired-insert-subdir-doinsert
       (let ((dired-actual-switches
             (or switches
                 dired-subdir-switches
-                (string-replace "R" "" dired-actual-switches))))
+                (string-replace "R" "" (string-replace "%R" "%H:%M" 
dired-actual-switches)))))
        (if (equal dirname (car (car (last dired-subdir-alist))))
            ;; If doing the top level directory of the buffer,
            ;; redo it as specified in dired-directory.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]