unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Gautier Ponsinet <gautier@gautierponsinet.xyz>
To: Robert Pluim <rpluim@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Dired subdirectories & the ls option time-style with the %R sequence
Date: Sat, 27 May 2023 13:07:14 +0200	[thread overview]
Message-ID: <87v8gekp7h.fsf@gautierponsinet.xyz> (raw)
In-Reply-To: <87zg5smlet.fsf@gmail.com>

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.




  parent reply	other threads:[~2023-05-27 11:07 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
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 [this message]
     [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=87v8gekp7h.fsf@gautierponsinet.xyz \
    --to=gautier@gautierponsinet.xyz \
    --cc=emacs-devel@gnu.org \
    --cc=rpluim@gmail.com \
    /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).