[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: Mon, 16 May 2016 16:16:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux)

Drew Adams <> writes:
>> 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.
> What would you expect it to say?  Any consideration of whether to
> provide a lighter requires some knowledge of the _particular_ mode.
> It is up to the mode designer to judge whether it makes any sense
> to provide a lighter.  It should be up to a user to decide whether
> to show a provided lighter.

Most things require some knowledge of the use case, but that doesn't
stop us from making statements or giving advice that may be relevant in
certain circumstances.

Things that might be useful to say: don't use a lighter if your mode is
likely to be always on for any user that uses it at all; don't use a
lighter if your mode provides immediate feedback that it is one

>> 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.
> A separate issue, yes.  But as it relates to this discussion, my
> voice is against asking for some summary yes/no from users.

My thought was a something a bit richer; a cross-between "M-x
report-emacs-bug" and a survey. For this question, for example, it would
be good to know how many people are using rich-minority and for what

> The utility of a particular lighter is 100% dependent on the
> particular mode. And its utility to a particular user depends on that
> user and possibly on different use contexts.

These are assertions. You might be right, you might not. But I would not
use "it all depends" as the basis for not making a decision. Always
leaving things to the users and saying "well, it's configurable" is not
a good way forward.

> I would not want to see a rule established based on some survey.

In the ideal world, we would establish practice on the basis of

>> 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.
> A lighter is meant to provide immediate information, directly and
> continually, without having to ask for it (e.g. access a menu).
> We already have menus that provide access to minor-mode info.

Do we? Where?

> So I strongly disagree with your suggestion.  Among other things,
> I have lighters that indicate more than two states (mode on/off).
> And I would encourage this for other modes that might, in effect,
> have multiple states.  It puts the lie to the idea that lighters
> are not very useful in general.

Oh, I said "not often" not "in general". There are certainly examples.
Likewise, projectile has a dynamic lighter. viper-mode, interesting, has
a static lighter but changes the mode line in other ways.

> This lighter thus communicates a fair amount of info using
> only a few characters.  This is no doubt not common, but I'd
> bet that some other modes also could usefully provide more
> info in a lighter than just on/off.

And clearly, in this case, it is useful. So the question is, can we make
more space for useful things?

>> Rich-minority and diminish are papering over the cracks.
>> Too much is happening in mode line.
> Again, a user judgment.  It sounds like too much, for you,
> was happening in your mode line.  Emacs is rich in use
> cases and users.  Your mode line might bother me too - or
> it might not.

I think you need to distinguish between "your judgement"-- in this case
that means mine, and "user judgement" as something that the user should
reasonably be expected to make a decision on. Expecting users to
unclutter the mode-line for themselves is not good.

What neither of us knows is a) do many users find the mode-line
cluttered b) do many users unclutter it for themselves and c) do they
always unclutter the same things.

> You know, there are packages that give Emacs a spartan,
> minimal look & feel - no title bar, menu bar, tool bar,
> fringes, mode line,...  That's great - for those users
> who want such a look & feel.
> I'm all for such a possibility.  What I am not for is
> Emacs imposing or recommending this or that look & feel
> in some blanket way.
> Let a hundred flowers bloom.  Vive the mode line.

A mode-line with 100 lighters really would be cluttered.


reply via email to

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