From cc3e369ab00524b63aa407018be91a2a1a0cc052 Mon Sep 17 00:00:00 2001 From: Drew Adams Date: Wed, 30 Sep 2020 17:59:59 +0200 Subject: Allow controlling the Dired switches shown in the mode line * doc/emacs/dired.texi (Dired Enter): Document it (bug#41250). * lisp/dired.el (dired-switches-in-mode-line): New variable (bug#41250). (dired-sort-set-mode-line): Use it. --- doc/emacs/dired.texi | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/emacs') diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 24fd02aac1a..22fec134baf 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -129,6 +129,17 @@ options (that is, single characters) requiring no arguments, and long options (starting with @samp{--}) whose arguments are specified with @samp{=}. +@vindex dired-switches-in-mode-line + Dired will display an indication of what the @command{ls} switches +are in the mode line. By default, Dired will try to determine whether +the switches indicate sorting by name or date, and say so in the mode +line. If the @code{dired-switches-in-mode-line} variable is +@code{as-is}, the switches will be shown verbatim. If this variable +in an integer, the switch display will be truncated to that length. +This variable can also be a function, which will be passed +@code{dired-actual-switches} as the only parameter and should return a +string. + @vindex dired-use-ls-dired If your @command{ls} program supports the @samp{--dired} option, Dired automatically passes it that option; this causes @command{ls} to -- cgit v1.2.3