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.

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