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: Dired subdirectories & the ls option time-style with the %R sequence Date: Wed, 24 May 2023 13:07:12 +0200 Message-ID: <87fs7mugwv.fsf@gautierponsinet.xyz> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8441"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 24 13:08:18 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 1q1mLp-0001uY-Ck for ged-emacs-devel@m.gmane-mx.org; Wed, 24 May 2023 13:08:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1mKx-0001Fd-NT; Wed, 24 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 1q1mKv-0001F8-Pd for emacs-devel@gnu.org; Wed, 24 May 2023 07:07:21 -0400 Original-Received: from 4.mo575.mail-out.ovh.net ([46.105.59.63]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1mKt-0002E3-Sf for emacs-devel@gnu.org; Wed, 24 May 2023 07:07:21 -0400 Original-Received: from director7.ghost.mail-out.ovh.net (unknown [10.109.143.201]) by mo575.mail-out.ovh.net (Postfix) with ESMTP id 697D2286F9 for ; Wed, 24 May 2023 11:07:14 +0000 (UTC) Original-Received: from ghost-submission-6684bf9d7b-g5tn4 (unknown [10.110.115.71]) by director7.ghost.mail-out.ovh.net (Postfix) with ESMTPS id C66871FE7D for ; Wed, 24 May 2023 11:07:13 +0000 (UTC) Original-Received: from gautierponsinet.xyz ([37.59.142.102]) by ghost-submission-6684bf9d7b-g5tn4 with ESMTPSA id HDcyKeHvbWRvAwAAPNsa9Q (envelope-from ) for ; Wed, 24 May 2023 11:07:13 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-102R0041a2bf7a1-7f46-401f-b849-85e4bb121969, 9E54D0D9B478DCA9D0DF9926B551475C17F37540) smtp.auth=gautier@gautierponsinet.xyz X-OVh-ClientIp: 92.184.110.72 Original-Received: by gautier-laptop.localdomain (Postfix, from userid 1000) id BC56E6E002C; Wed, 24 May 2023 13:07:12 +0200 (CEST) X-Ovh-Tracer-Id: 17285378320600000421 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 70 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejhedgfeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpefhvffufffkgggtsehttdertddttddtnecuhfhrohhmpefirghuthhivghrucfrohhnshhinhgvthcuoehgrghuthhivghrsehgrghuthhivghrphhonhhsihhnvghtrdighiiiqeenucggtffrrghtthgvrhhnpedvgeefgeetiedvudekfeffuddvgeefhedtvdetiefhheeigeefvedvjefhleelvdenucfkphepuddvjedrtddrtddruddpledvrddukeegrdduuddtrdejvddpfeejrdehledrudegvddruddtvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehgrghuthhivghrsehgrghuthhivghrphhonhhsihhnvghtrdighiiiqedpnhgspghrtghpthhtohepuddprhgtphhtthhopegvmhgrtghsqdguvghvvghlsehgnhhurdhorhhgpdfovfetjfhoshhtpehmohehjeehpdhmohguvgepshhmthhpohhuth Received-SPF: pass client-ip=46.105.59.63; envelope-from=gautier@gautierponsinet.xyz; helo=4.mo575.mail-out.ovh.net X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL=1.31, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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:306295 Archived-At: Hello everyone, I use dired with the variable `dired-listing-switches' containing the --time-style option of ls (from the GNU coreutils), itself containing the %R sequence. Precisely, I have: (setq dired-listing-switches "-l -Fhv --group-directories-first \"--time-style=+%F %a %R\" ") in my init.el file. I have adapted the variable `directory-listing-before-filename-regexp' accordingly and everything works fine, except when I insert a subdirectory in dired using `dired-maybe-insert-subdir'. It seems that the "%R" in the time-style option is interpreted as a -R option in dired-insert-subdir and is removed (there is a (string-replace "R" "" switches) somewhere in the function `dired-insert-subdir'). As a result, the expected time is not printed and only a "%" appears, so my regexp does not work and dired is confused. Of course, I can also replace the %R by %H:%M in my config, which I do, and I don't have this problem. Nevertheless, the bug seems there. It took me some time to understand the problem, and I guess other people might encounter the same problem. Maybe `dired-insert-subdir' could search for "R" but exclude "%R"? (emacs version: GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-03). All the best, Gautier