Re: how to run a script when Leo starts

2018-02-26 Thread Edward K. Ream
On Sun, Feb 25, 2018 at 11:38 AM, Phil wrote: Actually, the security risk would be higher if a Leo file could turn on > @script by itself. > ​Happily, it can't. Only myLeoSettings.leo can set @bool scripting-at-script-nodes = True Security concerns exist for *any*

Re: how to run a script when Leo starts

2018-02-26 Thread Edward K. Ream
On Sun, Feb 25, 2018 at 10:45 AM, Phil wrote: ​> ​ it would appear that there could be an outline-local version of the flag, so that the global flag in myLeoSettings.leo could be set to False for default behavior. There would still be a security risk for a specific Leo

Re: how to run a script when Leo starts

2018-02-25 Thread Phil
There would still be a security risk for a specific Leo file, which would need addressing, but it perhaps simplifies the problem somewhat. Actually, the security risk would be higher if a Leo file could turn on @script by itself. It means that even when the global setting disallows

Re: how to run a script when Leo starts

2018-02-25 Thread Phil
Alright, I have done a little test, as follows: In myLeoSettings.leo: @bool scripting-at-script-nodes = True With test.leo Under @settings, include this: @bool scripting-at-script-nodes = True create node @script myscript containing this: import datetime

Re: how to run a script when Leo starts

2018-02-24 Thread Edward K. Ream
On Sat, Feb 24, 2018 at 12:33 PM, Terry Brown wrote: > Imo, #740 Execute .leo/leo_startup.py on startup > ​ ​ > is simpler and > ​ ​ > safer. > > Sure, although the per outline specificity of @script nodes is useful. > But unless we're going to remove @script nodes I don't

Re: how to run a script when Leo starts

2018-02-24 Thread Terry Brown
On Fri, 23 Feb 2018 11:15:42 -0800 (PST) Phil wrote: > I want a script to run every time I start Leo. How can I do this? > > Thanks, > Phil Although your question has prompted some clever new ideas, I wonder if the answer is simpler than the response ;-) You can set

Re: how to run a script when Leo starts

2018-02-24 Thread Edward K. Ream
On Saturday, February 24, 2018 at 5:35:53 AM UTC-6, Edward K. Ream wrote: Most other editors allow a script to be executed once on startup. I have > just created #740 Execute .leo/leo_startup.py on startup > to schedule this > enhancement.

Re: how to run a script when Leo starts

2018-02-24 Thread Edward K. Ream
On Fri, Feb 23, 2018 at 1:15 PM, Phil wrote: > I want a script to run every time I start Leo. How can I do this? > ​There are several ways: 1. *Clumsy*: Create a plugin that runs at startup, that is, at 'start1' or 'start2' time. See this page