This whole subject confuses me, partly because Leo opens LeoPyRef.leo, not LeoPy.leo, when the latter is selected in *File/Open Specific Leo File*. So I would never see or work on LeoPy.leo. Almost all my work has been working on existing external files. When I commit changes, I don't commit LeoPyRef.leo because it will load the committed changes when it loads my changed file. The only time I would need to commit changes to LeoPyRef would be if I were to create a new external file, possibly with a new *@path* directory for it. In that case, I don't see what the *write-leoPyRef* button would do for me (or to LeoPyRef.leo), and I probably wouldn't even think of using it.
At a minimum, if the button is only for LeoPy.leo and not LeoPyLef.leo, it should be renamed to make that clear. Since I don't see an actual file named "LeoPy.leo" in my clone, I assume the one is supposed to be an alias for the other. This confuses me even more. So as a lowly developer, I'd like to know: - What is the difference between the LeoPyRef.leo and LeoPy.leo files, if any; - Why is there a distinction? - When should I use the *write-leoPyRef* button? - What bad things will happen if I don't use it? I assume there must be some non-leo-code nodes that need to be in certain places, maybe for packaging or installation, and that the button's code tries to check for them and restore them to their desired places if possible. If that's right, no wonder it might have some bugs or quirks! On Monday, December 5, 2022 at 8:30:05 AM UTC-5 Edward K. Ream wrote: > LeoPyRef.leo defines this button. The button does the following: > > - Check that the button is running from leoPy.leo, not LeoPyRef.leo. > - Updates LeoPyRef.leo using only specific subtrees of leoPy.leo. > > Félix and I have noticed that sometimes this script creates large diffs > between the old and new versions of LeoPyRef.leo. > > Instead, the following workflow seems to work better for me: > > - Save leoPy.leo as LeoPyRef.leo. > - Load the new LeoPyRef.leo. > - Delete unwanted parts of the new LeoPyRef.leo. > - Execute the git-diff command within LeoPyRef.leo. > > The git-diff command will ensure I've not deleted too much :-) > > More importantly, the Leonine git-diff shows me the "real" diffs, > regardless of "extraneous" diffs caused by moving/alphabetizing nodes. > > *Summary* > > `@button write-leoPyRef` seems buggy in hard-to-pin-down ways. > > Updating LeoPyRef.leo "by hand" is safe, provided one checks the work > using Leo's git-diff command. > > Your comments, please. > > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/b9feac7e-e12e-4969-ae56-68db044b92d7n%40googlegroups.com.
