Hi Thomas
hmm... I have not had the .py in the list of plugins, based on ... the
documentation. I will try to find the link.
> It never occurred to me to enable it locally only for one outline so I
haven't tested for this.
I also found this option in the docs ... I was mildly surprised. But if my
node in the local file is
@enabled-plugins # content: freewin
(rather than freewin.py), it is bit strange that that 'seems to work',
albeit for some very-reduced version of 'work' (ie. just adds 'freewin' to
the output of g.app.config.getEnabledPlugins())
> I just went to one of my Linux VMs and tried it. the z-open-freewin
command was present in all outlines, not just the one where I had put the
enabled setting. That surprised me.
Yes, I was also experimenting with the 'scope' of plugins loaded like that,
but didn't want to ask or mention it until I had got the basics sorted...
Hmm, I see I may have misread the documentation:
"""
https://leo-editor.github.io/leo-editor/plugins.html
You can enable plugins by file name or by module name: - Leo looks in the
leo/plugins directory for names ending in .py. - Leo uses imports a module
directly for names that do *not* end in .py, so you can load plugins from
any path on PYTHONPATH, including paths given in sitecustomize.py.
"""
^^^^ if this is intended to mean what you say, then I think it could be
written clearer.
The .pyc files in my plugins/ directory are extremely old, I am sure they
predate anything in myLeoSettings.leo ...
I will experiment a bit and report back
Thanks, J^n
On Sunday, November 3, 2024 at 9:09:37 PM UTC [email protected] wrote:
> On Sunday, November 3, 2024 at 3:50:44 PM UTC-5 jkn wrote:
>
> I feel like I am being a bit dim here...
>
> I'm trying to enable the freewin plugin (I am actually also trying
> viewrendered/viewrendered3, but 'backed off' to freewin, because I seem to
> be having fundamental plugin issues.
>
>
> You have to include the ".py" extension in the enabled-plugins body. It
> the extension is present Leo will look in the leo/plugins directory. If
> it's absent, Leo will try to import the module from the known sys.path
> locations. So for freewin, the entry in enabled-plugins needs to be:
> freewin.py
> -
>
> plugins_menu.py
> viewrendered.py
> viewrendered3.py
> contextmenu.py
> nav_qt.py
> mod_scripting.py
> mod_autosave.py
> python_terminal.py
> qt_layout.py
> quicksearch.py
> freewin.py
> rpcalc.py
> leo_to_html.py
>
>
>
> - I have an @settings node '@enabled-plugins' in myLeoSettings.leo
> - the body of this has several plugins already listed (which I hardly
> ever/never use)
> - I added a 'freewin' line
> - after restarting Leo, I run a node with
> "g.es(g.app.config.getEnabledPlugins())"
> (NB: docs says 'g.app.gui.getEnabledPlugins()"; I will correct this later)
>
>
> Running that exact expression, I see all the plugins I've enabled,
> including freewin:
>
> plugins_menu.py
> viewrendered.py
> viewrendered3.py
> contextmenu.py
> nav_qt.py
> mod_scripting.py
> mod_autosave.py
> python_terminal.py
> qt_layout.py
> quicksearch.py
> *freewin.py*
> rpcalc.py
> leo_to_html.py
>
>
> - nothing is shown! my @enabled-plugins node does not appear to be read.
> - so ... I put a similar node under @settings in a particular file
> - now I can run g.es(g.app.config.getEnabledPlugins()) and see 'freewin'
> in the log pane.
> - however...
> - show-commands does not show z-open-freewin
>
>
> It never occurred to me to enable it locally only for one outline so I
> haven't tested for this. Off-hand I don't see why the commands wouldn't be
> present. I just went to one of my Linux VMs and tried it. the
> z-open-freewin command was present in all outlines, not just the one where
> I had put the enabled setting. That surprised me.
>
--
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 view this discussion visit
https://groups.google.com/d/msgid/leo-editor/033677c0-0320-4b43-9bba-6341c8a05aaen%40googlegroups.com.