|
From: Joachim K. <ko...@ma...> - 2019-12-04 09:41:09
|
Hi Bernard,
I have a small annoyance: I want to have
binding create {z 'x'} {status execute}
globally, but in TeX mode it constantly
gets overridden by some \index{} insertion.
What is the proper way of *permanently*
deleting a binding and make sure it *never*
comes back?
I have tried to write in my prefs file
latex.tcl
binding delete {z 'x'}
binding delete -tag TeX {z 'x'}
binding create {z 'x'} {status execute}
but I can't control at what moment the
binding is redefined, so it comes back :-(
(I suspect that a menu is redefining this.)
The problem was much worse 15 years ago :-)
when it was discussed a lot on this list.
At that time it was proposed to stipulate
that menu items should link to procs, and key
bindings should link to procs, but that there
should be no direct link between menus and
key bindings, other than the menu advertising
an equivalent key binding if it exists.
But it seems difficult to follow in practice.
Would it make sense to have a priority
system for bindings, for example with a
-force flag? Then users could write their
super-important bindings with this flag,
whereas all of AlphaTcl's binding declarations
should be made without it. The rule should
be that without the flag, one binding cannot
erase another -- it should just fail silently.
(Or maybe the default should be to override,
and then the flag should be -ifnotalreadyinuse.)
Currently AlphaTcl creates literally hundreds
of default bindings, and the user might only
ever use a few of them. But those hundreds
of bindings may get in the way of a few bindings
the user defines himself and really cares about.
Maybe it is an over-reaction to think about
new design. At the moment I will be happy if
I just manage to turn bindings off permanently.
Thanks,
Joachim.
|