This work is timely from my point of view, since the project I am working on will be using them. In the original code, I have observed that g.handleUnl() didn't work right when there are index numbers in the UNL. Since there will now be no option for omitting them in p.get_UNL(), then g.handleUnl() will need to be robust against their presence or absence.
Also, those index numbers are likely to change because of normal editing even when the target node has not been moved. So g.handleUnl() should at least find the right node anyway.
[Aside] I don 't think that handleUnl is a good name here. It doesn't say what will happen: "handling" could mean anything. I'd like to see it deprecated in favor of a new method, say gotoUnl.
On Sunday, February 13, 2022 at 9:25:29 AM UTC-6 tbp1...@gmail.com wrote:g.handleUnl does not need to change. g.handleUnl knows nothing about index numbers, and never has.
Also, those index numbers are likely to change because of normal editing even when the target node has not been moved. So g.handleUnl() should at least find the right node anyway.
[Aside] I don 't think that handleUnl is a good name here. It doesn't say what will happen: "handling" could mean anything. I'd like to see it deprecated in favor of a new method, say gotoUnl.
A agree the name isn't great, but imo the name is not important enough to change.
With the latest version of devel - 70d0da6013 - c.p.get_UNL() produces a UNL with no line index (not saying that's wrong).
CNTL-click on that UNL pasted into a test node usually does not go to the right node in the target outline (with or without replacing spaces by "%20", and with or without replacing ">" by "%3E").
CNTL-click on that UNL pasted into a test node usually does not go to the right node in the target outline (with or without replacing spaces by "%20", and with or without replacing ">" by "%3E").
That's a bug. I have just created #2314 for this. Should be easy to fix.w
Leo 6.6b2-devel, ekr-unl3 branch, build 191fd7560d
2022-02-14 07:26:41 -0600
Python 3.9.9, PyQt version 5.15.2
Windows 10 AMD64 (build 10.0.19043)
CTRL-clicking succeeded on the UNLs that previously failed. This includes one whose terminal step included a section name (<< ... >>). The tests included both relative (within-outline) and absolute (between outline) UNLs. When the UNL included a trailing index, the cursor was placed on correct line in the target. Replacing spaces with "%20" or ">" with "%3E" did not change the behavior.