From: Robert Pluim <rpluim@gmail.com>
To: gautier@gautierponsinet.xyz
Cc: emacs-devel@gnu.org
Subject: Re: Dired subdirectories & the ls option time-style with the %R sequence
Date: Thu, 25 May 2023 08:45:24 +0200 [thread overview]
Message-ID: <878rdcoqnv.fsf@gmail.com> (raw)
In-Reply-To: <e95ef01c5cb177fd7c9854f604a25425@gautierponsinet.xyz> (gautier@gautierponsinet.xyz's message of "Wed, 24 May 2023 17:03:49 +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
--
next prev parent reply other threads:[~2023-05-25 6:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 11:07 Dired subdirectories & the ls option time-style with the %R sequence Gautier Ponsinet
2023-05-24 11:36 ` Robert Pluim
2023-05-24 15:03 ` gautier
2023-05-25 6:45 ` Robert Pluim [this message]
2023-05-25 14:31 ` Gautier Ponsinet
2023-05-25 16:21 ` Robert Pluim
2023-05-27 10:33 ` Gautier Ponsinet
2023-05-27 11:07 ` Gautier Ponsinet
[not found] ` <draft-87wn0ukp7h.fsf@gautierponsinet.xyz>
2023-07-23 9:46 ` Gautier Ponsinet
2023-05-24 16:41 ` Yuri Khan
2023-05-24 16:58 ` Eli Zaretskii
2023-05-24 17:21 ` Yuri Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rdcoqnv.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=gautier@gautierponsinet.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).