I instrumented *expand_path_expression**()* with print statements and found that it is being called all the time, apparently for every file that Leo knows about. I'm thinking that it's Leo polling to see if each file has been changed outside of Leo. Some of those call outputs were full paths, some of them were relative paths (possibly they were my "..\" paths, but too many were scrolling by for me to be sure).
The thing is that *expand_path_expression()* is used by a number of other routines, and some plugins. All of those probably assume that they will receive a certain path format, and none of that seems to be documented, at least not in the methods themselves. Any change would have to be checked to make sure that everything else keeps working. And it seems that different parts of Leo's internals depend on the exact behavior of this method. I know of at least three things Leo has to do with node paths: 1. Load/save external files whose location does not depend on *@path* directives; 2. Load/save external files whose location uses *@path* directives; 3. Poll all external files and outlines for changes. There may easily be more. The trick will be to get them all to work correctly if any changes are made. And then existing external files might become inaccessible. Consider a case where you specified *@path ~/my-special-dir*/*test.txt*. We know that this will create a directory/file structure in the wrong - that is, not intended - place. Now say we fix the code so that in the future it creates our file in the correct location. Trouble is, Leo now won't be able to find the existing external file that it had created earlier in the wrong place. This might be all right for you and your new outline that only has one or two such files. You can fix that by hand. But there may be large outlines out there that have dozens or hundreds of files created with the wrong paths. For example, in LeoPy.leo, all the plugins have paths starting with "../" . They *have to* keep working. Fixing that up is a much larger task. Not everyone has the script knowhow and desire to work up a script that reliably fixes this kind of problem. On Sunday, April 11, 2021 at 9:10:45 AM UTC-4 TEK42 wrote: > That is all curios. I am unclear the expanduser() call would affect things > that way. Then again I understand <1% of Leo code at this point. > What *is *clear is that I will need to get Leo setup on Windows and Linux > as well. > > -- 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/8273a450-0ef6-4f8b-affc-c83ece3db682n%40googlegroups.com.
