GNU bug report logs - #11028
24.0.94; bad lighter and menus for `text-scale-mode'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 16 Mar 2012 19:26:01 UTC

Severity: minor

Found in version 24.0.94

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11028 in the body.
You can then email your comments to 11028 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11028; Package emacs. (Fri, 16 Mar 2012 19:26:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 16 Mar 2012 19:26:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Fri, 16 Mar 2012 11:54:49 -0700
I appreciate the intention of keeping the lighter short, but currently
it is meaningless, if not misleading, to users.  They need to fiddle
around to find out what it means.

The lighter text is " " by default (but fortunately an all-space lighter
is not shown).  When you scale the text the lighter changes to a signed
integer, such as "-1" or "+3".

Seeing only that does not help users, unless they've already figured out
what it stands for.  It just makes them wonder, especially if they do
not notice the lighter immediately after they change the text scale.

You put your mouse over the lighter, to see what's up.  The tooltip
says only this, of course:

 Minor mode
 mouse-1: Display minor mode menu
 mouse-2: Show help for minor mode
 mouse-3: Toggle minor modes

Not much help so far.  You try mouse-1 and see this menu:

 -1
 -------------------
 Turn Off minor mode
 Help for minor mode

("Off" should not be capitalized, BTW.)

Which minor mode?  No idea still.  

This menu would be better if it included (at least the scaling) items
from the menu shown by `S-mouse-1', i.e.:

 Change Default Buffer Face
 --------------------------
 Change Buffer Font...
 Increase Buffer Text Size
 Decrease Buffer Text Size
 Reset to Default

You try mouse-3.  That shows you menu `Minor Modes' which has a list of
minor modes you can toggle.  But this mysterious "-1" minor mode is not
one of them.  Neither is `text-scale-mode', for that matter.  Our
mysterious mode is nowhere to be seen.  Menu `Minor Modes' does not help
with this minor mode, even though you can toggle this mode in other
ways.

You try mouse-2.  And now you see that this mysterious "-1" or "-4" or
"+3" in fact stands for `text-scale-mode'.

Emacs users deserve better.

If you cannot come up with something shorter and more meaningful for the
lighter, then I would suggest "Zoom:-1" or "Text:-1" or "Scale:-1".  I
don't claim these suggestions are ideal, but they would at least be more
helpful to users than just "-1".

In GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600)
 of 2012-02-26 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include'






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11028; Package emacs. (Mon, 17 Sep 2012 00:09:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <11028 <at> debbugs.gnu.org>
Subject: RE: bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Sun, 16 Sep 2012 17:07:35 -0700
ping





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11028; Package emacs. (Thu, 28 Apr 2016 14:02:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 11028 <at> debbugs.gnu.org
Subject: Re: bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Thu, 28 Apr 2016 16:01:01 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> I appreciate the intention of keeping the lighter short, but currently
> it is meaningless, if not misleading, to users.  They need to fiddle
> around to find out what it means.
>
> The lighter text is " " by default (but fortunately an all-space lighter
> is not shown).

I think that's by design.  There is no lighter for text-scale-mode when
you haven't scaled anything.  I think that's natural.

> When you scale the text the lighter changes to a signed integer, such
> as "-1" or "+3".
>
> Seeing only that does not help users, unless they've already figured out
> what it stands for.  It just makes them wonder, especially if they do
> not notice the lighter immediately after they change the text scale.
>
> You put your mouse over the lighter, to see what's up.  The tooltip
> says only this, of course:
>
>  Minor mode
>  mouse-1: Display minor mode menu
>  mouse-2: Show help for minor mode
>  mouse-3: Toggle minor modes

I think all those mode menus should say what modes they belong to,
yes, instead of just "Minor mode".

> Not much help so far.  You try mouse-1 and see this menu:
>
>  -1
>  -------------------
>  Turn Off minor mode
>  Help for minor mode
>
> ("Off" should not be capitalized, BTW.)
>
> Which minor mode?  No idea still.  

Yeah, that's not good.

> This menu would be better if it included (at least the scaling) items
> from the menu shown by `S-mouse-1', i.e.:
>
>  Change Default Buffer Face
>  --------------------------
>  Change Buffer Font...
>  Increase Buffer Text Size
>  Decrease Buffer Text Size
>  Reset to Default

True.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11028; Package emacs. (Sun, 01 May 2016 19:39:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 11028 <at> debbugs.gnu.org
Subject: Re: bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Sun, 01 May 2016 21:38:27 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

>  Turn Off minor mode
>  Help for minor mode
>
> ("Off" should not be capitalized, BTW.)

I've now fixed this...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11028; Package emacs. (Sun, 01 May 2016 19:47:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 11028 <at> debbugs.gnu.org
Subject: Re: bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Sun, 01 May 2016 21:46:39 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

>  -1
>  -------------------
>  Turn Off minor mode
>  Help for minor mode

[...]

> Which minor mode?  No idea still.  

This seems like it's been kinda hackishly implemented.

This is the function that shows the menu...

(defun mouse-minor-mode-menu (event)
  "Show minor-mode menu for EVENT on minor modes area of the mode line."
  (interactive "@e")
  (let ((indicator (car (nth 4 (car (cdr event))))))
    (debug event)
    (minor-mode-menu-from-indicator indicator)))

Hm...

but then

(defun minor-mode-menu-from-indicator (indicator)

[...]

  (let* ((minor-mode (lookup-minor-mode-from-indicator indicator))
         (mm-fun (or (get minor-mode :minor-mode-function) minor-mode)))

Wow, that's a roundabout way of doing it...  Anyway, we then have the
mode symbol...  What about using a pretty version of the mode symbol as
the menu header?  That would be "Text Scale Mode" in this case.

I think that would be better than using the lighter as the menu header.

What's the name of the function that creates pretty strings from symbol
names?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11028; Package emacs. (Sun, 01 May 2016 20:02:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: drew.adams <at> oracle.com, 11028 <at> debbugs.gnu.org
Subject: Re: bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Sun, 01 May 2016 23:00:38 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Sun, 01 May 2016 21:46:39 +0200
> Cc: 11028 <at> debbugs.gnu.org
> 
> "Drew Adams" <drew.adams <at> oracle.com> writes:
> 
> >  -1
> >  -------------------
> >  Turn Off minor mode
> >  Help for minor mode
> 
> [...]
>   (let* ((minor-mode (lookup-minor-mode-from-indicator indicator))
>          (mm-fun (or (get minor-mode :minor-mode-function) minor-mode)))
> 
> Wow, that's a roundabout way of doing it...  Anyway, we then have the
> mode symbol...  What about using a pretty version of the mode symbol as
> the menu header?  That would be "Text Scale Mode" in this case.

What menu header?  Drew was complaining about the tooltip, not the
menu.  When you actually click on the lighter, the pop-up menu does
have a header that shows the mode name.

So what are you trying to do here?

> I think that would be better than using the lighter as the menu header.

Why?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11028; Package emacs. (Sun, 01 May 2016 20:23:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: drew.adams <at> oracle.com, 11028 <at> debbugs.gnu.org
Subject: Re: bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Sun, 01 May 2016 22:22:20 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi <at> gnus.org>
>> Date: Sun, 01 May 2016 21:46:39 +0200
>> Cc: 11028 <at> debbugs.gnu.org
>> 
>> "Drew Adams" <drew.adams <at> oracle.com> writes:
>> 
>> >  -1
>> >  -------------------
>> >  Turn Off minor mode
>> >  Help for minor mode
>> 
>> [...]
>>   (let* ((minor-mode (lookup-minor-mode-from-indicator indicator))
>>          (mm-fun (or (get minor-mode :minor-mode-function) minor-mode)))
>> 
>> Wow, that's a roundabout way of doing it...  Anyway, we then have the
>> mode symbol...  What about using a pretty version of the mode symbol as
>> the menu header?  That would be "Text Scale Mode" in this case.
>
> What menu header?  Drew was complaining about the tooltip, not the
> menu.  When you actually click on the lighter, the pop-up menu does
> have a header that shows the mode name.
>
> So what are you trying to do here?

The thing with the "+1" at the top is a menu:

      (setq menu
            (if menu
                (mouse-menu-non-singleton menu)
              (if (fboundp mm-fun)      ; bug#20201
                  `(keymap
                    ,indicator
                    (turn-off menu-item "Turn off minor mode" ,mm-fun)
                    (help menu-item "Help for minor mode"
                          (lambda () (interactive)
                            (describe-function ',mm-fun)))))))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11028; Package emacs. (Thu, 27 Jan 2022 16:38:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 11028 <at> debbugs.gnu.org
Subject: Re: bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Thu, 27 Jan 2022 17:36:57 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Wow, that's a roundabout way of doing it...  Anyway, we then have the
> mode symbol...  What about using a pretty version of the mode symbol as
> the menu header?  That would be "Text Scale Mode" in this case.
>
> I think that would be better than using the lighter as the menu header.

This has apparently been fixed in the years since I last looked at this:



-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11028; Package emacs. (Thu, 27 Jan 2022 16:38:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 11028 <at> debbugs.gnu.org
Subject: Re: bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
Date: Thu, 27 Jan 2022 17:37:43 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Wow, that's a roundabout way of doing it...  Anyway, we then have the
> mode symbol...  What about using a pretty version of the mode symbol as
> the menu header?  That would be "Text Scale Mode" in this case.
>
> I think that would be better than using the lighter as the menu header.

This has apparently been fixed in the years since I last looked at this,
and the menu header looks fine in Emacs 29, so I'm closing this bug
report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 11028 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 27 Jan 2022 16:38:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 25 Feb 2022 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 176 days ago.

Previous Next


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