On Wed, Jan 14, 2009 at 6:01 PM, Kayvan A. Sylvan <[email protected]> wrote:
> > How about this simplification? > > Each @enabled-plugins node adds to (does not replace!!) the current plugin > list. > > Each @enabled-plugins section can optionally starts with a "@clear-plugins" > line which would clear the list of plugins to load. This is far from a simplification. It's not going to happen, for the following reasons: 1. In effect, @enabled-plugins settings already work this way. That is, when loading x.leo, at most one @enabled-plugins node ever has effect. When loading y.leo (from x.leo) there is no way to clear or disable plugins, because Leo's plugin architecture doesn't support it. 2. There are ways to prevent events from being sent to plugins, but in general this is not the same as disabling a plugin itself. For example, a plugin that overrides Leo's classes must be told to undo the override. Depending on history, this might be difficult or impossible. In general, to truly disable a plugin, the plugin would have to support "disable-plugin" events. I don't want to commit to adding support for such events to all existing and future plugins. 3. Furthermore, if you do truly have an urgent need to disable an already-existing plugin, you could write a plugin (or script) to do it! This is more of a thought experiment, but it does open the door if the need ever arises. Of course, you would have to add support for "disable-plugin" events to the to-be-disabled plugin. BTW, Leo's core does not need to support "disable-plugin" events: a "disabling" plugin could generate such events itself. In short, Leo isn't going to automatically support disabling of plugins, because that would require that all plugins support "disable-plugin" events. In an emergency, however, you could write a plugin (or script) that would disable a plugin. You would likely have to modify the to-be-disabled plugin, but that is, and should be, your problem, not mine. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
