Re: Improved recursive import in devel. Please update scripts

2023-06-14 Thread Edward K. Ream
On Wednesday, June 14, 2023 at 10:06:01 AM UTC-5 Edward K. Ream wrote:

Imo it would be best to replace the @path statements in headlines with 
@path statements in body text: @path statements are context sensitive. That 
is, they "accumulate". But this means that cloning and moving an @ 
node will change its effective path.


Done in devel via PR #3379 
. The new code handles 
mypy.leo well.

Please let me know if you would like other changes.

Edward

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/506bc0a2-e725-4fa7-b656-ca3172b83166n%40googlegroups.com.


Re: Improved recursive import in devel. Please update scripts

2023-06-14 Thread Edward K. Ream
On Wed, Jun 14, 2023 at 12:08 PM Jacob Peck  wrote:

I absolutely depend on @path nodes.  Please do not break existing
> @path-in-headline behavior.
>

Perhaps I wasn't clear. Leo will continue to support @path in both
headlines and body text.

The design question: where should the new recursive import logic generate
@path. Either way should work initially. Putting @path in bodies makes it
possible to move clones anywhere.

For me, the answer is clear: put @path in body text.

Edward

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1%2BmHr6kbOmAK_-Oq746dZbNBGaQqMnTK4-NsZnsjA-2w%40mail.gmail.com.


Re: Improved recursive import in devel. Please update scripts

2023-06-14 Thread Jacob Peck
I absolutely depend on @path nodes.  Please do not break existing @path-in-headline behavior.JakeOn Jun 14, 2023, at 11:14 AM, Thomas Passin  wrote:On Wednesday, June 14, 2023 at 11:06:01 AM UTC-4 Edward K. Ream wrote:On Wed, Jun 14, 2023 at 8:06 AM Edward K. Ream  wrote:On Wednesday, June 14, 2023 at 8:00:08 AM UTC-5 Edward K. Ream wrote:PR #3363 improves the outlines created by scripts that call c.recursiveImport.One more thing: leo-editor-contrib contains an improved mypy.leo that illustrates the new import scheme. And one more thing. Imo it would be best to replace the @path statements in headlines with @path statements in body text: @path statements are context sensitive. That is, they "accumulate". But this means that cloning and moving an @ node will change its effective path.Yes, pluses and minuses.  With an @path node in the headline, it's instantly clear where all the external child files are located.  If the @path directive were in the body, this wouldn't be so.   But the point about clones is an issue too.  Another matter is how much code is out there that looks for @path in the headline.  I don't know, but we should probably assume there there is some user code that's not part of the Leo source tree.



-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/95f2683b-d419-4319-bc14-556b89483e27n%40googlegroups.com.




-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/C2C195B6-E01A-4B4D-92F2-63F657A06435%40gmail.com.


Re: Improved recursive import in devel. Please update scripts

2023-06-14 Thread Thomas Passin
On Wednesday, June 14, 2023 at 11:06:01 AM UTC-4 Edward K. Ream wrote:

On Wed, Jun 14, 2023 at 8:06 AM Edward K. Ream  wrote:

On Wednesday, June 14, 2023 at 8:00:08 AM UTC-5 Edward K. Ream wrote:

PR #3363  improves the 
outlines created by scripts that call c.recursiveImport.


One more thing: leo-editor-contrib 
 contains an improved 
mypy.leo 

 
that illustrates the new import scheme. 


And one more thing. Imo it would be best to replace the @path statements in 
headlines with @path statements in body text: @path statements are context 
sensitive. That is, they "accumulate". But this means that cloning and 
moving an @ node will change its effective path.


Yes, pluses and minuses.  With an @path node in the headline, it's 
instantly clear where all the external child files are located.  If the 
@path directive were in the body, this wouldn't be so.   But the point 
about clones is an issue too.  Another matter is how much code is out there 
that looks for @path in the headline.  I don't know, but we should probably 
assume there there is some user code that's not part of the Leo source tree.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/95f2683b-d419-4319-bc14-556b89483e27n%40googlegroups.com.


Re: Improved recursive import in devel. Please update scripts

2023-06-14 Thread Edward K. Ream
On Wed, Jun 14, 2023 at 8:06 AM Edward K. Ream  wrote:

> On Wednesday, June 14, 2023 at 8:00:08 AM UTC-5 Edward K. Ream wrote:
>
> PR #3363  improves
> the outlines created by scripts that call c.recursiveImport.
>
>
> One more thing: leo-editor-contrib
>  contains an improved
> mypy.leo
> 
> that illustrates the new import scheme.
>

And one more thing. Imo it would be best to replace the @path statements in
headlines with @path statements in body text: @path statements are context
sensitive. That is, they "accumulate". But this means that cloning and
moving an @ node will change its effective path.

The alternative would be to put the full path (relative to the .leo file)
in every @ node. This seems too verbose.

I'll create a new PR soon and update mypy.leo accordingly.

Edward

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1PFQ%2BOzz3OzOvZt2W-RrcHhgqbu_sbngBMEOR6LwAABw%40mail.gmail.com.


Re: Improved recursive import in devel. Please update scripts

2023-06-14 Thread Edward K. Ream
On Wednesday, June 14, 2023 at 8:00:08 AM UTC-5 Edward K. Ream wrote:

PR #3363  improves the 
outlines created by scripts that call c.recursiveImport.


One more thing: leo-editor-contrib 
 contains an improved 
mypy.leo 

 
that illustrates the new import scheme. This .leo file should work 
correctly provided it resides in the *parent* of the (inner) mypy 
directory. In other words, the .leo file should work regardless of where 
the mypy repo is.

Please let me know if you have any questions.

Edward

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/a8fb3a07-2732-4ca2-ae92-b345f266a941n%40googlegroups.com.


Improved recursive import in devel. Please update scripts

2023-06-14 Thread Edward K. Ream
PR #3363  improves the 
outlines created by scripts that call c.recursiveImport.

Please update scripts calling c.recursiveImport. The signature has changed.

*Improvements and changes*

c.recursiveImport generates an outline containing only *relative* paths in 
@file and @path nodes.

Leo will import these nodes correctly *only* if the .leo file resides in 
the *parent* directory of the path specified by the "dir_" argument to 
c.recursive import. Imo, this convention is the *only* way of eliminating 
absolute paths.

*Please change all scripts that call c.recursiveImport*

The signature of c.recursiveImport has changed. Please revise your scripts 
accordingly.

The signature *had* to change because c.recursiveImport works differently.

LeoPyRef.leo now contains a revised "Recursive import script" node that 
illustrates how to call c.recursiveImport.

*Summary*

Please revise all scripts that call c.recursiveImport.

c.recursiveImport generates an outline containing only *relative* paths in 
@file and @path nodes.

These nodes will work correctly only if the .leo file resides in the 
*parent* of the directory given by "dir_" kwarg.

Edward

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/0b1366b9-934c-49a3-b119-049e55db7979n%40googlegroups.com.