unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
@ 2012-03-16 18:54 Drew Adams
  2012-09-17  0:07 ` Drew Adams
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Drew Adams @ 2012-03-16 18:54 UTC (permalink / raw)
  To: 11028

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'







^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
  2012-03-16 18:54 bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode' Drew Adams
@ 2012-09-17  0:07 ` Drew Adams
  2016-04-28 14:01 ` Lars Ingebrigtsen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2012-09-17  0:07 UTC (permalink / raw)
  To: 11028

ping






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
  2012-03-16 18:54 bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode' Drew Adams
  2012-09-17  0:07 ` Drew Adams
@ 2016-04-28 14:01 ` Lars Ingebrigtsen
  2016-05-01 19:38 ` Lars Ingebrigtsen
  2016-05-01 19:46 ` Lars Ingebrigtsen
  3 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-28 14:01 UTC (permalink / raw)
  To: Drew Adams; +Cc: 11028

"Drew Adams" <drew.adams@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
  2012-03-16 18:54 bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode' Drew Adams
  2012-09-17  0:07 ` Drew Adams
  2016-04-28 14:01 ` Lars Ingebrigtsen
@ 2016-05-01 19:38 ` Lars Ingebrigtsen
  2016-05-01 19:46 ` Lars Ingebrigtsen
  3 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-05-01 19:38 UTC (permalink / raw)
  To: Drew Adams; +Cc: 11028

"Drew Adams" <drew.adams@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
  2012-03-16 18:54 bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode' Drew Adams
                   ` (2 preceding siblings ...)
  2016-05-01 19:38 ` Lars Ingebrigtsen
@ 2016-05-01 19:46 ` Lars Ingebrigtsen
  2016-05-01 20:00   ` Eli Zaretskii
                     ` (2 more replies)
  3 siblings, 3 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-05-01 19:46 UTC (permalink / raw)
  To: Drew Adams; +Cc: 11028

"Drew Adams" <drew.adams@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
  2016-05-01 19:46 ` Lars Ingebrigtsen
@ 2016-05-01 20:00   ` Eli Zaretskii
  2016-05-01 20:22     ` Lars Ingebrigtsen
  2022-01-27 16:36   ` Lars Ingebrigtsen
  2022-01-27 16:37   ` Lars Ingebrigtsen
  2 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-05-01 20:00 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 11028

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 01 May 2016 21:46:39 +0200
> Cc: 11028@debbugs.gnu.org
> 
> "Drew Adams" <drew.adams@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?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
  2016-05-01 20:00   ` Eli Zaretskii
@ 2016-05-01 20:22     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-05-01 20:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 11028

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Date: Sun, 01 May 2016 21:46:39 +0200
>> Cc: 11028@debbugs.gnu.org
>> 
>> "Drew Adams" <drew.adams@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
  2016-05-01 19:46 ` Lars Ingebrigtsen
  2016-05-01 20:00   ` Eli Zaretskii
@ 2022-01-27 16:36   ` Lars Ingebrigtsen
  2022-01-27 16:37   ` Lars Ingebrigtsen
  2 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-27 16:36 UTC (permalink / raw)
  To: Drew Adams; +Cc: 11028

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode'
  2016-05-01 19:46 ` Lars Ingebrigtsen
  2016-05-01 20:00   ` Eli Zaretskii
  2022-01-27 16:36   ` Lars Ingebrigtsen
@ 2022-01-27 16:37   ` Lars Ingebrigtsen
  2 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-27 16:37 UTC (permalink / raw)
  To: Drew Adams; +Cc: 11028

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-27 16:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-16 18:54 bug#11028: 24.0.94; bad lighter and menus for `text-scale-mode' Drew Adams
2012-09-17  0:07 ` Drew Adams
2016-04-28 14:01 ` Lars Ingebrigtsen
2016-05-01 19:38 ` Lars Ingebrigtsen
2016-05-01 19:46 ` Lars Ingebrigtsen
2016-05-01 20:00   ` Eli Zaretskii
2016-05-01 20:22     ` Lars Ingebrigtsen
2022-01-27 16:36   ` Lars Ingebrigtsen
2022-01-27 16:37   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).