[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use-package

From: Phillip Lord
Subject: Re: use-package
Date: Thu, 12 May 2016 22:04:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux)

Kaushal Modi <> writes:

> On Wed, May 11, 2016, 6:59 AM Phillip Lord
>> The question is, though, which is the most sensible default.
>> Which kind of illustrates my point, I think. Most of your work is
>> switching things off!
>> I think we can do a better job of the defaults, by simply moving to "no
>> lighter by default".
> I would still say that the default would be to keep the lighters on. It is
> useful especially when people have installed some minor mode and have
> enabled that globally or locally without understanding the full
> implications. Then by simply glancing at the minor mode lighter list, they
> can get a hint as to what's different in the environment between when
> things are behaving as they expect vs the things they do not.

Maybe this is true, although if there are 5 lighters in the list, then
"glancing" doesn't really cover it.

> Also you saw just the list of minor mode lighters that I like to hide. It's
> very possible that someone else likes to hide the lighters I choose to show
> and show some of those that I am hiding. Overall when you overlay the
> choice of all emacs users (do an OR condition of everyone's choices), I
> would not be surprised if that result leaned  towards showing almost all
> the lighters.
> We cannot set the defaults based on the preferences of just you and me. I
> think that it is more important to have those to help people debug stuff
> and avoid frustration.

It is certainly the case that the lighters are sometimes useful. But if
by sometimes, we mean "occasionally" then it's an open question how
sensible it is showing all of this information. Many applications have
something equivalent for "insert/overwrite", perhaps "caps lock" even
thought this normally changes the keyboard.

I agree that setting defaults is difficult, but "show everything in case
it is useful", is to my mind not sensible. Consider, the current
information about lighters in the manual. "Minor Mode Conventions" says
nothing; in fact, the only place I can find anything is in the
documentation about `define-minor-mode' which says:

     The string LIGHTER says what to display in the mode line when the
     mode is enabled; if it is ‘nil’, the mode is not displayed in the
     mode line.

So no information about why should and should not appear.

I'm guilty of this. In my own pabbrev mode I add "pabbrev". Why? Because
I thought you were supposed to. What's the point? I mean, I know if it
is one because it offers expansions!

One thing that would be nice would be some way of surveying Emacs users.
Perhaps an ELPA package that we could update occasionally, and each
update would be a new survey. Still, a separate issue.

> The list of minor mode lighters that I hide has grown over time. For few I
> was often confused on which ones I want to be shown vs which I do not. Also
> as my experience with elisp grew, I relied less on the lighters and more on
> C-h v minor-mode-name. But that does not justify turning the lighters off
> for everyone by default, even for people who may be just started using
> emacs. If the lighters are on, then they would at least know what question
> to ask.. Like "Hey, things are funny only when I have XYZ in the thing at
> the bottom".
> Here's the initial thinking:
> 1. Leave the defaults as they are now.
> 2. Add a customizable option to hide all lighters.
> 3. Allow user to customize a white list or black list of minor modes. So
> you might choose to show all lighters except a few in black list. Or you
> might choose to hide all except a few in white list.
> Thinking of that, may be rich-minority should be integrated into the core.
> But then, why do that when it is already included in GNU Elpa. We are
> anyways trying to keep only the very essential code in the core and put the
> useful, nice to have feature packages in Elpa. It's pretty straight forward
> to install that package today and configure as you need.
> So the final proposal would be to not hide the lighter by default and use
> the available packages like rich-minority to set user-specific lighters.

I would suggest something more radical.

We replace the current list of lighters with a single item, which when
clicked on gives a menu of minor modes. So

(Message pab MML yas Helm Abbrev Fill Narrow)

would change to:

(Message options[7])

Clicking on options[7] would give a menu

  pabbrev --> Turn off
              Turn on (for globalized only)
  MML --> Turn off
          (the current menu)

and so on.

Toggling (say) pabbrev on would give:

(Message Options[7: pabbrev on])

for a few seconds then back to

(Message Options[7])

Finally, some minor-modes would be "permanent lighters", which would
appear permanently visible (like now). So

(Message Options[7] Ovwrt)

My current list for these would be "Ovwrt", "Narrow" "Fill". Advice in
the manual would be: "Don't do this, unless you have a very good

Rich-minority and diminish are papering over the cracks. Too much is
happening in mode line. Adding configuration options is, I feel, dumping
the responsibility onto the user.

Think we can get this done in time for Emacs-25.1?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]