unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Dired subdirectories & the ls option time-style with the %R sequence
@ 2023-05-24 11:07 Gautier Ponsinet
  2023-05-24 11:36 ` Robert Pluim
  0 siblings, 1 reply; 12+ messages in thread
From: Gautier Ponsinet @ 2023-05-24 11:07 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-07-23  9:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
     [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

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).