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: leojs alpha

2023-06-25 Thread Félix
Thanks Arjan!! 

Simple encouragements and feedback means a lot to me!

Félix 

On Sunday, June 25, 2023 at 9:03:39 AM UTC-4 Arjan wrote:

> > After coding for a few years
>
> Awesome perseverance. I've just continued using regular Leo because I'm 
> used to the workflow, but I hope to find some time to play with the newer 
> developments. Good luck!
>
> On Thursday, June 22, 2023 at 1:08:48 PM UTC+2 Edward K. Ream wrote:
>
>> > ...So anywhere from a week or two, or a month or two, hard to say, but 
>> it's going to be this summer! :D
>>
>> Assuming vs-code allows it, I encourage you to release an alpha version 
>> asap. There is nothing wrong with a list of known bugs.
>>
>> 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/586dcc19-8523-4da9-8fa9-e3643bfccb33n%40googlegroups.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.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread HaveF HaveF
>
> Probably a good place is leo-editor-contrib.
>
Interesting resources! Thanks, and have a nice day :D

-- 
--
Sincerely,

HaveF

-- 
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/CA%2BUQrQzkip%2Bh%2BfLQRH37SkJvfNvZE%3DNmNCJscsSNXVY1qLq9wQ%40mail.gmail.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.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread Thomas Passin

On Sunday, June 25, 2023 at 10:20:28 AM UTC-4 iamap...@gmail.com wrote:


c0, p0 = c, c.p
c2 = g.handleUnl(unl, c)
content = c2.p.b  # < here is the content of the UNL's body
c0.selectPosition(p)

Oops, typo!  The last line should read
 
c0.selectPosition(p0)

Hi, Thomas,
It works, thank you!


Great!  And if you want to do the same for a UNL in another outline, you 
can add these two lines (at least until that PR gets merged; I don't know 
about after that):

# Add this after the "content ="  line.
if c2 is not c0:
g.app.selectLeoWindow(c0)
 

It's a useful snippet, we should write it down. But where should we save 
it? Do you know the right place?
https://github.com/leo-editor/snippets seems like a good place, but it 
doesn't update for a long time.


It needs a check to handle the case c2 is None, which would happen if Leo 
can't find the UNL.

Probably a good place is leo-editor-contrib.  Though it can be hard to find 
things in there.  @Edward has been accepting pull requests there.
 

-- 
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/5540954e-c743-4580-b502-20c9b5e784ban%40googlegroups.com.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread HaveF HaveF
>
> c0, p0 = c, c.p
> c2 = g.handleUnl(unl, c)
> content = c2.p.b  # < here is the content of the UNL's body
> c0.selectPosition(p)
>
> Oops, typo!  The last line should read
>
> c0.selectPosition(p0)
>
Hi, Thomas,
It works, thank you!

It's a useful snippet, we should write it down. But where should we save
it? Do you know the right place?
https://github.com/leo-editor/snippets seems like a good place, but it
doesn't update for a long time.


-- 
--
Sincerely,

HaveF

-- 
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/CA%2BUQrQw%3Dkv1QB586k_wAEvSHFo7FBxMF7bJCQsh%3DNHSseCvfow%40mail.gmail.com.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread Thomas Passin
Markdown won't know what to do with a UNL, so you can't expect navigation 
to work in the rendered page.  Also, remember that if an outline's 
organization gets changed - i.e., you move a node - its UNL won't be 
correct any more.  So you only want to use UNLs like that when you have 
high confidence the outline will be stable.  (Few of my outlines are that 
stable).

On Sunday, June 25, 2023 at 9:10:30 AM UTC-4 iamap...@gmail.com wrote:

> Thanks Thomas, I'll try it later
>
> Another thought: is it a good idea to take UNL as a system level schema?
> I can record somewhere like markdown `[something](unl://xxx)` or even 
> pass parameter to that schema if the unl is a script...  
> `unl://x?para1=leo`
>
> On Sun, Jun 25, 2023 at 9:07 PM Thomas Passin  wrote:
>
>> On Sunday, June 25, 2023 at 9:05:20 AM UTC-4 Thomas Passin wrote:
>>
>> On Sunday, June 25, 2023 at 8:43:25 AM UTC-4 iamap...@gmail.com wrote:
>>
>> For now, my UNL points to a position of the current outline. Could we 
>> have a quick way to get it?
>>
>>
>> Assuming that these commands will continue to work after the PR:
>>
>> c0, p0 = c, c.p
>> c2 = g.handleUnl(unl, c)
>> content = c2.p.b  # < here is the content of the UNL's body
>> c0.selectPosition(p)
>>
>> Oops, typo!  The last line should read
>>  
>> c0.selectPosition(p0)
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "leo-editor" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/leo-editor/_TqPXKhD-rs/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> leo-editor+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/leo-editor/246ebac0-0439-4592-91bd-9f40bebd3e23n%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> --
> Sincerely,
>
> HaveF
>

-- 
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/6ef87696-16b6-493a-8bb2-42a3969eb358n%40googlegroups.com.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread HaveF HaveF
Thanks Thomas, I'll try it later

Another thought: is it a good idea to take UNL as a system level schema?
I can record somewhere like markdown `[something](unl://xxx)` or even
pass parameter to that schema if the unl is a script...
`unl://x?para1=leo`

On Sun, Jun 25, 2023 at 9:07 PM Thomas Passin  wrote:

> On Sunday, June 25, 2023 at 9:05:20 AM UTC-4 Thomas Passin wrote:
>
> On Sunday, June 25, 2023 at 8:43:25 AM UTC-4 iamap...@gmail.com wrote:
>
> For now, my UNL points to a position of the current outline. Could we have
> a quick way to get it?
>
>
> Assuming that these commands will continue to work after the PR:
>
> c0, p0 = c, c.p
> c2 = g.handleUnl(unl, c)
> content = c2.p.b  # < here is the content of the UNL's body
> c0.selectPosition(p)
>
> Oops, typo!  The last line should read
>
> c0.selectPosition(p0)
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "leo-editor" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/leo-editor/_TqPXKhD-rs/unsubscribe.
> To unsubscribe from this group and all its topics, 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/246ebac0-0439-4592-91bd-9f40bebd3e23n%40googlegroups.com
> 
> .
>


-- 
--
Sincerely,

HaveF

-- 
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/CA%2BUQrQwbGUtOxAC3VQCc0UZXki-%3DQw4Sr5qLE%3DyH_LFgORJ0_g%40mail.gmail.com.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread Thomas Passin
On Sunday, June 25, 2023 at 9:05:20 AM UTC-4 Thomas Passin wrote:

On Sunday, June 25, 2023 at 8:43:25 AM UTC-4 iamap...@gmail.com wrote:

For now, my UNL points to a position of the current outline. Could we have 
a quick way to get it?


Assuming that these commands will continue to work after the PR:

c0, p0 = c, c.p
c2 = g.handleUnl(unl, c)
content = c2.p.b  # < here is the content of the UNL's body
c0.selectPosition(p)

Oops, typo!  The last line should read
 
c0.selectPosition(p0)

-- 
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/246ebac0-0439-4592-91bd-9f40bebd3e23n%40googlegroups.com.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread Thomas Passin


On Sunday, June 25, 2023 at 8:43:25 AM UTC-4 iamap...@gmail.com wrote:

For now, my UNL points to a position of the current outline. Could we have 
a quick way to get it?


Assuming that these commands will continue to work after the PR:

c0, p0 = c, c.p
c2 = g.handleUnl(unl, c)
content = c2.p.b  # < here is the content of the UNL's body
c0.selectPosition(p)

-- 
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/6b861b9d-c1c1-4df7-a155-6685060dc4f7n%40googlegroups.com.


Re: leojs alpha

2023-06-25 Thread Arjan
> After coding for a few years

Awesome perseverance. I've just continued using regular Leo because I'm 
used to the workflow, but I hope to find some time to play with the newer 
developments. Good luck!

On Thursday, June 22, 2023 at 1:08:48 PM UTC+2 Edward K. Ream wrote:

> > ...So anywhere from a week or two, or a month or two, hard to say, but 
> it's going to be this summer! :D
>
> Assuming vs-code allows it, I encourage you to release an alpha version 
> asap. There is nothing wrong with a list of known bugs.
>
> 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/9ffd5361-d20f-4362-b249-023f50f21075n%40googlegroups.com.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread Thomas Passin
"Remove support for cross-file UNLs" -  WTF??? This will break some of my 
scripts.  How are we going to navigate to other outlines by UNL?  Wasn't 
that half of the point of having UNLs in the first place?

This looks like a situation where we should be adding a new API method, not 
changing how the old one works.

On Sunday, June 25, 2023 at 8:43:25 AM UTC-4 iamap...@gmail.com wrote:

>
>>
>> Do you mean you want a method or function to return the text of the body 
>> of the node addressed by the UNL? In general, the UNL could point to 
>> another outline.  Will you be looking only in the current outline, or any 
>> outline?  And if the latter, do you care if that other outline gets opened 
>> during execution of the function?
>>
> For now, my UNL points to a position of the current outline. Could we have 
> a quick way to get it?
>
>
> Looking forward to hearing  PR #3215 
> . it seems a huge PR
>
> --
> Sincerely,
>
> HaveF
>

-- 
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/8e9e0855-37c8-440f-90d4-6f56a97f3063n%40googlegroups.com.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread HaveF HaveF
>
>
>
> Do you mean you want a method or function to return the text of the body
> of the node addressed by the UNL? In general, the UNL could point to
> another outline.  Will you be looking only in the current outline, or any
> outline?  And if the latter, do you care if that other outline gets opened
> during execution of the function?
>
For now, my UNL points to a position of the current outline. Could we have
a quick way to get it?


Looking forward to hearing  PR #3215
. it seems a huge PR

--
Sincerely,

HaveF

-- 
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/CA%2BUQrQzZdyqXYsdVm2wfpM2RFK66urV%3DPToMrRXfU_PJDku2JA%40mail.gmail.com.


Re: Leo active file bug and how to get the content of unl

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

>
> On Sunday, June 25, 2023 at 7:59:09 AM UTC-4 iamap...@gmail.com wrote:
>
>
>
> Would you explain more fully what you mean by "access the content of..."?
> One way is to CTRL-click on the UNL's string in a body node.  This will
> navigate you to that location, opening the outline if necessary.  It should
> also be easy enough to write a new command that navigates to a UNL that is
> in the clipboard. It just depends on what you mean ...
>
> Hi, Thomas,
>
> Thanks for your reply.
> I want to get the content of UNL by script, like `p.b` to get the body
> content in the current node.
>
>
>

> Do you mean you want a method or function to return the text of the body
> of the node addressed by the UNL? In general, the UNL could point to
> another outline.
>

Not after PR #3215  :-)
I'll be discussing this PR soon.

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/CAMF8tS3M4VwEP5p_b%2BdRUXMJs%2B1k7ZfGV4fh2g3m4_Rsoae7HA%40mail.gmail.com.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread Thomas Passin

On Sunday, June 25, 2023 at 7:59:09 AM UTC-4 iamap...@gmail.com wrote:



Would you explain more fully what you mean by "access the content of..."?  
One way is to CTRL-click on the UNL's string in a body node.  This will 
navigate you to that location, opening the outline if necessary.  It should 
also be easy enough to write a new command that navigates to a UNL that is 
in the clipboard. It just depends on what you mean ...

Hi, Thomas, 

Thanks for your reply. 
I want to get the content of UNL by script, like `p.b` to get the body 
content in the current node.


Do you mean you want a method or function to return the text of the body of 
the node addressed by the UNL? In general, the UNL could point to another 
outline.  Will you be looking only in the current outline, or any outline?  
And if the latter, do you care if that other outline gets opened during 
execution of the function?

-- 
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/0a7c9339-3410-47a1-8485-8dfa3e8c456an%40googlegroups.com.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread HaveF HaveF
>
>
>
> Would you explain more fully what you mean by "access the content of..."?
> One way is to CTRL-click on the UNL's string in a body node.  This will
> navigate you to that location, opening the outline if necessary.  It should
> also be easy enough to write a new command that navigates to a UNL that is
> in the clipboard. It just depends on what you mean ...
>
> Hi, Thomas,

Thanks for your reply.
I want to get the content of UNL by script, like `p.b` to get the body
content in the current node.


-- 
--
Sincerely,

HaveF

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


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread Thomas Passin


On Sunday, June 25, 2023 at 3:27:38 AM UTC-4 iamap...@gmail.com wrote:

[snip]


2. Is there a simple method to access the content of a specific `unl://` 
node? I found `core/LeoPyRef.leo#Code-->Core classes-->@file 
leoGlobals.py-->g.Urls & UNLs`, but it doesn't seem to provide the right 
function for my needs. With the help of gpt, I can't get the answer. But it 
is interesting 
...maybe we 
need a `getAtNodeFromUNL` function XD


That ChatGPT transcript is entertaining.  It's like a student who has not 
digested its lesson but has to say something in class.  The existing method 
that's most likely to be useful is actually *g.handleUnl()*.  This will 
navigate to the given UNL, opening its outline if needed.

-- 
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/9bdb85b3-ce96-4aa0-81d7-b5e555119da1n%40googlegroups.com.


Re: Leo active file bug and how to get the content of unl

2023-06-25 Thread Thomas Passin
On Sunday, June 25, 2023 at 3:27:38 AM UTC-4 iamap...@gmail.com wrote:

[snip]
2. Is there a simple method to access the content of a specific `unl://` 
node? I found `core/LeoPyRef.leo#Code-->Core classes-->@file 
leoGlobals.py-->g.Urls & UNLs`, but it doesn't seem to provide the right 
function for my needs. With the help of gpt, I can't get the answer. But it 
is interesting 
...maybe we 
need a `getAtNodeFromUNL` function XD


Would you explain more fully what you mean by "access the content of..."?  
One way is to CTRL-click on the UNL's string in a body node.  This will 
navigate you to that location, opening the outline if necessary.  It should 
also be easy enough to write a new command that navigates to a UNL that is 
in the clipboard. It just depends on what you mean ...

-- 
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/8d9bf68f-173b-4d2b-9079-00d9a0ba704en%40googlegroups.com.


Leo active file bug and how to get the content of unl

2023-06-25 Thread HaveF HaveF
Hi, there,

I am delighted to see that the Leo editor is still under active 
development. The leojs has been a pleasant surprise as well.

After a hiatus of several years, I have returned to using the Leo editor. 
To this day, I have yet to find any software on the market that rivals the 
advanced philosophy embodied by Leo.

Initially, I thought I had forgotten how to use the Leo Editor. However, 
when I found myself in a rush, needing to switch between the Outline and 
main editor window, I instinctively pressed Ctrl-t. I was rather taken 
aback to realize that my muscle memory for Leo was still intact!

I sincerely hope that EKR is well.

I'm currently facing a few issues and hope that someone could provide me 
with some guidance:

1. In version 6.7.3, on MacOS 12, there appears to be an active file bug. I 
have recorded a video to better illustrate the issue. Unfortunately, even 
after updating Leo to version 6.7.4-devel, the bug persists. 
https://www.youtube.com/watch?v=R5L3UShZLsk
2. Is there a simple method to access the content of a specific `unl://` 
node? I found `core/LeoPyRef.leo#Code-->Core classes-->@file 
leoGlobals.py-->g.Urls & UNLs`, but it doesn't seem to provide the right 
function for my needs. With the help of gpt, I can't get the answer. But it 
is interesting 
...maybe we 
need a `getAtNodeFromUNL` function XD

On another note, I've found that pipx  is 
more user-friendly than pip. After installing pipx, I can easily use the 
command `pipx install leo`. If I need to add something to the Leo 
environment, I can simply use `pipx inject leo xxx`.

I strongly recommend incorporating pipx into the documentation as an 
alternative to pip.

Best,
HaveF

-- 
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/8628c79f-728a-4e7d-9a1d-cdf1488dc14dn%40googlegroups.com.