The big PR did remove some gui-related code

32 views
Skip to first unread message

Edward K. Ream

unread,
Jul 7, 2023, 8:14:56 PM7/7/23
to leo-editor
There was some discussion (I don't remember where) about a weird edge case: changing a clickable link and then undoing the change without saving the file caused Leo not to find the clickable link.

I dismissed this nit as likely unrelated to the big PR. However, I now see that the full_match helper function (internal to g.findUNL) did contain gui code. Imo removing that code was correct, but there is a chance that doing so created problems.

Summary

This post sets the record straight, but I have no intention of restoring the old code.

Edward

jkn

unread,
Jul 8, 2023, 2:07:29 AM7/8/23
to leo-editor
I mentioned it, in the thread "Ctrl-Click on gnx fails if the node is dirty?"

Edward K. Ream

unread,
Jul 8, 2023, 6:11:30 AM7/8/23
to leo-e...@googlegroups.com
On Sat, Jul 8, 2023 at 1:07 AM jkn <jkn...@nicorp.f9.co.uk> wrote:
I mentioned it, in the thread "Ctrl-Click on gnx fails if the node is dirty?"

Thanks for the reminder :-) I've just followed the recipe you gave in that thread. Everything works.

And even if everything didn't work, putting gui code in full_match is wrong :-)

Edward

Edward K. Ream

unread,
Jul 8, 2023, 9:10:10 AM7/8/23
to leo-editor
On Friday, July 7, 2023 at 7:14:56 PM UTC-5 Edward K. Ream wrote:

I now see that the full_match helper function (internal to g.findUNL) did contain gui code. Imo removing that code was correct, but there is a chance that doing so created problems.

FYI:  both the convert_unl_list and the full_match helpers will go away when g.findUNL no longer supports old-style unl lists. It's not clear whether any code or plugins now use such lists.

Removing support for old-style unl lists is scheduled for Leo 6.7.5. It's way too late for such a change now.

Edward

Edward K. Ream

unread,
Jul 8, 2023, 5:26:12 PM7/8/23
to leo-editor
On Saturday, July 8, 2023 at 8:10:10 AM UTC-5 Edward K. Ream wrote:

On Friday, July 7, 2023 at 7:14:56 PM UTC-5 Edward K. Ream wrote:

I now see that the full_match helper function (internal to g.findUNL) did contain gui code. Imo removing that code was correct, but there is a chance that doing so created problems.

FYI:  both the convert_unl_list and the full_match helpers will go away when g.findUNL no longer supports old-style unl lists.

Oops. The full_match helper function resolves legacy unls. It must remain :-)

Edward
Reply all
Reply to author
Forward
0 new messages