GNU bug report logs - #41250
28.0.50; Dired displays unconditionally ls-switches on modeline

Previous Next

Package: emacs;

Reported by: Arthur Miller <arthur.miller <at> live.com>

Date: Thu, 14 May 2020 01:43:01 UTC

Severity: minor

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 41250 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Arthur Miller <arthur.miller <at> live.com>
Cc: 41250 <at> debbugs.gnu.org, Juri Linkov <juri <at> linkov.net>
Subject: RE: bug#41250: 28.0.50; Dired displays unconditionally ls-switches on
 modeline
Date: Fri, 15 May 2020 11:55:46 -0700 (PDT)
[Message part 1 (text/plain, inline)]
> I think format string asks for more documentation and
> more cognitive effort on part of user :-)  and as such
> maybe it is better to have it as part of Dired+.
> 
> Kind-of more for hard-core users who prefer much
> deeper level of customization?

Emacs users are of all kinds.  No user who
doesn't understand `format' would need to
make that particular option-value choice.

This is no different from options we have
that have a catch-all choice of a function,
which they can use to get pretty much any
behavior.

And that's another reasonable alternative
here to a choice of a format string: a
function that accepts the current switches
as its (first) argument.

That's even more general, and it wouldn't
freak out a user unfamiliar with format
strings. ;-)

And that also covers truncating, trivially.
There's nothing special about truncating.
It just happens to correspond directly to
your immediate problem: a long list of
switches.

Attached is a patch that does what I think
should be done.  The option value can be:

nil - to get the current behavior
`as-is' - show the full switches
an integer - show first N chars of switches
a function - show whatever it returns, when
             passed `dired-actual-switches'

If Emacs doesn't want to go this route then
I guess I'll just use it for Dired+.
___

I do think your suggestion of mouseover
the mode-line indication showing the full
switches is a good one.

I've added command `diredp-change-ls-switches'
to Dired+, and added it to menu-bar menu `Dir'
(aka `Subdir').  It shows the current switches
in the prompt, so you can just hit `C-g' if all
you want is see what the current switches are.

And because it's in the menu, you can get to
it by clicking the lighter in the mode-line.
(Menu `Dir' is the first menu listed when you
click.) 
[dired-2020-05-15a.patch (application/octet-stream, attachment)]

This bug report was last modified 4 years and 288 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.