On Mon, 4 May 2015 09:59:55 -0500
"'Terry Brown' via leo-editor" <leo-editor@googlegroups.com> wrote:

> On Mon, 4 May 2015 09:46:27 -0500
> "Edward K. Ream" <edream...@gmail.com> wrote:
> 
> > On Mon, May 4, 2015 at 7:03 AM, john lunzer <lun...@gmail.com>
> > wrote:
> > 
> > Specifically what I'm trying to do is say have a node:
> > >
> > > Headline:
> > > @data myString1
> > > Body:
> > > This is Common Data
> > >
> > > Then in a child of an @clean myfile.txt node be able to reference
> > > "myString1" by name somehow and be replaced by "This is Common
> > > Data" when the file is written out.
> > 
> > ​I think we've answered this particular question earlier by saying
> > that it's too dangerous to allow users to modify Leo's write logic.
> 
> Yes but I think you're responding to / being misdirected by the syntax
> John suggested, rather than the outcome he's looking for.  My

Actually my response there isn't really helping clarify things - your
response, Edward, that Leo @settings aren't the way to address this, is
*probably* right, although you could use them (without change to
current behavior) in some templating context - certainly modifying their
current behavior is not the way to address this.  My response was that
an entirely different line of approach, valuespace, might be relevant.

Cheers -Terry

> impression is that somewhere in the outline he wants to define a
> string as PYTHON_BIN='/safe/usr/bin/python' and then in many bash
> scripts in the outline be able to put something like:
> 
>   #![[PYTHON_BIN]]
>   ...
> 
> and have the scripts written out with the substituted text.  I'm not
> sure if valuespace does that or not, but that's the first place I'd
> check for that - also Ville did something with the jinja templating
> language, maybe that's part of valuespace or something separate.
> 
> Cheers -Terry
> 
> > However, there are plenty of ways for scripts to share data.  If the
> > script is a Leo script, with access to c, g and p, then the script
> > can just use c.config.getData('myString1').  Otherwise, if c is not
> > available, the script can use g.app data, as described earlier.
> > 
> > Otherwise, there is no Leo environment at all.  In that case, your
> > script could write the data to a file and pick up the data from the
> > file.  Or you could create an @clean file containing the common data
> > and again, pick up this data later by reading the file.
> > 
> > EKR
> 

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to