Well, it's more than that.  Using "." works for @path subtrees that are not 
even on the same drive (that is, Windows drive) as the leo outline they are 
in.  It's not just that "." sends you to the directory, say for the 
workbook in *%USERPROFILE%\.leo* (Windows).  In the workbook outline at 
that location, for any of the following nodes begin selected, the 
command(s) go to the right directory:

- head
- @path d:\temp
    @path dir_1
       @path dir_2
            @clean test.txt

On Tuesday, April 6, 2021 at 4:14:46 PM UTC-4 Edward K. Ream wrote:

> On Tue, Apr 6, 2021 at 10:29 AM tbp1...@gmail.com <tbp1...@gmail.com> 
> wrote:
>
>>
>>
>> On Tuesday, April 6, 2021 at 10:14:19 AM UTC-4 Edward K. Ream wrote:
>>
>>> On Tue, Apr 6, 2021 at 7:15 AM tbp1...@gmail.com <tbp1...@gmail.com> 
>>> wrote:
>>>
>>> BTW, I have put a button into MyLeoSettings.leo that will open a file 
>>>> manager window (File Explorer on Windows) at the current directory of the 
>>>> selected node, whatever it is.  This has been awfully handy.  
>>>>
>>>
>>> Great idea.  However, I don't understand how '.' gets bound to the 
>>> directory of the selected node. Here is tested code for Windows that works 
>>> as I expect.
>>>
>>
>> I don't understand it either, but it works as I showed on both Linux and 
>> Windows.  Sure makes for simple code!  These commands have worked this way 
>> for a long time (years).  A great undocumented feature!
>>
>
> I strongly suspect that the code works by accident because loading a .leo 
> file effectively changes ".".  But outlines like LeoPyRef.leo contains 
> files in several directories. There is no way the OS can know how to relate 
> '.' to the various directories.
>
> In short, I would recommend my code ;-)
>
> 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/4f0d69a5-d151-402e-95ca-598a67d8b063n%40googlegroups.com.

Reply via email to