It's not really sharing data in the sense of running one script and another 
script having access to data created by the first script. I'd liken what 
I'm talking about to setting environmental variables in a Linux environment 
and being able to access that variable from any shell script.

I guess the problem is as Terry described, I think a user would have to 
have access to the write logic for a plugin to work seamlessly with Leo. It 
would have to traverse the outline checking for all the instances of the 
global variables and replacing them during the write sequences. 

I don't think valuespace can do this. I don't think valuespace can do what 
I'm talking about at all because what I'm doing isn't for scripting and 
valuespace seems to be aimed directly at scripting. 

I'd be pleased if I was wrong and somehow a plugin could handle such a 
replacement before a file write.

On Monday, May 4, 2015 at 10:46:28 AM UTC-4, Edward K. Ream wrote:
>
>
>
> On Mon, May 4, 2015 at 7:03 AM, john lunzer <[email protected] 
> <javascript:>> 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 [email protected].
To post to this group, send email to [email protected].
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