Leo's plugins manager can and imo should dispatch events registered to a
plugin *only *to commanders for which the plugin is enabled in an
@enabled-plugins node.
This would make @enabled-plugins nodes work like all other settings. Not
enabling a plugin in a local (per .leo file) @enabled-plugin node would
disable that plugin *for that outline* even if the plugin is enabled in
myLeoSettings.leo or leoSettings.leo.
In practice, the plugins manager would dispatch an event registered by a
plugin to a commander only if the plugin is actually enabled in the
commander. Events would be dispatched as always. For example:
def onCreate (tag, keys):
c = keys.get('c')
if c: << do something >>
The only difference is that this event handler would be called only for
outlines in which the plugin was enabled.
There might be unforeseen difficulties, but I plan to experiment with this
soon.
Your comments, please, Amigos.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.