* bug#44454: 26.3; Enhancement request: let :help in menus take a FORM arg, i.e., be eval'd
@ 2020-11-04 21:34 Drew Adams
2020-11-09 16:02 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2020-11-04 21:34 UTC (permalink / raw)
To: 44454
Enhancement request:
In extended menu items and the easy-menu stuff, the value of :help must
be a literal string. Consider perhaps letting it be a FORM, i.e., have
it be evaluated, like :visible and :enable.
It would be backward compatible. If you use a sexp now the result is
that you just don't get any help echo.
In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.18362
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#44454: 26.3; Enhancement request: let :help in menus take a FORM arg, i.e., be eval'd
2020-11-04 21:34 bug#44454: 26.3; Enhancement request: let :help in menus take a FORM arg, i.e., be eval'd Drew Adams
@ 2020-11-09 16:02 ` Lars Ingebrigtsen
2020-11-09 16:26 ` Drew Adams
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-09 16:02 UTC (permalink / raw)
To: Drew Adams; +Cc: 44454
Drew Adams <drew.adams@oracle.com> writes:
> Enhancement request:
>
> In extended menu items and the easy-menu stuff, the value of :help must
> be a literal string. Consider perhaps letting it be a FORM, i.e., have
> it be evaluated, like :visible and :enable.
>
> It would be backward compatible. If you use a sexp now the result is
> that you just don't get any help echo.
:visible and :enable have to allow forms as values. What's the use case
for forms for :help elements?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#44454: 26.3; Enhancement request: let :help in menus take a FORM arg, i.e., be eval'd
2020-11-09 16:02 ` Lars Ingebrigtsen
@ 2020-11-09 16:26 ` Drew Adams
2020-11-10 13:57 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2020-11-09 16:26 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 44454
> :visible and :enable have to allow forms as values. What's the use case
> for forms for :help elements?
Same purpose as :visible and :enable:
To be able to change the help echo depending on the
current context. The command for the menu item can
have different behaviors, depending on the context.
The help echo could let you know about this.
For example, the help echo for a command that cycles
some setting/value could let you know what the
current value is or what the next one will be if you
choose that menu item - let you know what will happen.
Just as :visible and :enable let you know whether a
command is currently available, so could :help let
you know what its behavior will be.
I have exactly this situation in my `Info' submenu
`Toggle/Cycle'. For the toggle commands there, the
toggle checkmark suffices to let you know the current
(and hence the next) state/value. For cycle commands
there's no way to know, except by actually cycling.
___
(Dare I ask if there's some reason that :help cannot
or shouldn't accept a FORM to evaluate? Will I be
denounced again for including a question "Why not?"?
You have the "why" above. But I'd anyway like to know
what it is, if there's a good answer to "why not?".)
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#44454: 26.3; Enhancement request: let :help in menus take a FORM arg, i.e., be eval'd
2020-11-09 16:26 ` Drew Adams
@ 2020-11-10 13:57 ` Lars Ingebrigtsen
2020-11-10 17:27 ` Drew Adams
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-10 13:57 UTC (permalink / raw)
To: Drew Adams; +Cc: 44454
Drew Adams <drew.adams@oracle.com> writes:
> I have exactly this situation in my `Info' submenu
> `Toggle/Cycle'. For the toggle commands there, the
> toggle checkmark suffices to let you know the current
> (and hence the next) state/value. For cycle commands
> there's no way to know, except by actually cycling.
Makes sense to me.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#44454: 26.3; Enhancement request: let :help in menus take a FORM arg, i.e., be eval'd
2020-11-10 13:57 ` Lars Ingebrigtsen
@ 2020-11-10 17:27 ` Drew Adams
0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2020-11-10 17:27 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 44454
> > I have exactly this situation in my `Info' submenu
> > `Toggle/Cycle'. For the toggle commands there, the
> > toggle checkmark suffices to let you know the current
> > (and hence the next) state/value. For cycle commands
> > there's no way to know, except by actually cycling.
>
> Makes sense to me.
BTW, another way to consider this is to look for
similarity with `help-echo'. Not that the two
need to be similar, but that the use cases are
the same or similar for the value to be evaluated
rather than being restricted to a literal string.
(Yes, there's nothing special about the evaluation
for contexts where `help-echo' is used - it has
nothing, per se, to do with `help-echo', which is
just a property. And yes, for menus, using a
FORM that gets evaluated (by the display engine,
IIUC) is a bit special. But the use cases - the
usefulness for users, is of the same order.)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-10 17:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-04 21:34 bug#44454: 26.3; Enhancement request: let :help in menus take a FORM arg, i.e., be eval'd Drew Adams
2020-11-09 16:02 ` Lars Ingebrigtsen
2020-11-09 16:26 ` Drew Adams
2020-11-10 13:57 ` Lars Ingebrigtsen
2020-11-10 17:27 ` Drew Adams
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.