[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: |
Robert Pluim |
Subject: |
Re: Dired subdirectories & the ls option time-style with the %R sequence |
Date: |
Thu, 25 May 2023 08:45:24 +0200 |
>>>>> On Wed, 24 May 2023 17:03:49 +0200, gautier@gautierponsinet.xyz said:
Gautier> It seems that the exact same modification you did also need to be
done
Gautier> in the
Gautier> function: dired-insert-subdir-doinsert .
Gautier> So, the following patch works for me:
Gautier> diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
Gautier> index a07406e4c0d..8d31efd4a1a 100644
Gautier> --- a/lisp/dired-aux.el
Gautier> +++ b/lisp/dired-aux.el
Gautier> @@ -3142,7 +3142,7 @@ dired-insert-subdir
Gautier> (and (not switches) cons (setq switches (cdr cons)))
Gautier> (dired-insert-subdir-validate dirname switches)
Gautier> ;; case-fold-search is nil now, so we can test for capital
`R':
Gautier> - (if (setq switches-have-R (and switches (string-match-p "R"
Gautier> switches)))
Gautier> + (if (setq switches-have-R (and switches (string-match-p
"[^%]R"
Gautier> switches)))
Gautier> ;; avoid duplicated subdirs
Gautier> (setq mark-alist (dired-kill-tree dirname t)))
Gautier> (if elt
Gautier> @@ -3258,7 +3258,7 @@ dired-insert-subdir-doinsert
Gautier> (let ((dired-actual-switches
Gautier> (or switches
Gautier> dired-subdir-switches
Gautier> - (string-replace "R" "" dired-actual-switches))))
Gautier> + (string-replace "[^%]R" "" dired-actual-switches))))
Gautier> (if (equal dirname (car (car (last dired-subdir-alist))))
Gautier> ;; If doing the top level directory of the buffer,
Gautier> ;; redo it as specified in dired-directory.
That doesnʼt seem right. If you have "-lR", that would result in "-"
Robert
--
Re: Dired subdirectories & the ls option time-style with the %R sequence, Yuri Khan, 2023/05/24