Subject: bug#41250: 28.0.50; Dired displays unconditionally ls-switches on modeline

From: Arthur Miller <[email-masked]>
Date: Fri, 15 May 2020 12:50:49 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Arthur Miller <[email-masked]>
>> Cc: Juri Linkov <[email-masked]>,  [email-masked]
>> Date: Fri, 15 May 2020 10:40:34 +0200
>> 
>> > That sounds better.  Bonus points for arranging a tooltip that would
>> > show the full string when the mouse is over that part of the mode
>> > line.
>> 
>> Currently, if I disable ls-switches, it displays just "(Dired)" on
>> modeline, as I coded in my patch. When mouse is over it displays
>> help-tooltip, ("Major mode", "Mouse1 - ..." etc). Is it maybe better to
>> put ls-switches as a submenu to pop-up menu that appears when one click
>> with mouse button1? Or how do you imagine the tooltip - to replace one
>> with help or soemthing else?
>
> Figuring this out is part of the job, I guess.  One possibility would
> be to show the tooltip only when the imaginary defcustom is non-nil,
> i.e. when the user expressed his/her desire to see the switches, but
> there's no space to show them in their entirety.  Maybe there are
> other possibilities, I didn't think long enough about this to tell.
>
> As for the mode tooltip, I think you could work around the problem by
> making the switches tooltip pop up only on the partial text of the
> switches, not on the mode string itself.
Ok. I'll think about it more and see what I can come up with.

An impuls idea is to have the variable as a stae: nil, short, long, where nil
will hide ls-switches completely, short will show them shortened and
long will display ls-switches entirely, and tooltip could then be shown
when mouse is over the short version.

I will have to look up how to code this with tooltip, but I'll try to
code it :-).