PR3215 UNL Not Found By CTRL-Click

49 views
Skip to first unread message

Thomas Passin

unread,
Jun 30, 2023, 2:25:25 PM6/30/23
to leo-editor
Testing the PR3215 branch, I stumbled onto this path-based UNL that Leo cannot find using a CTRL-click in a different outline.  I copied this UNL right from the status bar:

unl://C:/Tom/git/leo-editor/leo/core/LeoPyRef.leo#Code-->Gui base classes-->@file leoFind.py-->class LeoFind (LeoFind.py)-->LeoFind.Commands (immediate execution)-->find.find-def, do_find_def & helpers--><< compute the search table >>

The UNL is properly highlighted in the body it was pasted into.  I had enabled the setting @string unl-status-kind = legacy.

I wonder if it has to do with the comma embedded in the UNL.

Edward K. Ream

unread,
Jun 30, 2023, 2:43:31 PM6/30/23
to leo-e...@googlegroups.com
On Fri, Jun 30, 2023 at 1:25 PM Thomas Passin <tbp1...@gmail.com> wrote:
Testing the PR3215 branch, I stumbled onto this path-based UNL that Leo cannot find using a CTRL-click in a different outline.  I copied this UNL right from the status bar:

Thanks for your testing!

I may have found and fixed this bug a few minutes ago.

As of rev c6dc267, the test cases in test.leo now work for me.

Did this rev fix your problem?

Edward

Thomas Passin

unread,
Jun 30, 2023, 5:19:31 PM6/30/23
to leo-editor
It did fix it. 

But two more problems:

1. After merging the new rev and re-launching Leo, the previously-open outlines were not opened, except for the workbook;
2. I got this (minor) message: not found: C:/Tom/git/leo-editor/leo/scripts/set-repo-dir.cmd

Edward K. Ream

unread,
Jun 30, 2023, 6:49:10 PM6/30/23
to leo-e...@googlegroups.com
On Fri, Jun 30, 2023 at 4:19 PM Thomas Passin <tbp1...@gmail.com> wrote:
It did fix it. 

But two more problems:

1. After merging the new rev and re-launching Leo, the previously-open outlines were not opened, except for the workbook;
2. I got this (minor) message: not found: C:/Tom/git/leo-editor/leo/scripts/set-repo-dir.cmd

I'm seeing something similar, repeatedly.  I'm on it.

Edward

Edward K. Ream

unread,
Jun 30, 2023, 7:53:17 PM6/30/23
to leo-e...@googlegroups.com
1. After merging the new rev and re-launching Leo, the previously-open outlines were not opened, except for the workbook;
2. I got this (minor) message: not found: C:/Tom/git/leo-editor/leo/scripts/set-repo-dir.cmd

I'm seeing something similar, repeatedly.  I'm on it.

Rev 18839a6f0 fixes multiple problems, adds important comments and improves a docstring.

All my tests pass.  What about you?

Edward

Thomas Passin

unread,
Jun 30, 2023, 10:08:38 PM6/30/23
to leo-editor
All right, after merging the latest rev, the outlines open correctly on restart, and there is no message about the missing set-rep-dir.cmd file.  I went back and checked that problematic UNL and it still is handled correctly.

Just one thing ... when a CTRL-Click on a UNL navigates to its target, the focused node in the tree, which is the correct one, is not always visible in the window.  In my test, I had to scroll the tree to find it.

Edward K. Ream

unread,
Jul 1, 2023, 4:20:12 AM7/1/23
to leo-e...@googlegroups.com
On Fri, Jun 30, 2023 at 9:08 PM Thomas Passin <tbp1...@gmail.com> wrote:

All right, after merging the latest rev, the outlines open correctly on restart, and there is no message about the missing set-rep-dir.cmd file.  I went back and checked that problematic UNL and it still is handled correctly.

Thanks for the confirmation.

Just one thing ... when a CTRL-Click on a UNL navigates to its target, the focused node in the tree, which is the correct one, is not always visible in the window.  In my test, I had to scroll the tree to find it.

I'll attempt a fix.

Edward

Edward K. Ream

unread,
Jul 1, 2023, 5:22:42 AM7/1/23
to leo-e...@googlegroups.com
On Fri, Jun 30, 2023 at 9:08 PM Thomas Passin <tbp1...@gmail.com> wrote:

Just one thing ... when a CTRL-Click on a UNL navigates to its target, the focused node in the tree, which is the correct one, is not always visible in the window.  In my test, I had to scroll the tree to find it.

I've spent about an hour looking into this.

c.redraw(p) calls LeoQtTree.full_redraw(p), which ensures that p is visible via a call to QTreeWidget.setCurrentItem.

I have no idea why this doesn't work for ctrl-clicks.

Any change to full_redraw would require careful testing, so this would have to be a separate issue and PR.

Edward

Thomas Passin

unread,
Jul 1, 2023, 7:59:43 AM7/1/23
to leo-editor
All right, let's put it on the back burner for after the next release.  I'll create a reminder issue for it.

Edward K. Ream

unread,
Jul 1, 2023, 12:54:35 PM7/1/23
to leo-e...@googlegroups.com
On Sat, Jul 1, 2023 at 6:59 AM Thomas Passin <tbp1...@gmail.com> wrote:
All right, let's put it on the back burner for after the next release.  I'll create a reminder issue for it.

Thanks, Thomas.

Edward
Reply all
Reply to author
Forward
0 new messages