From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.help Subject: Re: use-package Date: Thu, 12 May 2016 22:04:58 +0100 Message-ID: <87y47f7zt1.fsf@russet.org.uk> References: <874magv15u.fsf@mat.ucm.es> <87d1p38ll6.fsf@mat.ucm.es> <87y47pg5da.fsf@russet.org.uk> <87shxwzkzg.fsf@russet.org.uk> <87d1outgo2.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1463129791 18359 80.91.229.3 (13 May 2016 08:56:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 May 2016 08:56:31 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Stefan Monnier To: Kaushal Modi Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 13 10:56:30 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b18tS-0000nW-A3 for geh-help-gnu-emacs@m.gmane.org; Fri, 13 May 2016 10:56:22 +0200 Original-Received: from localhost ([::1]:33501 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b18tR-0006oB-LW for geh-help-gnu-emacs@m.gmane.org; Fri, 13 May 2016 04:56:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b18tE-0006lL-Ji for help-gnu-emacs@gnu.org; Fri, 13 May 2016 04:56:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b18tA-0007Rc-9a for help-gnu-emacs@gnu.org; Fri, 13 May 2016 04:56:07 -0400 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:47098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b18t9-0007Pg-W7 for help-gnu-emacs@gnu.org; Fri, 13 May 2016 04:56:04 -0400 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1b18R1-0001IC-Df; Fri, 13 May 2016 09:26:59 +0100 Original-Received: from jangai.ncl.ac.uk ([10.66.67.223] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1b18R0-00069d-78; Fri, 13 May 2016 09:26:58 +0100 In-Reply-To: (Kaushal Modi's message of "Wed, 11 May 2016 11:42:34 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:109938 Archived-At: 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 sh= ow > 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 =E2=80=98nil=E2=80=99, the mode is not displ= ayed 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. Al= so > 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 t= he > useful, nice to have feature packages in Elpa. It's pretty straight forwa= rd > 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) Help MML --> Turn off Help (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 reason". 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? Phil