Re: About PR #3215: unbreakable unls!

2023-06-27 Thread Edward K. Ream
On Mon, Jun 26, 2023 at 10:44 PM Thomas Passin  wrote:

In the zettelkasten app, using the new p.get_legacy_UNL() doesn't work
> right.  I *think* it's because I had to change the ">" to "%3E" to get QT
> to pass it to my code when I click on these links (these paths appear in an
> anchor element).  So there must be another of the changed methods that
> doesn't quite play right with this.  I'll try to track it down tomorrow.
>

Thanks for this.  It's an important clue.

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/CAMF8tS3fbFPxjO6cA3fdqkswpm3C%3DtwGJt66a86Vo8pa%3DnY3CQ%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Thomas Passin

On Monday, June 26, 2023 at 2:26:36 PM UTC-4 Edward K. Ream wrote:

On Mon, Jun 26, 2023 at 12:50 PM Thomas Passin  wrote:

2. Both the bookmark manager and the zettelkasten apps partially work but 
not completely.   I will look at using these new "legacy"  methods next.


Let me know if I can help.


In the zettelkasten app, using the new p.get_legacy_UNL() doesn't work 
right.  I *think* it's because I had to change the ">" to "%3E" to get QT 
to pass it to my code when I click on these links (these paths appear in an 
anchor element).  So there must be another of the changed methods that 
doesn't quite play right with this.  I'll try to track it down tomorrow.

-- 
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/d3cd4b84-6f3a-4293-aaa3-b7aa8a036f9bn%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Edward K. Ream
On Monday, June 26, 2023 at 1:50:28 PM UTC-5 tbp1...@gmail.com wrote:

> Furthermore, having the path visible in the status bar could be really 
useful.

Let's not argue about preferences. I've just added this checklist item to 
the PR:

Add a setting that determines whether the status area will show legacy or 
new unls. 

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/b1fa9b07-8136-4b76-87fd-96badd509a52n%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Edward K. Ream
On Mon, Jun 26, 2023 at 2:01 PM Thomas Passin  wrote:

Something close to seven plugins use unls, including mod-http and
> quickMove.  They should all be checked to see if they will still work.


Good idea. I've added this item to the PRs list.

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/CAMF8tS3Xb0OuoL8fX4KB-%2B0eq4cExLVuvNWR0MBvjJ_X1CCVjg%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Edward K. Ream
On Mon, Jun 26, 2023 at 1:50 PM Thomas Passin  wrote:

Yes, since the UNL contained the path to the outline, Leo could open a
> non-open outline and navigate to the right node.  I always thought that was
> a wonderful, even almost miraculous, capability.  We shouldn't lose it.
>

I've just added this (experimental!) item to the PR's checklist.

Furthermore, having the path visible in the status bar could be really
> useful
>

But it hasn't been useful.  Alt-N (goto-next-clone) and cff are easy,
existing, ways of navigating.

In contrast, show-clone-ancestors and show-clone-parents are well worth
removing.

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/CAMF8tS1C9zw4FXOGWuWjziTK9KXDr7Eq9a8cvnzq9LuLwmwwNQ%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Thomas Passin
Something close to seven plugins use unls, including mod-http and 
quickMove.  They should all be checked to see if they will still work (I 
don't know which of them still work apart from unl changes).

-- 
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/37232343-8c39-4832-b21f-e904d85c6d45n%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Thomas Passin

On Monday, June 26, 2023 at 2:26:36 PM UTC-4 Edward K. Ream wrote:

On Mon, Jun 26, 2023 at 12:50 PM Thomas Passin  wrote:

g.findGNX searches all *open* windows.

The legacy version of g.handleUnl contained Leo-specific code which I 
deleted. Afterwards, the code called g.openWithFileName to open a window, 
then searched in the window.


Yes, since the UNL contained the path to the outline, Leo could open a 
non-open outline and navigate to the right node.  I always thought that was 
a wonderful, even almost miraculous, capability.  We shouldn't lose it.  
Furthermore, having the path visible in the status bar could be really 
useful  For example, a search might return several hits for a def.  You 
navigate to one or another of them.  But wait! It might be in a plugin 
instead of the core.  You can't tell by looking at the tree because too 
many nodes are open and you can't see what file or class you are in.  But a 
glance at the (legacy) unl in the status line would tell you.  The new way 
loses that capability.  To me, that's a real loss.

-- 
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/2f74db95-1cd5-4f19-867e-9541b71731a3n%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Edward K. Ream
On Mon, Jun 26, 2023 at 12:50 PM Thomas Passin  wrote:

1. CTRL-clicking on an old-style unl pointing into the same outline
> navigates to the right node; for a unl pointing into a different outline it
> does not navigate to the right place or even the right outline.
>

Thanks for testing.  We'll make everything right.

g.findGNX searches all *open* windows.

The legacy version of g.handleUnl contained Leo-specific code which I
deleted. Afterwards, the code called g.openWithFileName to open a window,
then searched in the window.

One path was g.app.homeDir, so maybe part of the code should be reinstated.
I'll investigate.

2. Both the bookmark manager and the zettelkasten apps partially work but
> not completely.   I will look at using these new "legacy"  methods next.
>

Let me know if I can help.

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/CAMF8tS2pDRAk5Gp7KOZVzNTVbTtE2iKJBZ%3DtOXUavfEzR5TmEA%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Thomas Passin
After checking out the branch for this PR:

1. CTRL-clicking on an old-style unl pointing into the same outline 
navigates to the right node; for a unl pointing into a different outline it 
does not navigate to the right place or even the right outline.

2. Both the bookmark manager and the zettelkasten apps partially work but 
not completely.   I will look at using these new "legacy"  methods next.

On Monday, June 26, 2023 at 1:21:07 PM UTC-4 Edward K. Ream wrote:

> On Monday, June 26, 2023 at 10:02:40 AM UTC-5 Edward K. Ream wrote:
>
> > I'll add p.get_legacy_UNL and p.get_short_legacy_UNL.
> > I'll add expanded searching to g.findUNL, just as in g.findGNX.
>
> Both done.
>
> *Notes*
>
> 1. *Warning*: Plugins that call g.findUNL directly must *not *assume that 
> the returned position is in the same outline! Do something like this:
>
> p = g.findUNL(unlList, c)
> # Do not assume that p is in c.
> if p:
> c2 = p.v.context
> c2.redraw(p)
>
> 2. g.handleUnl contains code similar to that shown above, so the warning 
> applies only to writers of plugins.
>
> 3. g.findUNL no longer does *any* gui-related operations. It was never a 
> clever idea.
>
> 4. No, I won't add a kwarg to g.findUNL that suppress other-outline 
> searches.
>
> EKR
>

-- 
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/ff781c0d-dfd4-4791-ae25-68bb088e41ffn%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Edward K. Ream
On Monday, June 26, 2023 at 10:02:40 AM UTC-5 Edward K. Ream wrote:

> I'll add p.get_legacy_UNL and p.get_short_legacy_UNL.
> I'll add expanded searching to g.findUNL, just as in g.findGNX.

Both done.

*Notes*

1. *Warning*: Plugins that call g.findUNL directly must *not *assume that 
the returned position is in the same outline! Do something like this:

p = g.findUNL(unlList, c)
# Do not assume that p is in c.
if p:
c2 = p.v.context
c2.redraw(p)

2. g.handleUnl contains code similar to that shown above, so the warning 
applies only to writers of plugins.

3. g.findUNL no longer does *any* gui-related operations. It was never a 
clever idea.

4. No, I won't add a kwarg to g.findUNL that suppress other-outline 
searches.

EKR

-- 
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/3e3003c0-4992-41bf-9bc2-d9acedd1aeafn%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Edward K. Ream
On Mon, Jun 26, 2023 at 9:21 AM Thomas Passin  wrote:

The bookmark manager needs to 1) flatten the paths of nested nodes (to
> provide labels like "software/python/frameworks")  and 2) make each step of
> those flattened labels clickable so that a user can navigate to their
> node.  Gnxs can't provide that capability, whether or not they are called
> "new style unls".  Pre-change unls, OTOH, are ideal and require almost no
> tinkering with to achieve those requirements.  If Leo won't support those
> capabilities, the the bookmarks manager needs to compute the equivalent,
> and the obsoleted Leo methods already do that.  So it's easier for me to
> use them than to re-create their capability from scratch.
>
> The zettelkasten machinery runs on gnxs and should be less affected if at
> all.  But I have a host of nodes that include unl links to other outlines,
> and none of those links would work any more.  Some supporting commands do
> things like getting the unl of a node and copying it to the clipboard.
> Maybe those would still work, maybe they wouldn't.  I'll have to see.
>

Thanks for the clarification. All your existing unls should now work.
Please test the branch and report any problems.

*About the name, p.get_UNL*

The more I think about this question, the more tricky it becomes.

The PR previously did use the scheme you proposed. But I want p.get_UNL to
change so that legacy code will use the *new *unls.

In other words, the underlying issue is about compatibility, not names.

*New methods*
I'll create two new methods for use by plugins such as yours:

*p.get_legacy_UNL* will return what g.get_UNL used to return.

*p.get_short_legacy_UNL* will return a headline-oriented unl, omitting the
file name component (everything up to and including the '#').

*Note: *g.findUNL never did anything useful with the file name!

*Better searching*

The new g.findGNX searches all open outlines for nodes with the given gnx. *
g.findUNL can use the same scheme!*

*Summary*

p.get_UNL should return gnx-oriented unls so that existing code will
automatically use non-breakable gnxs.

I'll add p.get_legacy_UNL and p.get_short_legacy_UNL.

I'll add expanded searching to g.findUNL, just as in g.findGNX.

Please test your plugins. I'll fix any compatibility problems before
merging the PR.

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/CAMF8tS1M7W3J%3DK%3DkPRaBRnmJRUCy_ErLk4CHkLUpDAcVsgNFZQ%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Thomas Passin

On Monday, June 26, 2023 at 7:34:57 AM UTC-4 Edward K. Ream wrote:

On Sun, Jun 25, 2023 at 10:44 PM Thomas Passin  wrote:

Actually, bookmarks and zettelkasten should work *better* than before, 
provided:

- they use the *new* p.get_UNL() and
- they work with both legacy and new unls, which they should if they use 
the new g.handleUnl().

The bookmark manager needs to 1) flatten the paths of nested nodes (to 
provide labels like "software/python/frameworks")  and 2) make each step of 
those flattened labels clickable so that a user can navigate to their 
node.  Gnxs can't provide that capability, whether or not they are called 
"new style unls".  Pre-change unls, OTOH, are ideal and require almost no 
tinkering with to achieve those requirements.  If Leo won't support those 
capabilities, the the bookmarks manager needs to compute the equivalent, 
and the obsoleted Leo methods already do that.  So it's easier for me to 
use them than to re-create their capability from scratch.

The zettelkasten machinery runs on gnxs and should be less affected if at 
all.  But I have a host of nodes that include unl links to other outlines, 
and none of those links would work any more.  Some supporting commands do 
things like getting the unl of a node and copying it to the clipboard.  
Maybe those would still work, maybe they wouldn't.  I'll have to see.

-- 
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/95a8db1d-fe54-411d-a73f-192e0ef35a5an%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Edward K. Ream
On Monday, June 26, 2023 at 6:34:57 AM UTC-5 Edward K. Ream wrote:

> I'm going to restore g.findUNL() and hook it back into g.handleUnl().

Done, and fairly cleanly too in g.handleUnl().

Please test the ekr-3181-mypy-links branch and report any problems.

test.leo now contains working clickable unls (in the body pane) in a 
variety of formats.  Please let me know if there are other formats that 
should be tested.

Edward

P.S. The old/unchanged g.findUNL ignores file names and finds (legacy) unls 
only in the present outline. I plan to extend the search to all open 
outlines, as in g.findGNX.

EKR

-- 
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/579d5788-ca21-4b78-a40a-3479f246ae25n%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Edward K. Ream
On Sun, Jun 25, 2023 at 10:44 PM Thomas Passin  wrote:

> However, I feel strongly that p.get_GNX() should return the position's
actual gnx string, which is what the name says it does.

p.gnx is p's gnx. That hasn't changed. p.get_GNX() is something completely
different.

The name is not as important as how Leo's code (including plugins) use the
method.

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/CAMF8tS2eMtCcA3WFyLEmqf7fZDBFrM82N%2Bid7%2BUrxg7RbbqARw%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Edward K. Ream
On Sun, Jun 25, 2023 at 10:44 PM Thomas Passin  wrote:

>
> I have just completed taking the currently-existing unl handling functions
> p.get_UNL(), g.findUNL(), and g.handleUnl() from the core - the ones
> scheduled to go to the attic or be changed - and turned them into
> stand-alone functions in my bookmarks manager.
>

I hope you won't have to do this. I'm going to restore g.findUNL() and hook
it back into g.handleUnl().

Restoring the old code and the legacy operation should be complete sometime
today. At that point your bookmarks and zettelkasten should work as before
in the  ekr-3181-mypy-links branch. Let me know if they don't.

Actually, bookmarks and zettelkasten should work *better* than before,
provided:

- they use the *new* p.get_UNL() and
- they work with both legacy and new unls, which they should if they use
the new g.handleUnl().

Edward

P.S. Restoring g.findUNL() will also improve the convert-unls command.

EKR

-- 
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/CAMF8tS389TEyZ5dF3vu5tX%2BYktGk_wW5fSh4g7Z%3D9ipfq7jv-Q%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-25 Thread Thomas Passin
On Sunday, June 25, 2023 at 10:36:32 PM UTC-4 Edward K. Ream wrote:

On Sun, Jun 25, 2023 at 4:48 PM Thomas Passin  wrote:

So now my bookmarks manager will not work, something I use every day and 
depend on.  I suppose I will have to pull out code from the attic and put 
it into my own module.  Or recreate the pathlike part of the functionality, 
anyway.


Don't panic. I'll work with you on this.


I have just completed taking the currently-existing unl handling functions 
p.get_UNL(), g.findUNL(), and g.handleUnl() from the core - the ones 
scheduled to go to the attic or be changed - and turned them into 
stand-alone functions in my bookmarks manager. I pass p and g as function 
arguments instead of using instance method calls.  That turned out to be 
easy since I used them in only a few places, and in a well-defined way that 
was easy to adapt.  The revised code is working.  So that's a relief.

Next I need to see if I can do the same for the zettelkasten code.

However, I feel strongly that p.get_GNX() should return the position's 
actual gnx string, which is what the name says it does..  There should be 
another method, say p.get_unl_gnx() to return that new unl:gnx: string.  
Let's have these method names reflect what they actually do! I assume that 
p.v.gnx will still be the actual gnx string, is that right?

-- 
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/a3b14cee-e64e-4017-ac6d-aa7e8d0211ddn%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-25 Thread Edward K. Ream
On Sun, Jun 25, 2023 at 4:48 PM Thomas Passin  wrote:

I'm unclear as to whether the gnx string for a given node - that is, p.gnx
> - will now be in a different format.


p.gnx can never ever change.  But p.get_GNX() now returns
f"unl:gnx:{self.gnx}".

Yes, this is confusing, but it shouldn't cause great consternation.  If it
does, I'll fix it.

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/CAMF8tS1SJj_%2B7thVfxzjc15T%2BWHg6g%3DNMdTVDX8Ca0ieCBdLVw%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-25 Thread Edward K. Ream
On Sun, Jun 25, 2023 at 4:48 PM Thomas Passin  wrote:

> So now my bookmarks manager will not work, something I use every day and
> depend on.  I suppose I will have to pull out code from the attic and put
> it into my own module.  Or recreate the pathlike part of the functionality,
> anyway.


Don't panic. I'll work with you on this.

I've just finished the convert-unls command. Retro-fitting the bookmarks
and backlinks plugins is next.

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/CAMF8tS3o%2BRe7xdR78vDnKApbe8qJ6VbE1Ztstj-LZDWTAO8jYw%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-25 Thread Thomas Passin
So now my bookmarks manager will not work, something I use every day and 
depend on.  I suppose I will have to pull out code from the attic and put 
it into my own module.  Or recreate the pathlike part of the functionality, 
anyway.

I'm unclear as to whether the gnx string for a given node - that is, p.gnx 
- will now be in a different format. If that has been changed, it will 
break the zettelkasten code too, and destroy all the zettel and 
geneological data I have collected and organized.

"Few scripts are likely to use the existing url/unl methods. It is 
impossible to provide complete compatibility."  It can be done by using new 
names for the new methods, etc., and leaving the old ones in place.  When 
Microsoft bit the bullet and started to support Unicode strings, they 
didn't change the old string methods, they added the "Wide" series of 
strings and string functions.
On Sunday, June 25, 2023 at 3:31:41 PM UTC-4 Edward K. Ream wrote:

> On Sun, Jun 25, 2023 at 1:44 PM Robert-Felix  wrote:
>
>> Thanks for this simplification! supporting Leo's unl links is on my todo 
>> list for leojs (and leointeg!)
>>
>
> You're welcome. I'm glad you like the new scheme. I think you'll like the 
> simpler 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/4a288bbe-1667-4314-9414-3bd8330d625en%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-25 Thread Edward K. Ream
On Sun, Jun 25, 2023 at 1:44 PM Robert-Felix  wrote:

> Thanks for this simplification! supporting Leo's unl links is on my todo
> list for leojs (and leointeg!)
>

You're welcome. I'm glad you like the new scheme. I think you'll like the
simpler 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/CAMF8tS0pWEvTDEmhhoJ-jnWSCnp7jsnDRNivfu34a3waO3PM2g%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-25 Thread Edward K. Ream
On Sun, Jun 25, 2023 at 11:49 AM Thomas Passin  wrote:

> I would rather have created a new gnx:// type and left existing unls
alone.

I understand your desire for compatibility, but the old url/gnx code was
unbearably complicated.

I have spent the last week wrestling with the issues. I don't think any
better way forward is possible.
> Will existing UNL syntax and methods still  work?

*Syntax*: The old syntax  #"> will *not *work.

The PR contains an item: Write a script to convert from old gnx form to
new.  I'll complete and test that script before merging the PR.

*Methods*: the answer is too complicated to discuss in detail:

- Some methods remain unchanged. Others have changed significantly.
- g.findUNL is now in the attic. I see no reason to retain it.
- Few scripts are likely to use the existing url/unl methods. It is
impossible to provide complete compatibility.

*Summary*

A script will convert from old (breakable) unls to new unls.

We all should test the PR for several weeks once it becomes part of devel.

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/CAMF8tS0U7xMHAVs%2B9eH5Ntad%3DFk_uQAy93b3U%2BLMhvx9k%3DaWFw%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-25 Thread Robert-Felix
Thanks for this simplification! supporting Leo's unl links is on my todo
list for leojs (and leointeg!)

Félix

On Sun, Jun 25, 2023 at 2:38 PM jkn  wrote:

> Yes, I was a bit surprised this wasn't your approach as well. Looking
> forward to the results regardless...
>
>
> On Sunday, June 25, 2023 at 5:49:36 PM UTC+1 tbp1...@gmail.com wrote:
>
>> I would rather have created a new gnx:// type and left existing unls
>> alone.  Will existing UNL syntax and methods still  work?
>>
>> On Sunday, June 25, 2023 at 12:00:26 PM UTC-4 Edward K. Ream wrote:
>>
>>> PR #3215  changes
>>> many files in complex ways. See detailed comments in the first comment of
>>> the PR.
>>>
>>> This PR started as a fix for a minor bug
>>> , but work
>>> expanded in unexpected directions.
>>>
>>> *New, unbreakable, unls*
>>>
>>> The status line now reports unls of the form: unl:gnx:.
>>>
>>> After copying this string to any body text:
>>> - Leo's syntax coloring code will show this as any other url.
>>> - Control-clicking this url will take you to the first position of the
>>> outline having the given .
>>>
>>> These unls won't break unless you delete the original node (including
>>> all its clones)!
>>>
>>> *Summary*
>>>
>>> This PR is a milestone in Leo's history. How did we ever live without
>>> unbreakable unl links?
>>>
>>> Internally, Leo now uses *only* these new unls. The old unls are gone.
>>> This PR should simplify leoJS.
>>>
>>> I'll merge this PR into devel in a day or three. I won't wait for a code
>>> review. The code involved is too tricky to understand in an hour or five.
>>>
>>> I'll take full responsibility for any problems that may arise. We aren't
>>> going back.
>>>
>>> All comments are welcome. There is plenty of time for tweaks.
>>>
>>> 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/bfd2fee7-7792-45b8-8964-ff18881d4ac9n%40googlegroups.com
> 
> .
>

-- 
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/CAC%3DZVRJg%3Dd4U6obQkyBOd%3DhdhKWCF%3DtvmEFjn%2Bk2yMeuMBqL_A%40mail.gmail.com.


Re: About PR #3215: unbreakable unls!

2023-06-25 Thread jkn
Yes, I was a bit surprised this wasn't your approach as well. Looking 
forward to the results regardless...


On Sunday, June 25, 2023 at 5:49:36 PM UTC+1 tbp1...@gmail.com wrote:

> I would rather have created a new gnx:// type and left existing unls 
> alone.  Will existing UNL syntax and methods still  work?
>
> On Sunday, June 25, 2023 at 12:00:26 PM UTC-4 Edward K. Ream wrote:
>
>> PR #3215  changes 
>> many files in complex ways. See detailed comments in the first comment of 
>> the PR.
>>
>> This PR started as a fix for a minor bug 
>> , but work 
>> expanded in unexpected directions.
>>
>> *New, unbreakable, unls*
>>
>> The status line now reports unls of the form: unl:gnx:.
>>
>> After copying this string to any body text:
>> - Leo's syntax coloring code will show this as any other url.
>> - Control-clicking this url will take you to the first position of the 
>> outline having the given .
>>
>> These unls won't break unless you delete the original node (including all 
>> its clones)!
>>
>> *Summary*
>>
>> This PR is a milestone in Leo's history. How did we ever live without 
>> unbreakable unl links?
>>
>> Internally, Leo now uses *only* these new unls. The old unls are gone. 
>> This PR should simplify leoJS.
>>
>> I'll merge this PR into devel in a day or three. I won't wait for a code 
>> review. The code involved is too tricky to understand in an hour or five.
>>
>> I'll take full responsibility for any problems that may arise. We aren't 
>> going back.
>>
>> All comments are welcome. There is plenty of time for tweaks.
>>
>> 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/bfd2fee7-7792-45b8-8964-ff18881d4ac9n%40googlegroups.com.


Re: About PR #3215: unbreakable unls!

2023-06-25 Thread Thomas Passin
I would rather have created a new gnx:// type and left existing unls 
alone.  Will existing UNL syntax and methods still  work?

On Sunday, June 25, 2023 at 12:00:26 PM UTC-4 Edward K. Ream wrote:

> PR #3215  changes 
> many files in complex ways. See detailed comments in the first comment of 
> the PR.
>
> This PR started as a fix for a minor bug 
> , but work expanded 
> in unexpected directions.
>
> *New, unbreakable, unls*
>
> The status line now reports unls of the form: unl:gnx:.
>
> After copying this string to any body text:
> - Leo's syntax coloring code will show this as any other url.
> - Control-clicking this url will take you to the first position of the 
> outline having the given .
>
> These unls won't break unless you delete the original node (including all 
> its clones)!
>
> *Summary*
>
> This PR is a milestone in Leo's history. How did we ever live without 
> unbreakable unl links?
>
> Internally, Leo now uses *only* these new unls. The old unls are gone. 
> This PR should simplify leoJS.
>
> I'll merge this PR into devel in a day or three. I won't wait for a code 
> review. The code involved is too tricky to understand in an hour or five.
>
> I'll take full responsibility for any problems that may arise. We aren't 
> going back.
>
> All comments are welcome. There is plenty of time for tweaks.
>
> 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/47b653be-4cf7-4a2c-8bc3-f7f2076f14f3n%40googlegroups.com.


About PR #3215: unbreakable unls!

2023-06-25 Thread Edward K. Ream
PR #3215  changes many 
files in complex ways. See detailed comments in the first comment of the PR.

This PR started as a fix for a minor bug 
, but work expanded 
in unexpected directions.

*New, unbreakable, unls*

The status line now reports unls of the form: unl:gnx:.

After copying this string to any body text:
- Leo's syntax coloring code will show this as any other url.
- Control-clicking this url will take you to the first position of the 
outline having the given .

These unls won't break unless you delete the original node (including all 
its clones)!

*Summary*

This PR is a milestone in Leo's history. How did we ever live without 
unbreakable unl links?

Internally, Leo now uses *only* these new unls. The old unls are gone. This 
PR should simplify leoJS.

I'll merge this PR into devel in a day or three. I won't wait for a code 
review. The code involved is too tricky to understand in an hour or five.

I'll take full responsibility for any problems that may arise. We aren't 
going back.

All comments are welcome. There is plenty of time for tweaks.

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/9ffafd59-1c1f-4cc4-8f18-7c4021e21f9dn%40googlegroups.com.