From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gautier Ponsinet Newsgroups: gmane.emacs.devel Subject: Re: Dired subdirectories & the ls option time-style with the %R sequence Date: Sat, 27 May 2023 13:07:14 +0200 Message-ID: <87v8gekp7h.fsf@gautierponsinet.xyz> References: <87fs7mugwv.fsf@gautierponsinet.xyz> <87cz2qneqn.fsf@gmail.com> <878rdcoqnv.fsf@gmail.com> <287178c7f11c6a2b3a4de84e13b72c2b@gautierponsinet.xyz> <87zg5smlet.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26581"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 27 13:33:15 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q2sAc-0006kd-W3 for ged-emacs-devel@m.gmane-mx.org; Sat, 27 May 2023 13:33:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2rlb-00025R-IS; Sat, 27 May 2023 07:07:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2rlZ-00024t-QS for emacs-devel@gnu.org; Sat, 27 May 2023 07:07:21 -0400 Original-Received: from 14.mo583.mail-out.ovh.net ([188.165.51.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2rlY-0000Yb-7u for emacs-devel@gnu.org; Sat, 27 May 2023 07:07:21 -0400 Original-Received: from director8.ghost.mail-out.ovh.net (unknown [10.108.4.8]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id C8EC8245E6 for ; Sat, 27 May 2023 11:07:15 +0000 (UTC) Original-Received: from ghost-submission-6684bf9d7b-chzjw (unknown [10.110.115.64]) by director8.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 5F7761FD64; Sat, 27 May 2023 11:07:15 +0000 (UTC) Original-Received: from gautierponsinet.xyz ([37.59.142.105]) by ghost-submission-6684bf9d7b-chzjw with ESMTPSA id v8/OFWPkcWQmnwAA5cetrw (envelope-from ); Sat, 27 May 2023 11:07:15 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-105G006385771fa-afc4-434b-a30d-408d0a3486d3, 92B0A84F445ED07B36E0E8A79E9BEFE5352E61AB) smtp.auth=gautier@gautierponsinet.xyz X-OVh-ClientIp: 134.76.50.203 In-Reply-To: <87zg5smlet.fsf@gmail.com> X-Ovh-Tracer-Id: 16456997463659702181 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -30 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrfeekuddgfeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpefhvfevufgjfhffkfggtgesthdtredttddttdenucfhrhhomhepifgruhhtihgvrhcurfhonhhsihhnvghtuceoghgruhhtihgvrhesghgruhhtihgvrhhpohhnshhinhgvthdrgiihiieqnecuggftrfgrthhtvghrnheptefggefgfefhffdutdelffekueetfeekgefgkeefgeehfeekfefhheffkeeutdeunecukfhppeduvdejrddtrddtrddupddufeegrdejiedrhedtrddvtdefpdefjedrheelrddugedvrddutdehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeoghgruhhtihgvrhesghgruhhtihgvrhhpohhnshhinhgvthdrgiihiieqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepvghmrggtshdquggvvhgvlhesghhnuhdrohhrghdpoffvtefjohhsthep mhhoheekfedpmhhouggvpehsmhhtphhouhht Received-SPF: pass client-ip=188.165.51.82; envelope-from=gautier@gautierponsinet.xyz; helo=14.mo583.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:306367 Archived-At: 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.