I'm a couple days into trying Leo (again) and looking forward to using
it as my primary editor. But while playing around with the settings I
noticed that new settings can _only_ be read from files. I'd like to
understand the reason for this.

>From the docs:
   You can set any *existing* item in an @settings tree with
c.config.set(p,setting,val).

But, as all of Leo is available for scripting (I really like this
"aliveness"), this seems to me as a rather sad state of affairs (death
and rebirth), if only for philosopical reasons.

I tried this in an @button node:
  import leo.core.leoConfig as conf
  conf.settingsTreeParser(c).visitNode(c.p)

This invokes the doShortcuts code but as the parser and config classes
are separated it seems to not affect the c.config object. Maybe I
totally misread this code (getting to grips with python still).

I read the leoConfig module code a bit more and tried
g.app.config.updateSettings(c,True) which fails to work as well.

To summarize:

Is it possible to have an @button script that sets settings (in the
current Leo window) and if not, why?

-- 
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.

Reply via email to