Re: Expect Leo 6.8.0 b1 on Friday, May 31

2024-05-24 Thread Félix
May 31 is fine with me, I'll just need 2-3 days to finish the modifications 
to leoserver. (So that leoInteg can have 'detached body panes') 

I should be making the pull request just after the weekend :)

Félix

On Thursday, May 23, 2024 at 11:28:32 AM UTC-4 Edward K. Ream wrote:

> On Thursday, May 23, 2024 at 10:25:06 AM UTC-5 Edward K. Ream wrote:
>
> Work is substantially complete on Leo 6.8.0, but there is plenty of time 
> for tweaks.
>
>
> There are four delegated items scheduled for 6.8.0 
> <https://github.com/leo-editor/leo-editor/issues?q=is%3Aopen+milestone%3A6.8.0+label%3Adelegated>.
>  
> Any or all of them can be pushed to 6.8.1.
>
> 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/e93c438d-b7b3-4249-85d6-b56a75f9c6a6n%40googlegroups.com.


Re: How to Modify LeoJS From Within LeoJS?

2024-05-03 Thread Félix
Thanks for this great question Thomas!

(I'll list a few ways, some of which you already know, but I'll list them 
all for other people to read about in case they didn't know)

First of all, like for the original Leo, a good way to customize the 
behavior is to write Leo Scripts in the body text of a node (or an outline 
of many nodes, as scripts can span many nodes and are affected by @others 
and sections references just like @files.) and use such scripts either in 
@button, or @command nodes. (Those can even be placed in your 
leoSettings.leo to be available in all other opened Leo documents.)

See this repository for sample Leo Scripts that address many use cases of 
UI interaction in VSCode from LeoJS: 
https://github.com/boltex/scripting-samples-leojs

Another way would be to write a VSCode extension that uses the LeoJS API 
which exposes the 'g' object. (*so that the extension would be a 'LeoJS 
plugin'*)  With which you can access to all of LeoJS. 

See this repository for a basic 'hello world'  VSCode   extension that 
interacts with the LeoJS extension through it's exposed API: 
https://github.com/boltex/extension-sample-leojs

(See also this easy & short tutorial at 
https://code.visualstudio.com/api/get-started/your-first-extension on how 
to build and run an extension from source if you've never built a VSCode 
extension before.)

Lastly, *for modifying LeoJS itself *(instead of running scripts from 
custom @commands or @buttons, or building an extension and accessing the 
LeoJS global 'g' object) you would just need to clone the LeoJS repository. 
To then build and run it would be the same process as any of the VSCode 
sample extensions, such as this hello-world extension 
<https://github.com/microsoft/vscode-extension-samples/tree/main/helloworld-sample>.
  
(That is to say, running the 'npm install' in the repository folder command 
to get all dependencies, and pressing F5 to start the 'run and debug' 
command in VSCode.)

Hope this helps, and please don't hesitate to ask more questions or propose 
suggestions  :)

Félix

On Thursday, May 2, 2024 at 12:30:22 PM UTC-4 Edward K. Ream wrote:

> On Tuesday, April 30, 2024 at 10:52:57 AM UTC-5 Thomas wrote:
>
> Using Leo, we can edit LeoPyRef, save the edits, restart Leo, and test our 
> changes.  With LeoJS, how can we do the equivalent: editing the code of 
> LeoJS and testing it?
>
>
> Interesting question. I am using a hybrid approach:
>
> Develop with either Leo or LeoJS. Test using either the pytest plugin for 
> vs-code or with Leo itself.
>
> 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/495e6dab-a3fc-4bde-b9bd-9d4105b13a4an%40googlegroups.com.


Re:  LeoJS Beta 0.2.13 Released

2024-05-01 Thread Félix
Thanks Edward, Thomas and Viktor for the bug reports and feature requests 
you've filed on the repository! 

really appreciated. 

#80 will be addressed soon after I setup LeoInteg with the new cool 
features I just added to LeoJS! 

(Yes, LeoJS now leads LeoInteg feature-wise!)

Thanks again to you all for trying out and reporting bugs on the LeoJS beta 
issues page!!

(I've now added an *issue template* to help remind leonistas to grab a 
screenshot when reporting and describing an issue!  hehe! )

Félix

On Wednesday, May 1, 2024 at 6:41:34 AM UTC-4 Edward K. Ream wrote:

> On Tuesday, April 30, 2024 at 9:46:00 AM UTC-5 Edward K. Ream wrote:
>
> I have filed some *minor* LeoJS issues: #123 
> <https://github.com/boltex/leojs/issues/123>, #124 
> <https://github.com/boltex/leojs/issues/124>, #125 
> <https://github.com/boltex/leojs/issues/125>, #126 
> <https://github.com/boltex/leojs/issues/126>, #127, 
> <https://github.com/boltex/leojs/issues/127> and #128. 
> <https://github.com/boltex/leojs/issues/128> Most contain easy 
> workarounds.
>
>
> I have just closed #127 <https://github.com/boltex/leojs/issues/127> 
> because the requested page already exists as part of the readme file:
> https://github.com/boltex/leointeg?tab=readme-ov-file#keybindings
>
> 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/b084b518-1a9b-4dea-868d-eeb348bdbcf8n%40googlegroups.com.


Re:  LeoJS Beta 0.2.13 Released

2024-04-29 Thread Félix
Victor and Thomas (and other vscodium users)

As you can see from this link, https://open-vsx.org/extension/boltex/leojs 
the new version was successfully deployed on open-vsx, at around the same 
time I deployed it to Microsoft's marketplace.  

Not sure here, but I think the 'auto update' of vscodium's extensions might 
require a restart of vscodium. Even if you just opened it. (at startup it 
will detect a new version and download it but it will not 'restart' the 
extension with the new version.) The regular vscode also does that, but it 
does automatically update them. It's just that it needs to restart once it 
detects that a new version is available after boot up.

... Or, maybe vscodium needs their extensions to be manually updated when a 
new version is published on their market. I'm not sure because I've never 
used  vscodium personally.

I've just made a quick google search and it seems to be many issues and 
tickets about vscodium not automatically updating extensions that have 
newer versions available. 

Hope this helps...

In any cases thanks for posting those reports, as someone else who's more 
knowledgeable with vscodium might chime in and give a better explanation! :)

Félix


On Monday, April 29, 2024 at 3:25:26 PM UTC-4 viktor@gmail.com wrote:

> Hello Felix,
>
> Same situation as reported by Thomas for me as well.
>
> That is my VSCodium (version 1.88.1) instance running w/i a Fedora-39 VM 
> does  not get notified about new versions of LeoJS.
>
> tbp1...@gmail.com schrieb am Montag, 29. April 2024 um 13:52:36 UTC+2:
>
> Nice work and nice graphics!  VSCodium on my system doesn't know about 
> this new version yet, I've still got 0.2.11.
>
>
> I noticed this already when you announced LeoJS 0.2.12 - but - thought it 
> was a local issue on my side, since I was in the midst of upgrading from 
> Qubes OS 4.1 to 4.2 ...
>
> Let me know if you need further info about my environment details !
>
> With kind regards,
>
> Viktor
>
>

-- 
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/bfd1659e-ea66-40fe-9a85-fbe4dd72c54bn%40googlegroups.com.


Re: A Leo relative in the wild: Trilium Notes

2024-04-28 Thread Félix
> Felix, you might be interested to know that Trilium is written in 
javascript and the major effort at the moment is converting it to 
typescript. They seem to be blazing along on that front. Perhaps there are 
some tools or libraries that could be extracted/shared.

Thank you Matt for bringing this to my attention! :D

Félix

On Friday, April 26, 2024 at 1:14:08 AM UTC-4 map...@gmail.com wrote:

> Wow. I thought/hoped saying a couple words about Trilium would spark a few 
> thoughts, but nothing like the way this thread is running. It's amazing. 
> Thanks all!
>

-- 
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/2219474f-b750-4e06-9910-d71a4a2fb38an%40googlegroups.com.


Re: Leo shortcut on windows fail with devel branch

2024-04-21 Thread Félix
Ah! Thank you Thomas!! The precise command line you suggested made a 
difference!

 I can now launch Leo with the same shortcut I had, so thanks again for 
that py/python difference made it work :) 

Félix

On Sunday, April 21, 2024 at 11:45:15 PM UTC-4 tbp1...@gmail.com wrote:

> On Sunday, April 21, 2024 at 7:05:08 PM UTC-4 Félix wrote:
>
> After trying to simply install pyqt6, I get yet another error when trying 
> to launch: *cannot import name 'QtWebEngineCore' from 'PyQt6'*
>
>
> It's in a separate package from PyQt6.  Requirements.txt should get it 
> installed. 
>

-- 
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/b58aa714-f6cd-45bd-856c-c285b0457b06n%40googlegroups.com.


Re: Leo shortcut on windows fail with devel branch

2024-04-21 Thread Félix
Weird, i'm getting that -r is not an option... I'll investigate further... 
[image: Untitled.png]



On Sunday, April 21, 2024 at 8:55:57 PM UTC-4 Félix wrote:

> Thanks Edward,
>
> Searching for ' leo-message ' in Leo's codebase, I see the 'leo-message' 
> script is mentioned in 'running.html' 
>
> and also in 'add-desktop-links.leox'. 
>
> Félix
> On Sunday, April 21, 2024 at 7:32:29 PM UTC-4 Edward K. Ream wrote:
>
>>
>>
>> On Sun, Apr 21, 2024 at 5:37 PM Félix  wrote:
>>
>> > I had to revert to the master branch on my windows pc to get the 
>> shortcut to work.
>>
>> leo-messages.exe probably isn't nefarious, but it sure is mysterious.
>>
>> Running *pip -r requirements.txt* should install the missing dependency.
>>
>> 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/2275cb71-c600-45f5-b6f1-5bb9b557558bn%40googlegroups.com.


Re: Leo shortcut on windows fail with devel branch

2024-04-21 Thread Félix
Thanks Edward,

Searching for ' leo-message ' in Leo's codebase, I see the 'leo-message' 
script is mentioned in 'running.html' 

and also in 'add-desktop-links.leox'. 

Félix
On Sunday, April 21, 2024 at 7:32:29 PM UTC-4 Edward K. Ream wrote:

>
>
> On Sun, Apr 21, 2024 at 5:37 PM Félix  wrote:
>
> > I had to revert to the master branch on my windows pc to get the 
> shortcut to work.
>
> leo-messages.exe probably isn't nefarious, but it sure is mysterious.
>
> Running *pip -r requirements.txt* should install the missing dependency.
>
> 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/4e24cf6b-3db3-4590-8912-7fe54641404dn%40googlegroups.com.


Re: Leo shortcut on windows fail with devel branch

2024-04-21 Thread Félix
After trying to simply install pyqt6, I get yet another error when trying 
to launch: *cannot import name 'QtWebEngineCore' from 'PyQt6'*
[image: Untitled.png]

On Sunday, April 21, 2024 at 6:47:19 PM UTC-4 Félix wrote:

> Maybe I should update something on my side? Will that happen to all old 
> windows installations made with pip install ? (I installed on that pc a 
> year or so ago)
>
> Here's what I see when I run that command manually : 
>
> [image: Untitled.png]
>
> On Sunday, April 21, 2024 at 6:37:35 PM UTC-4 Félix wrote:
>
>> I had to revert to the master branch on my windows pc to get the shortcut 
>> to work.
>>
>> It's the one that points to Scripts/leo-messages.exe
>>
>> Here is the shortcut in question (was setup automatically when I 
>> installed Leo)
>>
>> [image: screenshot.png]
>>
>

-- 
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/5ddd77fb-a790-4ac9-a063-a89095262ad0n%40googlegroups.com.


Re: Leo shortcut on windows fail with devel branch

2024-04-21 Thread Félix
Maybe I should update something on my side? Will that happen to all old 
windows installations made with pip install ? (I installed on that pc a 
year or so ago)

Here's what I see when I run that command manually : 

[image: Untitled.png]

On Sunday, April 21, 2024 at 6:37:35 PM UTC-4 Félix wrote:

> I had to revert to the master branch on my windows pc to get the shortcut 
> to work.
>
> It's the one that points to Scripts/leo-messages.exe
>
> Here is the shortcut in question (was setup automatically when I installed 
> Leo)
>
> [image: screenshot.png]
>

-- 
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/35ace956-94c9-4da7-81ee-13eb62154f26n%40googlegroups.com.


Leo shortcut on windows fail with devel branch

2024-04-21 Thread Félix
I had to revert to the master branch on my windows pc to get the shortcut 
to work.

It's the one that points to Scripts/leo-messages.exe

Here is the shortcut in question (was setup automatically when I installed 
Leo)

[image: screenshot.png]

-- 
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/9da1608c-2c89-45d3-9ebf-254ac52a41c9n%40googlegroups.com.


Re: What's next for me

2024-04-12 Thread Félix
I'm gonna quote our friend @Zoom.Quiet : "*of course thanx Leo again, make 
me create so many kinds of projects so funny."*

I don't know why, but I enjoy reading the way he wrote it. And to me this 
is so true...  It makes creating and organizing projects so much more 
enjoyable!  


On Thursday, April 11, 2024 at 9:56:24 PM UTC-4 wzy...@gmail.com wrote:

> >> I won't be happy without programming.   
> me too. and  Leo is a great tool.
>
> 在2024年4月11日星期四 UTC+8 23:19:21 写道:
>
>> In my last post, I hinted that Leo has reached a milestone. Once again, 
>> little work remains. In particular, here are some projects that I *won't*
>>  do:
>>
>>
>> - Revise Leo's design to aid annotations.
>>
>> - Use Qt Designer to simplify Leo's gui code.
>>
>> - Use stricter mypy settings or annotations to aid mypyc.
>>
>>
>> None of these projects would benefit Leo's users or devs.
>>
>>
>> Instead, I plan to learn Rust using one or two toy projects. There is no 
>> need to discuss these projects now. I'll say more when (if) they become 
>> interesting.
>>
>>
>> *Summary*
>>
>>
>> Work on Leo has reached a milestone. Only a few routine issues remain.
>>
>>
>> I won't be happy without programming, so I'll indulge my love of 
>> programming by learning Rust. Stay tuned.
>>
>>
>> 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/e1bc6432-d967-4145-8e6d-b6237bf582f7n%40googlegroups.com.


Re: LeoJS - How To Write To File System And Run External Programs

2024-04-01 Thread Félix
Thanks! I just realized that the scripts samples have many use cases but no 
'explicit' examples of How To Write To File System And Run External 
Programs per say. (although some access files to read from them) So I'll 
add to the script samples repository shortly to remedy this situation.

On Monday, April 1, 2024 at 12:38:14 AM UTC-4 iamap...@gmail.com wrote:

> The video tutorial is now available! :)
>>
>> https://www.youtube.com/watch?v=M_mKXSbVGdE
>>
> Félix, Nice video, I like it! 
>

-- 
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/7624ca3b-b9ab-41b2-9202-942ad7fa2834n%40googlegroups.com.


Re: LeoJS Status Report & Video Demo/Tutorial

2024-03-31 Thread Félix
Hah! no problem at all Thomas, I totally appreciate the criticism so don't 
worry about the tone of your comments or anything like that,   hehe!

I should have indeed mentioned that* I do skim very rapidly *over all those 
information packed examples, and that *pausing *and *rewinding *often is 
more than expected from the viewer, if he wishes to try it itself instead 
of just seeing a list of what's possible.  Especially if he's relatively 
new to vscode.

I had to balance between showing a quick list of what's possible under 5 
minutes to give an overview without boring the viewer, versus explaining 
slowly with explicit details of each menu item clicked for a viewer to try 
and reproduce the experiments himself without prior vscode experience...  

and so, please do go ahead if you wish and list more of the things that are 
hard to reproduce in the video for someone less familiar with vscode, as 
I'll add a note in the description area under the video on youtube to 
address those things.

*To address the specific point you tried to reproduce*: When I do a command 
from Leo's own commands using the minibuffer, I display the keys pressed on 
screen, "ALT+X". (such as when I do 'refresh settings' at *4:17 *) For any 
other commands I perform where the focus is NOT on a Leo panel, such as at 
*1:18 
*when I do the operation you mentioned: "markdown open preview" from the 
markdown document - *not from the body pane itself btw ,* I then just use 
the generic 'commands palette' of vscode. (Which is the very first 
keybinding vscode users learn since all commands are done through that 
command palette shortcut : CTRL+SHIFT+P ) 

Félix


On Sunday, March 31, 2024 at 6:08:57 PM UTC-4 tbp1...@gmail.com wrote:

> Felix, I appreciate all the work but I'm not able to work with the intro 
> video.  Everything happens too fast and I think you do some things that are 
> not visible.  For example, you somehow open a Preview pane that can render 
> Markdown.  I'd like to do that. I have to guess that you got to it by a 
> right mouse click, but when I right click in the body pane I don't get a 
> menu item to open a preview.  The video doesn't give me any guidance about 
> how to set that up.
>
> It's similar with the Git integration.  There are just too many things to 
> take in during the time that a drag takes place, and then something else 
> happens that there also isn't time to take in.
>
> If things were slowed down and there were more titles or explanatory text 
> the video would be much more helpful.  I know that making these videos is 
> time-consuming and has a large learning curve - that's why I haven't tried 
> making my own! Please don't take these comments as criticizing your work - 
> I'm just trying to be helpful. 
>
> On Sunday, March 31, 2024 at 4:30:18 PM UTC-4 Félix wrote:
>
>> The sample Leo scripts shown in the video are collected in this github 
>> repository: https://github.com/boltex/scripting-samples-leojs
>>
>> The sample "LeoJS-Plugin" extension shown in the video also has its own 
>> github repository at: https://github.com/boltex/extension-sample-leojs
>>
>> On Sunday, March 31, 2024 at 4:28:00 PM UTC-4 Félix wrote:
>>
>>> *LeoJS Status Report*
>>>
>>> After stabilizing the beta version, now reaching its twelfth revision at 
>>> 0.2.12, and getting rid of its most obvious bugs and defects, I thought it 
>>> would be a good moment to address the questions posed on this forum about 
>>> the possible features and capabilities of LeoJS by producing a video 
>>> demonstration.
>>>
>>> This took a bit longer than I would have thought, months instead of 
>>> weeks, but nevertheless, here it is!
>>>
>>> https://www.youtube.com/watch?v=M_mKXSbVGdE
>>>
>>> *This five-minute video quickly goes over each of the following:*
>>>
>>>- Using LeoJS on the web
>>>- Commits & pull requests from VSCode's UI
>>>- Running Leo scripts in LeoJS
>>>- Interacting with the UI from scripts (Sample scripts)
>>>- Creating a plugin/extension that uses LeoJS (Sample extension)
>>>- Invoking commands, using the minibuffer and @buttons
>>>- Using a @settings node
>>>- UNL link support
>>>- Previewing live render of SVG (or markdown, etc.) external files
>>>
>>> Hoping this will answer most questions the experienced leonistas had 
>>> about LeoJS being able to reproduce the original Leo's functionalities from 
>>> within VSCode.
>>>
>>> *Last but not least: I've also remade the classic 'Introduction to Leo' 
>>> video with LeoJS! *
>>>
>>> https://www.yo

Re: LeoJS Status Report & Video Demo/Tutorial

2024-03-31 Thread Félix
The sample Leo scripts shown in the video are collected in this github 
repository: https://github.com/boltex/scripting-samples-leojs

The sample "LeoJS-Plugin" extension shown in the video also has its own 
github repository at: https://github.com/boltex/extension-sample-leojs

On Sunday, March 31, 2024 at 4:28:00 PM UTC-4 Félix wrote:

> *LeoJS Status Report*
>
> After stabilizing the beta version, now reaching its twelfth revision at 
> 0.2.12, and getting rid of its most obvious bugs and defects, I thought it 
> would be a good moment to address the questions posed on this forum about 
> the possible features and capabilities of LeoJS by producing a video 
> demonstration.
>
> This took a bit longer than I would have thought, months instead of weeks, 
> but nevertheless, here it is!
>
> https://www.youtube.com/watch?v=M_mKXSbVGdE
>
> *This five-minute video quickly goes over each of the following:*
>
>- Using LeoJS on the web
>- Commits & pull requests from VSCode's UI
>- Running Leo scripts in LeoJS
>- Interacting with the UI from scripts (Sample scripts)
>- Creating a plugin/extension that uses LeoJS (Sample extension)
>- Invoking commands, using the minibuffer and @buttons
>- Using a @settings node
>- UNL link support
>- Previewing live render of SVG (or markdown, etc.) external files
>
> Hoping this will answer most questions the experienced leonistas had about 
> LeoJS being able to reproduce the original Leo's functionalities from 
> within VSCode.
>
> *Last but not least: I've also remade the classic 'Introduction to Leo' 
> video with LeoJS! *
>
> https://www.youtube.com/watch?v=j0eo7SlnnSY
>
> Hope you like those two videos!
>
> I'll now focus on the very last few remaining LeoJS issues and features 
> needed for a proper 1.0 version release of LeoJS. (Hopefully this spring!) 
>
> Félix
>

-- 
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/79dc3fb8-63a5-4e82-ab92-97e4ece03040n%40googlegroups.com.


LeoJS Status Report & Video Demo/Tutorial

2024-03-31 Thread Félix
*LeoJS Status Report*

After stabilizing the beta version, now reaching its twelfth revision at 
0.2.12, and getting rid of its most obvious bugs and defects, I thought it 
would be a good moment to address the questions posed on this forum about 
the possible features and capabilities of LeoJS by producing a video 
demonstration.

This took a bit longer than I would have thought, months instead of weeks, 
but nevertheless, here it is!

https://www.youtube.com/watch?v=M_mKXSbVGdE

*This five-minute video quickly goes over each of the following:*

   - Using LeoJS on the web
   - Commits & pull requests from VSCode's UI
   - Running Leo scripts in LeoJS
   - Interacting with the UI from scripts (Sample scripts)
   - Creating a plugin/extension that uses LeoJS (Sample extension)
   - Invoking commands, using the minibuffer and @buttons
   - Using a @settings node
   - UNL link support
   - Previewing live render of SVG (or markdown, etc.) external files

Hoping this will answer most questions the experienced leonistas had about 
LeoJS being able to reproduce the original Leo's functionalities from 
within VSCode.

*Last but not least: I've also remade the classic 'Introduction to Leo' 
video with LeoJS! *

https://www.youtube.com/watch?v=j0eo7SlnnSY

Hope you like those two videos!

I'll now focus on the very last few remaining LeoJS issues and features 
needed for a proper 1.0 version release of LeoJS. (Hopefully this spring!) 

Félix

-- 
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/2d37742c-53d3-47ff-b950-af386c5f5af8n%40googlegroups.com.


Re: LeoJS - How To Write To File System And Run External Programs

2024-03-31 Thread Félix
The video tutorial is now available! :)

https://www.youtube.com/watch?v=M_mKXSbVGdE

I'll address the specific issue about starting sub processes shortly when I 
do the  'e*xecute-external-file'  *function in LeoJS.

Félix

On Monday, March 11, 2024 at 1:01:43 AM UTC-4 Félix wrote:

> >  e*xecute-external-file*
>
>
> I'll check it out :)
>
> Félix
>
>
>
> On Saturday, March 9, 2024 at 10:20:38 PM UTC-5 tbp1...@gmail.com wrote:
>
>> I don't know if you got around to thinking about it yet (you've got so 
>> much else going on!), but the command I wrote to run external files is in 
>> LeoPyRef and it's called *execute-external-file*.  It has some 
>> trickiness because it has to run on Linux as well as Windows, and the 
>> terminal commands to launch programs differ among the distros. The code has 
>> to try some empirical hacks to figure it all out. But it ought to port to 
>> TS pretty easily, I would think.
>>
>> On Saturday, March 9, 2024 at 9:46:57 PM UTC-5 Félix wrote:
>>
>>> I'm still working on this! Thanks for your patience :) 
>>>   
>>> (The latest LeoJS 0.2.12 release is the result of trying to capture many 
>>> features for that video tutorial, and realizing that they needed a bit of 
>>> polishing!)
>>>
>>> Félix
>>>
>>> On Wednesday, January 3, 2024 at 7:18:33 PM UTC-5 tbp1...@gmail.com 
>>> wrote:
>>>
>>>> Yay!
>>>>
>>>> On Wednesday, January 3, 2024 at 7:12:26 PM UTC-5 Félix wrote:
>>>>
>>>>> I'm going to take a coding break by doing a tutorial exactly about 
>>>>> that!
>>>>>
>>>>> On Wednesday, January 3, 2024 at 4:56:12 PM UTC-5 tbp1...@gmail.com 
>>>>> wrote:
>>>>>
>>>>>> Now That leoJS is getting into pretty good shape - and Felix must 
>>>>>> need a month's vacation! - I am thinking about plugins and scripts that 
>>>>>> can 
>>>>>> do things that are easy to do from within Leo. Specifically, scripts 
>>>>>> that 
>>>>>> can read and write files from the file system, and files that do the 
>>>>>> equivalent of subprocess.run() or subprocess.Popen().  In addition (or 
>>>>>> maybe it's in the same group), scripts that launch a web browser on a 
>>>>>> specified file.
>>>>>>
>>>>>> Is there somewhere we can read up on these things, that is, how a 
>>>>>> leoJS script can do them in javascript/typescript?
>>>>>>
>>>>>

-- 
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/562ed4a8-b976-4c74-9a7e-88df8d012545n%40googlegroups.com.


Re: I just had successful eye surgury

2024-03-28 Thread Félix
I hope your eye recovers soon! 
Please take good care!
On Thursday, March 28, 2024 at 6:21:11 PM UTC-4 jkn wrote:

> My best wishes for a swift and complete recovery, Edward.
>
> Jon N
>
>
> On Thursday, March 28, 2024 at 8:03:52 PM UTC Edward K. Ream wrote:
>
>> A vitrectomy 
>> of
>>  
>> the rt eye. I'll be limited in what I can do for about a week.
>>
>> 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/c03b4901-bc18-4cbc-96ce-5bfc23597febn%40googlegroups.com.


Re: Leo 6.7.8 is coming this Friday, March 15

2024-03-14 Thread Félix
No problem with me, I'll release a new LeoInteg version, a day or two after 
everything is settled, which depended on Leo 6.7.8.

 but dont hesitate to delay it if anything feels that need more time 

Félix

On Monday, March 11, 2024 at 6:23:26 AM UTC-4 Edward K. Ream wrote:

> Félix has just released LeoJS 0.2.12 beta, so I assume it will be several 
> more weeks until LeoJS 1.0 goes out the door. That being so, I would like 
> to release Leo 6.7.8 immediately.
>
>
> Besides the usual improvements, Leo 6.7.8 changes Leo's distribution 
> machinery and deprecates Qt5. Both changes affect 6.7.9 and are worth doing 
> now.
>
>
> Please let me know if you object to releasing 6.7.8 this week.
>
>
> 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/a702d134-d35b-4435-baee-e14d263f5287n%40googlegroups.com.


Re: LeoJS - How To Write To File System And Run External Programs

2024-03-10 Thread Félix
>  e*xecute-external-file*


I'll check it out :)

Félix



On Saturday, March 9, 2024 at 10:20:38 PM UTC-5 tbp1...@gmail.com wrote:

> I don't know if you got around to thinking about it yet (you've got so 
> much else going on!), but the command I wrote to run external files is in 
> LeoPyRef and it's called *execute-external-file*.  It has some trickiness 
> because it has to run on Linux as well as Windows, and the terminal 
> commands to launch programs differ among the distros. The code has to try 
> some empirical hacks to figure it all out. But it ought to port to TS 
> pretty easily, I would think.
>
> On Saturday, March 9, 2024 at 9:46:57 PM UTC-5 Félix wrote:
>
>> I'm still working on this! Thanks for your patience :) 
>>   
>> (The latest LeoJS 0.2.12 release is the result of trying to capture many 
>> features for that video tutorial, and realizing that they needed a bit of 
>> polishing!)
>>
>> Félix
>>
>> On Wednesday, January 3, 2024 at 7:18:33 PM UTC-5 tbp1...@gmail.com 
>> wrote:
>>
>>> Yay!
>>>
>>> On Wednesday, January 3, 2024 at 7:12:26 PM UTC-5 Félix wrote:
>>>
>>>> I'm going to take a coding break by doing a tutorial exactly about that!
>>>>
>>>> On Wednesday, January 3, 2024 at 4:56:12 PM UTC-5 tbp1...@gmail.com 
>>>> wrote:
>>>>
>>>>> Now That leoJS is getting into pretty good shape - and Felix must need 
>>>>> a month's vacation! - I am thinking about plugins and scripts that can do 
>>>>> things that are easy to do from within Leo. Specifically, scripts that 
>>>>> can 
>>>>> read and write files from the file system, and files that do the 
>>>>> equivalent 
>>>>> of subprocess.run() or subprocess.Popen().  In addition (or maybe it's in 
>>>>> the same group), scripts that launch a web browser on a specified file.
>>>>>
>>>>> Is there somewhere we can read up on these things, that is, how a 
>>>>> leoJS script can do them in javascript/typescript?
>>>>>
>>>>

-- 
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/8e5785f1-6178-43e2-ad20-137a024b6b93n%40googlegroups.com.


Re: LeoJS - How To Write To File System And Run External Programs

2024-03-09 Thread Félix
I'm still working on this! Thanks for your patience :) 
  
(The latest LeoJS 0.2.12 release is the result of trying to capture many 
features for that video tutorial, and realizing that they needed a bit of 
polishing!)

Félix

On Wednesday, January 3, 2024 at 7:18:33 PM UTC-5 tbp1...@gmail.com wrote:

> Yay!
>
> On Wednesday, January 3, 2024 at 7:12:26 PM UTC-5 Félix wrote:
>
>> I'm going to take a coding break by doing a tutorial exactly about that!
>>
>> On Wednesday, January 3, 2024 at 4:56:12 PM UTC-5 tbp1...@gmail.com 
>> wrote:
>>
>>> Now That leoJS is getting into pretty good shape - and Felix must need a 
>>> month's vacation! - I am thinking about plugins and scripts that can do 
>>> things that are easy to do from within Leo. Specifically, scripts that can 
>>> read and write files from the file system, and files that do the equivalent 
>>> of subprocess.run() or subprocess.Popen().  In addition (or maybe it's in 
>>> the same group), scripts that launch a web browser on a specified file.
>>>
>>> Is there somewhere we can read up on these things, that is, how a leoJS 
>>> script can do them in javascript/typescript?
>>>
>>

-- 
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/920a648f-9a81-4142-aec1-5a2e8546fbe4n%40googlegroups.com.


Re: Discuss: Release Leo only via GitHub?

2024-02-14 Thread Félix
I hope it would still be possible for people to get the latest leo release 
via pip install leo ...

... because Leo is such a great program to organize stuff, ideas, make 
plans...  compose texts/poems, I wish that (if possible) Leo was easy to 
install for non-programmers or newbies, or young lads who are totally 
unfamiliar with git/github. 

Félix

On Sunday, February 11, 2024 at 5:51:09 AM UTC-5 Edward K. Ream wrote:

> On Sat, Feb 10, 2024 at 5:21 PM Mike Hodson  wrote:
>
>> Today after seeing the message regarding a new user being confused as to 
>> how to install, I decided I would chime in on this topic.
>>
>
> Many thanks for your remarks, Mike. I'm convinced.
>
> I have deleted the problematic 6.7.7.1 release. Future versions of Leo 
> will appear on PyPi.
>
> This plan should have no effect on those who install Leo using GitHub. 
> Once an improved requirements.txt exists, pip install -r requirements.txt 
> will install Leo's dependencies.
>
> 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/e3152a22-1b57-4e71-982a-fe79a7ffaddbn%40googlegroups.com.


Re: LeoJS - How To Write To File System And Run External Programs

2024-01-03 Thread Félix
I'm going to take a coding break by doing a tutorial exactly about that!

On Wednesday, January 3, 2024 at 4:56:12 PM UTC-5 tbp1...@gmail.com wrote:

> Now That leoJS is getting into pretty good shape - and Felix must need a 
> month's vacation! - I am thinking about plugins and scripts that can do 
> things that are easy to do from within Leo. Specifically, scripts that can 
> read and write files from the file system, and files that do the equivalent 
> of subprocess.run() or subprocess.Popen().  In addition (or maybe it's in 
> the same group), scripts that launch a web browser on a specified file.
>
> Is there somewhere we can read up on these things, that is, how a leoJS 
> script can do them in javascript/typescript?
>

-- 
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/817c5de4-4656-401c-a88b-b18f9a640341n%40googlegroups.com.


Re: LeoJS - How To Print javascript Output?

2024-01-02 Thread Félix
Lo and behold, it means *emit string *



Félix

-- 
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/92755d0f-6063-4a97-8c04-fee411d7395dn%40googlegroups.com.


Re: Strangeness with tratment of node Icons - LeoJS and/or 'Classic'?

2024-01-02 Thread Félix
jkn

Can you give more info about those node icons? (custom attributes) Is the 
long hex string image file data, of just a path to a file on disk?

and share a sample .leo file that has only one or two nodes with icons ? 
(the smaller the better) I'll use it to make experiments and ensure that it 
gets read and written as-is to not corrupt any Leo files with custom 
attributes outside of regular 'UA's

I'll open an issue as soon as I can try it out.

Thanks again!

Félix
On Tuesday, January 2, 2024 at 12:11:05 PM UTC-5 jkn wrote:

> Has anything changed in the treatment of node Icons recently, please?
>
> In the course of trying out LeoJS recently, and getting in a few knots re. 
> 'file already open in another copy of Leo', I also hit an error where Leo 
> 'classic' was failing to fully read a file. This seemed to be related to my 
> occasional use of node icons.
>
> AFAICT a node icon just gets turned into an "icons=long_hex_string" in the 
> node entry:
>
>  icons="5d71007d71012858040074797065710258040066696c65710368035834002f686f6d652f6a6b6e2f6c656f2d656469746f722f686561646c696e652d6974656d732f746869737765656b5f67726e2e706e67710458070072656c5061746871055834002f686f6d652f6a6b6e2f6c656f2d656469746f722f686561646c696e652d6974656d732f746869737765656b5f67726e2e706e67710658050077686572657107580e006265666f7265486561646c696e657108580700796f73657471094b00580700786f736574710a4b0258040078706164710b4b015802006f6e710c580500564e6f6465710d75612e">
>
> ### (body of node) ###
> 
>
> I'm unclear of the encoding, but FWIW I seemed to have recovered things, 
> and allowed Leo Classic to open the files, by deleting the 'icons=' part in 
> my file - luckily there were only a few of them.
>
> Perhaps foolishly I did update my copy of Leo classic in the middle of all 
> of my playing.
> But I'm wondering if LeoJS somehow mangled something here, or if recent 
> changes to Leo might have caused this.
>
> I can try to recreate the problem and get a fuller error message if that 
> would be useful. I thought I'd put this out in case this jogged any 
> memories.
>
> Thanks, Jon n
>
>

-- 
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/0f24e865-5851-42dc-ade9-fabf64e58c30n%40googlegroups.com.


Re: LeoJS: What is the equivalent of LeoPyRef.leo?

2023-12-24 Thread Félix
Hi Thomas, 

Great question -- Thanks for asking!

Since LeoJS is a VSCode (or vscodium) extension, its source code is 
compiled/minified somehow, and many other source files are omitted from the 
final 'distribution' package.

Therefore, the way to open and view LeoJS source files (or browse it's *Leo 
source file* in Leo/LeoJS) is to clone the repo from 
https://github.com/boltex/leojs, and look at the base of the project folder 
for *leojs.leo. *

[image: screen.png]

This would be the equivalent of LeoPyRef.leo. (and if you're looking for 
the equivalent of the base setting file, leoSettings.leo, its at the same 
place, and named *leojsSettings.leojs*.

Hope this helps! 女

Félix


On Saturday, December 23, 2023 at 10:54:43 PM UTC-5 tbp1...@gmail.com wrote:

> IOW, where or how do we look at Leo's code? Locations like *g.app.leoDir* 
> are undefined.

-- 
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/9685a0a4-9655-4fa5-9b74-f6c20b6af932n%40googlegroups.com.


Re: leoJS Seems To Work With VSCodium

2023-12-22 Thread Félix
Thank you Thomas, Viktor and J^n for your comments :)

We have Kevin Henderson to thanks for that. He's the one who made me aware 
of vscodium and it's extension marketplace. I didn't know anything about 
this, but he pointed me to their website and documentation. From there I 
followed the directions in order to publish both LeoInteg and LeoJS on that 
platform.

I had never actually tried it so I'm very happy to hear that it actually 
works! 

Thanks again to all of you for your support and your bug reports for this 
beta version. With your help I'll be able to make a proper release of a 
version 1.0 sometime soon in the following months.

Félix

On Friday, December 22, 2023 at 3:42:58 PM UTC-5 jkn wrote:

> Thanks for the heads up - I too use VSCodium (a bit) and this was the 
> version I was hoping to try leoJS with
>
> J^n
>
>
> On Friday, December 22, 2023 at 8:18:23 PM UTC tbp1...@gmail.com wrote:
>
>> VSCodium is a version of VSCode that does not include Microsoft-specific 
>> additions like telemetry.  It's the same code base so everything *ought* to 
>> work the same.
>>
>> I've installed VSCodium, and leoJS seems to be working the same as on 
>> VSCode.
>>
>

-- 
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/a277bea6-4f06-4705-b4f3-122d9697d964n%40googlegroups.com.


Re: ✨LeoJS beta 0.2.0 Released!

2023-12-21 Thread Félix
Thanks Thomas, Great info! I've added that info in the issue on github 
about the rst3 support at https://github.com/boltex/leojs/issues/80  :)

On Thursday, December 21, 2023 at 11:57:53 PM UTC-5 tbp1...@gmail.com wrote:

> On Wednesday, December 20, 2023 at 11:13:38 PM UTC-5 Félix wrote:
>
> Viktor,
> About rst3: I've implemented all of the rst related code in LeoJS, (see 
> leoRst.ts 
> in the repository 
> <https://github.com/boltex/leojs/blob/master/src/core/leoRst.ts>)  but 
> there's a part that I could not transliterate.  Here is the magic lines 
> that I cannot reproduce easily in typescript... :)
>
> # Third-part imports...
> try:
> import docutils
> import docutils.core
> from docutils import parsers
> from docutils.parsers import rst
>
> haha! ;) There's no library in javascript that exist (that I know of)
>
> The rst3 command can operate without using docutils.  There's a setting 
> about that, *rst3-call-docutils.* I have used rst3 for many sphinx 
> documents without needing to use docutils.  Sphinx itself will use it, but 
> you run as an external executable outside of the rst3 command.
>
> I'm not sure what using docutils gets you, but it seems to me that you 
> could get the command working without docutils, and if someone changes the 
> settings to ask for them, output a warning message about it. (I think that 
> it's connected with another setting for writing intermediate files, but I'm 
> not sure of that. Anyway, I don't use it.)
>

-- 
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/0165d859-a82c-484d-b6e5-68b01c2dec1cn%40googlegroups.com.


Re: ✨LeoJS beta 0.2.0 Released!

2023-12-21 Thread Félix
Oh Great point HaveF!

> I thought you also developed a low-level library called LeoJS, and the 
"Leo Editor for Visual Studio Code" extension was developed on top of this 
low-level library. 
Yes Indeed, I didn't catch on to what you were implying sorry: Yes -  
*LeoJS * has an almost 99% separated 'Leo' engine in typescript inside the 
src folder that I plan to finish making it totally 100% separated. so that 
you can include it in another project to make your own front-end! *(I'll 
make the nullgui api interface more independent from vscode to make the Leo 
engine easily separable from this vscode LeoJS extension)*

I guess it will also be called 'leojs' - hehe !

Thanks for your excellent questions and discussions HaveF :)

By the way: ✨*new version 0.2.6 tonight for all you leonistas to experiment 
with! *女 

don't hesitate to open issues on the github project page!

Félix

On Thursday, December 21, 2023 at 4:46:31 AM UTC-5 Edward K. Ream wrote:

>
> On Sunday, December 10, 2023 at 7:43:15 PM UTC-6 Félix wrote:
>
> *LeoJS Debuts!*
>
> I'm thrilled to unveil LeoJS 'beta' 0.2.0 
> <https://marketplace.visualstudio.com/items?itemName=boltex.leojs>, a 
> JavaScript implementation of the Leo Editor, now reimagined as a VSCode 
> extension. Building on the foundation of LeoInteg, LeoJS revolutionizes 
> your coding environment by seamlessly integrating into VSCode.
>
>
>  Here is the text of a private email Félix sent me a few minutes earlier 
> on Dec. 10:
>
> > I did it my dear friend. Line by line. All of Leo. Available online for 
> free without downloading anything. Forever...
>
> It conveys his justifiable pride. It's also a pithy summary :-)
>
> 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/ed38baa2-8099-44b9-8e79-aa88cf391653n%40googlegroups.com.


Re: ✨LeoJS beta 0.2.0 Released!

2023-12-20 Thread Félix
Addendum: I just thought Id specify to readers unaware of VSCode's 
integration into github that yes, It's not a typo: *Press the dot "." on 
your keyboard* when viewing a particular branch on repo that you own. Tada! 
:)

Félix

On Wednesday, December 20, 2023 at 11:13:38 PM UTC-5 Félix wrote:

> Thank you Edward, Viktor, HaveF, and Thomas for trying out and reporting 
> your experience! This will help me polish LeoJS and get rid of hard-to-spot 
> bugs!
>
> Viktor,
> About rst3: I've implemented all of the rst related code in LeoJS, (see 
> leoRst.ts 
> in the repository 
> <https://github.com/boltex/leojs/blob/master/src/core/leoRst.ts>)  but 
> there's a part that I could not transliterate.  Here is the magic lines 
> that I cannot reproduce easily in typescript... :)
>
> # Third-part imports...
> try:
> import docutils
> import docutils.core
> from docutils import parsers
> from docutils.parsers import rst
>
> haha! ;) There's no library in javascript that exist (that I know of)
> I was lucky in some other instances (pickle, zip, md5, sqlite, etc.) in 
> finding libraries for javascript. But none so far for docutils/rst document 
> reading/writing so far. I'd really like to offer rst3 support in LeoJS just 
> like in Leo, so I'll keep an eye open, or, I'll implement it all myself 
> eventually! Please don't hesitate to suggest other ways for me to support 
> this if you can think of any, your ideas are greatly appreciated! (perhaps 
> Leo only uses a small subset of the rst python library and that 
> implementing it in javascript is not that harsh of a task ...I'd have to 
> look more into it. )
>
> I'll open an issue right away for this: #80 
> <https://github.com/boltex/leojs/issues/80> where we can accumulate 
> knowledge and plan more specifically how to go about to accomplish this 
> (important) part of Leo.
>
> Thanks again Viktor for your report!
>
> --
>
> HaveF,
>  Thank you also very much for trying out LeoJS and reporting your 
> findings! Much appreciated!!
> About your questions:
>
> 1- LeoJS *is *"Leo Editor for Visual Studio Code". Not 'based on'.
>  And LeoInteg integrates the real Leo by running an instance of 
> BridgeController in leoServer.py, and talking to it via simple websocket.
>
> But you are right in that LeoInteg is 'mostly complete' and is now 
> somewhat in a 'maintenance phase'. (Although *future features of LeoJS 
> will be added to LeoInteg as soon as they are done*. e.g. multiple *different 
> *opened body panes opened at once, UNL @URL click handling, etc.)
>
> 2- If you're talking about '@buttons' : LeoJS, like LeoInteg, has full 
> support of *@command* via the minibuffer (Alt+X), and * @button* via its 
> button panel. The button sub-menus are even implemented! see screenshot:
> [image: screen.png]
> Otherwise, LeoJS also has regular buttons for most common Leo commands 
> displayed if your mouse hovers the outline-pane:
> [image: screen2.png]
> Along with the body-pane:
> [image: screen2.png]
> Hover your mouse over them to see a description ! :)
>
> Thanks again HaveF for your questions and suggestions!! :D (please clarify 
> if I didn't address the particular point you were trying to make)
>
> --
>
> Lastly, thanks again to Thomas.
>
>  I hope the latest patches and updates that I did in the last few days now 
> allow the tests you had tried to do with LeoJS to actually work now! :)
>
> (And the tutorial I promised about how to use it live on the web in a 
> browser via github.com is coming soon!  *hint: do not go to vscode.dev 
> <http://vscode.dev>, instead go to github.com <http://github.com>, login in 
> the usual way, navigate on a repo that you own, switch to a branch that you 
> own and have write access, and press the dot "." on your keyboard*. ) 
>
> Félix
>
>
> On Wednesday, December 20, 2023 at 8:21:07 PM UTC-5 iamap...@gmail.com 
> wrote:
>
>>  - Like its predecessor, LeoInteg, LeoJS employs VSCode's robust GUI to 
>> host a variety of panels and controls, offering a smooth and familiar user 
>> experience.
>>
>> Hi,  Félix,
>>
>> Congratulations! 
>>
>> I have two questions:
>>
>> 1. "Leo Editor for Visual Studio Code" is based on LeoJS, while "Leo 
>> Editor Integration with Visual Studio Code" is based on Leo. Currently, 
>> development will primarily focus on the former, with the latter 
>> transitioning to a maintenance phase—is that correct? 
>>
>>
>> 2. Additionally, having relied heavily on "buttons" in Leo, I am curious, 
>> based on the screenshots of the doc, whether th

Re: ✨LeoJS beta 0.2.0 Released!

2023-12-10 Thread Félix
Thanks Thomas, 

Indeed I also noticed some problems with the importers (@auto) I've started 
an issue about .md markdown @auto imports 
failing. https://github.com/boltex/leojs/issues/60 Feel free to add an 
issue if you have details about the importers failing.

For the web version, you have to have at least a repo created with at least 
one commit. Creating a new repo and also adding an automatic readme file 
inside of it while you create it do work if I recall correctly. 
(Totally new and empty repos will not work, as github only really creates a 
repo after the first commit.) 

Lastly, about mercurial and other versioning systems: leojs does not 
interact with 'git' per say, it just runs on the web version of vscode. 
(vscode simulates a file system from the online repository offered by 
github, azure and others which may use another versioning system)

To use leojs locally as normal like the regular leo, Install leojs on your 
local vscode installation (like leointeg).

(Using leojs on the web is a simple click or two away if you know exactly 
what to do, but I can see that it may not be self-evident: I'll make better 
and more detailed documentation and examples with screenshots to be 
followed easily shortly. 邏 )

Thanks again for trying out the most functionality that you can and 
reporting what fails! much appreciated!

Félix

On Sunday, December 10, 2023 at 10:13:14 PM UTC-5 tbp1...@gmail.com wrote:

> All right, it installed in vsc and it did open an outline.  I saw a lot of 
> errors like this:
>
> reading settings in C:/Users/tom/.leo/workbook.leo
> TypeError: Cannot read properties of undefined (reading 'trim')
> at Ini_Importer.find_blocks 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1507413)
> at Ini_Importer.gen_block 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1508153)
> at Ini_Importer.gen_lines 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1511889)
> at Ini_Importer.import_from_string 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1512400)
> at exports.do_import 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1522910)
> at LeoImportCommands.createOutline 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1338218)
> at async AtFile.readOneAtAutoNode 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:955878)
> at async AtFile.readFileAtPosition 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:954544)
> at async AtFile.readAll 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:953359)
> at async FileCommands.readExternalFiles 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1151896)
> at async FileCommands._getLeoFileByName 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1151493)
> at async FileCommands.getAnyLeoFileByName 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1149953)
> at async LoadManager.openFileByName 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:937514)
> at async LoadManager.loadLocalFile 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:936309)
> at async SessionManager.load_session 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1439599)
> at async LoadManager.doPostPluginsInit 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:932259)
> at async LoadManager.load 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:931126)
> at async runLeo 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1807739)
> at async activate 
> (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1815070)
> at async u.n (c:\Users\tom\AppData\Local\Programs\Microsoft VS 
> Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:6255)
> at async u.m (c:\Users\tom\AppData\Local\Programs\Microsoft VS 
> Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:6218)
> at async u.l (c:\Users\tom\AppData\Local\Programs\Microsoft VS 
> Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:5675)
>
> On Sunday, December 10, 2023 at 10:06:13 PM UTC-5 Thomas Passin wrote:
>
>> I'm afraid I can't get started.  The beta insists on opening a repo 
>> first, but I can't figure out how to either find my own repos or to get 
>> authenticated for Github.
>>
>> I'd rather start working on a .leo file that isn't in a repo at all.  I'm 
>> never going to have all my outlines in a repo, but I want

Re: Default 'history-list' in leoSettings.leo

2023-10-09 Thread Félix
Thanks - no problem at all, I'm gonna clear it :)

On Monday, October 9, 2023 at 3:45:17 PM UTC-4 Edward K. Ream wrote:

> On Mon, Oct 9, 2023 at 2:12 PM Félix  wrote:
>
>> I've implemented @data history-list support in LeoJS and LeoInteg (coming 
>> soon in next 1.0.16 version) and I'm wondering why does the default history 
>> list taken from the leoSettings.leo settings file have those two commands 
>> already in there:
>>
>> *pylint*
>> *sort-lines*
>
>
> Imo, it's no big deal what the default is. Clear the default if you like. 
> If there was any deep thought behind the choice I have forgotten it, hehe!
>
> 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/6608a576-3072-4ff7-a22e-80d8501017f8n%40googlegroups.com.


Re: Default 'history-list' in leoSettings.leo

2023-10-09 Thread Félix
 I felt they should be in a user's personal myLeoSettings.leo... Maybe 
that's what happened: they were put in leoSettings.leo instead of 
myLeoSettings.leo by mistake?

On Monday, October 9, 2023 at 3:12:08 PM UTC-4 Félix wrote:

> I've implemented @data history-list support in LeoJS and LeoInteg (coming 
> soon in next 1.0.16 version) and I'm wondering why does the default history 
> list taken from the leoSettings.leo settings file have those two commands 
> already in there:
>
> *pylint*
> *sort-lines*
>
> Are they intended to be there or are they a remnant of some 
> test/experiment that was forgotten to be in leoSettings for some time? 
> Should it be removed?
>
> Félix
>
>
>

-- 
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/b78c533d-10d8-44df-ba2b-2a7d5c8f4e3fn%40googlegroups.com.


Default 'history-list' in leoSettings.leo

2023-10-09 Thread Félix
I've implemented @data history-list support in LeoJS and LeoInteg (coming 
soon in next 1.0.16 version) and I'm wondering why does the default history 
list taken from the leoSettings.leo settings file have those two commands 
already in there:

*pylint*
*sort-lines*

Are they intended to be there or are they a remnant of some test/experiment 
that was forgotten to be in leoSettings for some time? Should it be removed?

Félix


-- 
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/72037dc3-0964-436a-8263-118f6ba50123n%40googlegroups.com.


Re: Are the 'eval' commands working? or is it just me?

2023-10-09 Thread Félix
Indeed, execute-script command already honors the current text-selection 
and will only run the selected text, if any, otherwise it will use the 
whole node's text. (and appropriate descendants if any '@others' present in 
the selection/node)

I'll gladly remove mod_scripting's eval commands from leojs. 
(they will also be automatically gone from leointeg's minibuffer when they 
leave Leo itself  )

Félix
On Monday, October 9, 2023 at 9:53:48 AM UTC-4 Edward K. Ream wrote:

> On Mon, Oct 9, 2023 at 8:46 AM Thomas Passin  wrote:
>
>> The *valuespace*  plugin does something like this, but I found it 
>> confusing to use.
>
>
> Me too.
>
> 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/3ab856ab-e111-41a0-91fb-c8a5eb1911can%40googlegroups.com.


Re: Heads up: PR #3597 rewrites Leos save, save-as and save-to commands!

2023-10-09 Thread Félix
Thanks, I'll have leojs mimic those changes.

Félix

On Monday, October 9, 2023 at 3:10:24 AM UTC-4 Edward K. Ream wrote:

> PR #3597 <https://github.com/leo-editor/leo-editor/pull/3597> rewrites 
> c.save, c.saveAs, and c.saveTo. This project started out with a report 
> about a quirp. I quickly realized that the existing code was intolerably 
> complex.
>
>
> *Removing an Easter Egg*
>
>
> c.saveTo contains the following Easter Egg (bizarre code):
>
>
> if not fileName:  
>
> fileName = ''.join(c.k.givenArgs)
>
>
> Neither Leo's core nor official plugins use this egg. Furthermore, the 
> existing "fileName" kwarg to all three methods renders the hack unnecessary.
>
>
> *Summary*
>
>
> The PR fixes hard-to-see inconsistencies in c.save, c.saveAs, and 
> c.saveTo. This PR should be the basis of leoJS's save command.
>
> This work is potentially dangerous! I'll wait at least several days before 
> merging this PR. 
>
> Imo, removing the Easter Egg does not constitute a significant breaking 
> change to Leo's API. But we'll see who howls :-)
>
> Please review the PR and report any problems.
>
>
> 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/32395122-ff4d-48ff-8f7e-1185514fdd8en%40googlegroups.com.


Are the 'eval' commands working? or is it just me?

2023-10-08 Thread Félix
Trying out the *eval *commands from the minibuffer for the first time, 
following the examples in the documentation doesn't work for me... Am I 
doing something wrong?

To try out 'eval' and 'eval-last', the documentation says :
eval-last
-

Inserts the result of the last eval in the body.
Suppose you have this text::

The cat is 7 years, or 7*365 days old.

To replace 7*365 with 2555, do the following::

select 7*367
eval
delete 7*365
do eval-last

but selecting something makes the 'eval' execute the whole line instead of 
the selected text when I try it. (on windows).

Can you guys confirm/deny/comment on those commands from the mod_scripting 
plugin?

Félix

-- 
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/66a27c47-fa51-46d2-964b-cccf3be25d04n%40googlegroups.com.


LeoJS Status Update

2023-09-28 Thread Félix
拾 I've just finished implementing the last major part of LeoJS!

I'll spend the next few days doing 'cleanup' and small bugfixes before 
releasing the first beta! 

Stay tuned for a release date... Hope to have you join in the fun as a 
beta-tester! 

Félix


-- 
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/ee055a19-cb61-445c-a3ff-e1c91682e56bn%40googlegroups.com.


Re: Quick Survey: When running script in leojs, where should the 'vscode' object be accessible?

2023-09-03 Thread Félix
The script local namespace is destroyed after it's finished. 

On Sunday, September 3, 2023 at 11:16:44 PM UTC-4 tbp1...@gmail.com wrote:

> That's very nice!  What is the scope of variable defined in a script like 
> this?  For example, you wrote const userInput = await vscode where I 
> would have expected let userInput =  If the script were to be run 
> again, then *userInput* might want to take on a different value which 
> would be disallowed by the *const*.  If each script got a new namespace 
> each time it executed, though, there would be no problem.
>
> On Sunday, September 3, 2023 at 9:33:38 PM UTC-4 Félix wrote:
>
> I thought I'd share this :)
>
> Just a small example script that is possible to run in leojs, (with also 
> having the vscode API available in g.app.vscode)
>
> Incredibly, when executing the script, the global objects you'd expect to 
> see in javascript ,(console, fetch, ect...) are available, as shown below!
>
> Hoping to release a beta before the autumn starts!
> Félix
>
> @language javascript
> const vscode = g.app.vscode;
> g.es("hahahaha");
> // 'await' for doCommandByName required only if other code in script is 
> 'awaited'.
> await c.doCommandByName('insert-headline-time');
>
> const userInput = await vscode.window.showInputBox({
> placeHolder: 'Enter something', // Placeholder text in the input box
> prompt: 'Please enter some text:', // Prompt message above the input box
> });
> if (userInput === undefined) {
> g.es('User canceled the input.');
> } else {
> g.es('User input:', userInput);
> }
> try {
> const apiUrl = 'https://jsonplaceholder.typicode.com/users';
> const response = await fetch(apiUrl);
> g.es("about to call");
> if (!response.ok) {
> throw new Error('Network response was not ok');
> }
> const data = await response.json();
> g.es("got it!!", JSON.stringify(data));
> } catch (error) {
> g.es("oh no!");
> console.error('Fetch error:', error);
> }
>
> On Sunday, September 3, 2023 at 3:02:54 PM UTC-4 Félix wrote:
>
> Thanks to you both!! 
>
> g.app.vscode also felt right to me, so I'm glad this is a shared view!
>
>

-- 
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/ac661f97-3f8d-4795-bb8d-5ea4389d45ecn%40googlegroups.com.


Re: When scripting with Leo, how to call a command by name?

2023-09-03 Thread Félix
I agree, respecting existing parameter orders and signatures in general is 
very important. But making it optional does not interfere with normal 
usage. 

On Sunday, September 3, 2023 at 11:06:54 PM UTC-4 tbp1...@gmail.com wrote:

> I've never encountered or used that method.  But it's another case where I 
> would resist changing the signature of an existing command.  If it's only a 
> matter of making and argument optional, that would be more palatable.  The 
> "events" in question here are not Python things but Leo objects.  They 
> often carry the "c" parameter, for example, so the command can access it.
>
> On Sunday, September 3, 2023 at 9:24:35 PM UTC-4 Félix wrote:
>
>> Having in mind a fresh new user's perspective, I wonder if 
>> *doCommandByName*, *the method with the most intuitive name to use for 
>> such a task to perform*, could not be relatively easily modified to 
>> support not having an 'event' passed to it? 
>>
>> ...I'm not familiar with those 'events' concepts in python so I'm curious 
>> about Edwards thought on this matter. 
>>
>> Hoping it can be changed easily ! :)
>>
>> Félix
>>
>> On Sunday, September 3, 2023 at 9:13:39 PM UTC-4 tbp1...@gmail.com wrote:
>>
>>> There's also c.k.simulateCommand('name-of-command').  I'm not sure why 
>>> there are both, since they seem to do the same thing.  With either one, you 
>>> don't need to supply a fake event.  The method takes care of that. I use 
>>> whichever one I remember first.
>>>
>>> On Sunday, September 3, 2023 at 9:08:31 PM UTC-4 gates...@gmail.com 
>>> wrote:
>>>
>>>> I tend to use c.executeMinibufferCommand('name-of-command') -- doesn't 
>>>> need any extra parameters, and Just Works TM.
>>>>
>>>> Jake
>>>>
>>>> On Sun, Sep 3, 2023 at 8:41 PM Félix  wrote:
>>>>
>>>>> Making script in Leo is great, with the globally defined vars g, c and 
>>>>> p anything is possible. 
>>>>>
>>>>> But what is the recommended way of doing a simple command by name in a 
>>>>> script?
>>>>>
>>>>> The *c.doCommandByName* method exists, but it insists on having an 
>>>>> event as a second parameter. 
>>>>>
>>>>> I discovered that I can make it work by passing a fake event such as : 
>>>>> {"c": c}, or even a better one: g.app.gui.create_key_event(c),  but this 
>>>>> is 
>>>>> quite unintuitive. Could it not default to a valid default event if the 
>>>>> event is not passed?
>>>>>
>>>>> Félix
>>>>>
>>>>> -- 
>>>>> 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+...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/leo-editor/68b44f92-c2fd-403b-97aa-58fba041d366n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/leo-editor/68b44f92-c2fd-403b-97aa-58fba041d366n%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>>
>>>>

-- 
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/2bbbc804-08c4-4d1f-bd3c-5e6cdf212118n%40googlegroups.com.


Re: Quick Survey: When running script in leojs, where should the 'vscode' object be accessible?

2023-09-03 Thread Félix
I thought I'd share this :)

Just a small example script that is possible to run in leojs, (with also 
having the vscode API available in g.app.vscode)

Incredibly, when executing the script, the global objects you'd expect to 
see in javascript ,(console, fetch, ect...) are available, as shown below!

Hoping to release a beta before the autumn starts!
Félix

@language javascript
const vscode = g.app.vscode;
g.es("hahahaha");
// 'await' for doCommandByName required only if other code in script is 
'awaited'.
await c.doCommandByName('insert-headline-time');

const userInput = await vscode.window.showInputBox({
placeHolder: 'Enter something', // Placeholder text in the input box
prompt: 'Please enter some text:', // Prompt message above the input box
});
if (userInput === undefined) {
g.es('User canceled the input.');
} else {
g.es('User input:', userInput);
}
try {
const apiUrl = 'https://jsonplaceholder.typicode.com/users';
const response = await fetch(apiUrl);
g.es("about to call");
if (!response.ok) {
throw new Error('Network response was not ok');
}
const data = await response.json();
g.es("got it!!", JSON.stringify(data));
} catch (error) {
g.es("oh no!");
console.error('Fetch error:', error);
}

On Sunday, September 3, 2023 at 3:02:54 PM UTC-4 Félix wrote:

> Thanks to you both!! 
>
> g.app.vscode also felt right to me, so I'm glad this is a shared view!
>
> Félix
>
> On Sunday, September 3, 2023 at 7:10:10 AM UTC-4 Edward K. Ream wrote:
>
>> On Sat, Sep 2, 2023 at 8:49 PM Félix  wrote:
>>
>>> Not sure what to decide for this so I thought of doing this quick 
>>> survey! :)
>>>
>>> When running scripts, (CTRL+B) Leo offers the g, c and p variables. I 
>>> obviously want to expose the vscode API from it's base object "vscode".
>>>
>>> Should it be top-level along with c, g and p? or, be located at:
>>>
>>> g.vscode
>>>
>>> or 
>>>
>>> g.app.vscode
>>>
>>
>> Interesting question. All three choices, vscode, g.vscode and 
>> g.app.vscode are feasible.
>>
>> g.vscode seems like the worst choice.
>>
>> I tend to agree with Thomas. g.app.vscode is most explicit. Furthermore, 
>> g.app is likely the best place for a "pointer" to vscode.
>>
>> A default/automatic binding to vscode doesn't seem like it would be all 
>> that useful. Any code can bind vscode to g.app.vscode easily enough. I 
>> might change my mind if you envision scenarios in which there are *lots* 
>> of usages of g.app.vscode.
>>
>> 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/d2c14762-f894-4879-897c-6313c7ffb92bn%40googlegroups.com.


Re: When scripting with Leo, how to call a command by name?

2023-09-03 Thread Félix
Having in mind a fresh new user's perspective, I wonder if *doCommandByName*, 
*the method with the most intuitive name to use for such a task to perform*, 
could not be relatively easily modified to support not having an 'event' 
passed to it? 

...I'm not familiar with those 'events' concepts in python so I'm curious 
about Edwards thought on this matter. 

Hoping it can be changed easily ! :)

Félix

On Sunday, September 3, 2023 at 9:13:39 PM UTC-4 tbp1...@gmail.com wrote:

> There's also c.k.simulateCommand('name-of-command').  I'm not sure why 
> there are both, since they seem to do the same thing.  With either one, you 
> don't need to supply a fake event.  The method takes care of that. I use 
> whichever one I remember first.
>
> On Sunday, September 3, 2023 at 9:08:31 PM UTC-4 gates...@gmail.com wrote:
>
>> I tend to use c.executeMinibufferCommand('name-of-command') -- doesn't 
>> need any extra parameters, and Just Works TM.
>>
>> Jake
>>
>> On Sun, Sep 3, 2023 at 8:41 PM Félix  wrote:
>>
>>> Making script in Leo is great, with the globally defined vars g, c and p 
>>> anything is possible. 
>>>
>>> But what is the recommended way of doing a simple command by name in a 
>>> script?
>>>
>>> The *c.doCommandByName* method exists, but it insists on having an 
>>> event as a second parameter. 
>>>
>>> I discovered that I can make it work by passing a fake event such as : 
>>> {"c": c}, or even a better one: g.app.gui.create_key_event(c),  but this is 
>>> quite unintuitive. Could it not default to a valid default event if the 
>>> event is not passed?
>>>
>>> Félix
>>>
>>> -- 
>>> 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+...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/leo-editor/68b44f92-c2fd-403b-97aa-58fba041d366n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/leo-editor/68b44f92-c2fd-403b-97aa-58fba041d366n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>

-- 
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/9e30bbb4-3ade-4167-8343-1dcbabcd7fc3n%40googlegroups.com.


When scripting with Leo, how to call a command by name?

2023-09-03 Thread Félix
Making script in Leo is great, with the globally defined vars g, c and p 
anything is possible. 

But what is the recommended way of doing a simple command by name in a 
script?

The *c.doCommandByName* method exists, but it insists on having an event as 
a second parameter. 

I discovered that I can make it work by passing a fake event such as : 
{"c": c}, or even a better one: g.app.gui.create_key_event(c),  but this is 
quite unintuitive. Could it not default to a valid default event if the 
event is not passed?

Félix

-- 
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/68b44f92-c2fd-403b-97aa-58fba041d366n%40googlegroups.com.


Re: Quick Survey: When running script in leojs, where should the 'vscode' object be accessible?

2023-09-03 Thread Félix
Thanks to you both!! 

g.app.vscode also felt right to me, so I'm glad this is a shared view!

Félix

On Sunday, September 3, 2023 at 7:10:10 AM UTC-4 Edward K. Ream wrote:

> On Sat, Sep 2, 2023 at 8:49 PM Félix  wrote:
>
>> Not sure what to decide for this so I thought of doing this quick survey! 
>> :)
>>
>> When running scripts, (CTRL+B) Leo offers the g, c and p variables. I 
>> obviously want to expose the vscode API from it's base object "vscode".
>>
>> Should it be top-level along with c, g and p? or, be located at:
>>
>> g.vscode
>>
>> or 
>>
>> g.app.vscode
>>
>
> Interesting question. All three choices, vscode, g.vscode and g.app.vscode 
> are feasible.
>
> g.vscode seems like the worst choice.
>
> I tend to agree with Thomas. g.app.vscode is most explicit. Furthermore, 
> g.app is likely the best place for a "pointer" to vscode.
>
> A default/automatic binding to vscode doesn't seem like it would be all 
> that useful. Any code can bind vscode to g.app.vscode easily enough. I 
> might change my mind if you envision scenarios in which there are *lots* 
> of usages of g.app.vscode.
>
> 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/b2c84462-5890-4b3d-89d9-ef2c0fe43468n%40googlegroups.com.


Quick Survey: When running script in leojs, where should the 'vscode' object be accessible?

2023-09-02 Thread Félix
Not sure what to decide for this so I thought of doing this quick survey! :)

When running scripts, (CTRL+B) Leo offers the g, c and p variables. I 
obviously want to expose the vscode API from it's base object "vscode".

Should it be top-level along with c, g and p? or, be located at:

g.vscode

or 

g.app.vscode

Thanks! 

Félix

-- 
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/676b6211-42bf-4f51-bd48-f9b513ee3d5cn%40googlegroups.com.


Help needed with understanding @others vs @all directives

2023-09-02 Thread Félix
Hi all! :)

I've never used the @all directive and I'd like to test it properly with 
both Leo and LeoJS.

If you happen to be familiar with those two directives, would you be kind 
enough to make a Leo file that showcases one or two @file nodes that 'demo' 
the usage (and difference in output) those two directives can produce?

*(the documentation talk about a '"leoProjects.txt" file that would show 
the usage but it's not part of Leo anymore from what I can see)*

I would need a small (smallest possible content that still shows the 
principle of the directives in question) sample Leo file that showcases 
those two directives.

Thanks to whoever reads this and decides to make such a file and upload it 
in his response! 

Félix

-- 
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/1ebad0f0-c007-4314-9012-83f2120a597dn%40googlegroups.com.


Re: Leointeg - A beginner fumbles!

2023-08-31 Thread Félix
Edward, 

This sounds good. I'll incorporate the latest completed items of 6.7.5 in 
leojs no problem at all  - I think I already did a few actually :) 

Also, I have no problem with a release of  6.7.5 in the time frame that you 
suggested. 

Félix

On Thursday, August 31, 2023 at 6:17:44 AM UTC-4 Edward K. Ream wrote:

> On Wednesday, August 30, 2023 at 8:29:06 PM UTC-5 Félix wrote:
>
> But hold on to your hats, LeoInteg is insignificant compared to LeoJS!  
> (Coming soon!)
>
>
> That's great news!
>
> Do you want to include the completed 6.7.5 items 
> <https://github.com/leo-editor/leo-editor/issues?q=is%3Aissue+milestone%3A6.7.5+is%3Aclosed>
>  
> in the first release of leoJS? It's totally up to you. Otoh, the new python 
> importer is way cool, hehe.
>
> And another question. I'm considering releasing 6.7.5 in about two weeks. 
> All the remaining open items are on hold until after leoJS. What do you 
> think?
>
> 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/39a950b5-3fb9-4b0d-b0bf-3458d4476e45n%40googlegroups.com.


Re: Leointeg - A beginner fumbles!

2023-08-30 Thread Félix
Thanks for the kind words to both of you! Really appreciated!!

But hold on to your hats, LeoInteg is insignificant compared to LeoJS!  
(Coming soon!)

Félix


On Wednesday, August 30, 2023 at 1:37:54 PM UTC-4 tbp1...@gmail.com wrote:

> On Wednesday, August 30, 2023 at 10:13:56 AM UTC-4 Israel Hands wrote:
>
> I've been trying to get my sons on board for ever but one is a hard core C 
> guy 
>
>
> Have you seen Speed Ream's writeup about how his company uses Leo and gets 
> ~30% productivity improvement (C, C++, and assembler)?  It's over 20 years 
> old but still tantalizing -
>
> Speed Ream's testimonial 
> <https://leo-editor.github.io/leo-editor/testimonials.html#speed-ream-s-slashdot-article>
>

-- 
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/0b7a32aa-ee05-4643-8e77-21b979213e59n%40googlegroups.com.


Re: LeoInteg Log Pane Apps

2023-08-21 Thread Félix
Thanks for your comment and suggestion! 

I've thought of a way to enable the concept of 'expansions/plugins' for 
leointeg and leojs. I'll post a more detailed message giving details about 
this in the next few weeks.

Félix

On Monday, August 21, 2023 at 2:55:59 PM UTC-4 tbp1...@gmail.com wrote:

> I have posted here about several apps I've written that display in the log 
> pane, including my browser bookmarks manager, the current version of the 
> Viewrended3 plugin (which can optionally display in the log pane), and the 
> RPCalc plugin. Most of them interact with with Leo's tree.  They are 
> basically Python scripts that may or may not import from external files.  
> Some of them have become nearly indispensable to me. 
>
> These apps are PyQt applications, with PyQt components provided much of 
> the Gui displayed in the log pane.
>
> I'd like to find out how to wire up scripts to do the equivalent in 
> LeoInteg, or if it's reasonably feasible.
>

-- 
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/8b089a9f-ca44-45fd-a6a8-b75d54b26694n%40googlegroups.com.


Re: Leo 6.7.4 released

2023-08-17 Thread Félix
 拾 Hurray!!    

On Thursday, August 17, 2023 at 2:14:16 PM UTC-4 Edward K. Ream wrote:

> On Thu, Aug 17, 2023 at 1:12 PM Edward K. Ream wrote:
>
>> Leo https://leo-editor.github.io/leo-editor/ 6.7.4 is now available on 
>> GitHub  and pypi 
>> .
>>
>
> I'll delay more public announcements until Monday. Please continue your 
> testing ;-)
>
> 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/f2e1e0bd-3540-4d82-93eb-e8fdd813b245n%40googlegroups.com.


Re: ENB: Ahas re paste-retaining-clones

2023-08-13 Thread Félix
Edward, I also want to join my voice to the group in wishing you a happy 
birthday! :D

So Happy Birthday, Edward! 

Another year older, but your programming prowess keeps getting younger!
Cheers to you and the adventures your code will take us on! 

Félix

On Sunday, August 13, 2023 at 2:31:58 PM UTC-4 Edward K. Ream wrote:

> On Sun, Aug 13, 2023 at 1:10 PM Thomas Passin  wrote:
>
>> Best wishes on your birthday  from this quarter, too!
>>
>
> :-)
>
> 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/9a2985f3-e8d3-433b-b206-149431374fc8n%40googlegroups.com.


Re: Leo 6.7.4 due Friday, August 18

2023-08-09 Thread Félix
hehe, Don't be so hard on yourself ;) 

the previous behavior was not 'buggy' per say, just that the nodes in the 
outline have priority over pasted nodes when their gnx matches, when 
'retaining' clones, where the opposite would be preferred. (having the 
pasted nodes have priority) 

Félix



On Wednesday, August 9, 2023 at 3:40:08 PM UTC-4 Edward K. Ream wrote:

> I have pushed back the release date for Leo 6.7.4 yet again to allow more 
> time for testing.
>
> PR #3484 <https://github.com/leo-editor/leo-editor/pull/3484> (merged 
> into devel) restores the paste-retaining-clones command to its previous 
> (buggy) state. A complete fix must wait until 6.7.5.
>
> Expect no more significant changes to Leo's code base in this release 
> cycle.
>
> Please continue to test the devel and 6.7.4 branches. Thanks.
>
> 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/8ff4153f-3430-4209-8969-dcb1c931be6dn%40googlegroups.com.


Re: ENB: How to mimic Python's overriding of the dunder methods in typescript.

2023-08-04 Thread Félix
Lastly, an even better optimization: I'll conclude this by showing how to 
be used even more specifically like the class I'm trying to implement, 
Here's a version where the object itself is the handler, along with it's 
target! Therefore returning *new Proxy(this, this)*; as the only line of 
the constructor! 

class MyClass {
  data = {};

  constructor() {
return new Proxy(this, this);
  }

  get(target, prop) {
prop = prop.toString();
console.log(`Getting property: ${prop}`);
if(prop==="toString"){
  return this.toString.bind(target);
}
if(prop==='valueOf'){
  return this.valueOf.bind(target);
}
if(prop==="Symbol(Symbol.iterator)"){
  return this[Symbol.iterator].bind(target);
}
return this.data[prop];
  }

  set(target, prop, value) {
console.log(`Setting property: ${prop.toString()} to ${value}`);
this.data[prop] = value;
return true;
  }

  deleteProperty(target, prop) {
console.log(`Deleting property: ${prop.toString()}`);
delete this.data[prop.toString()];
return true;
  }

  has(target, prop) {
console.log(`Checking property presence: ${prop.toString()}`);
return prop in this.data;
  }

  valueOf() {
return 'running valueOf: ' + JSON.stringify(this.data);
  }
  toString() {
return 'running tostring:' + JSON.stringify(this.data);
  }

  *[Symbol.iterator]() {
for (const key in this.data) {
  console.log('called iterator!');
  yield [key, this.data[key]];
}
  }

}

 
Hope sharing this will help someone! :D

Félix


On Friday, August 4, 2023 at 9:55:32 PM UTC-4 Félix wrote:

> Oops: corrected the typo in the example!
> class MyClass {
>   data = {};
>
>   constructor() {
> return new Proxy(this, {
>   get(target, prop) {
> prop = prop.toString();
> console.log(`Getting property: ${prop}`);
> if(prop==="toString"){
>   return target.toString.bind(target);
> }
> if(prop==='valueOf'){
>   return target.valueOf.bind(target);
> }
> if(prop==="Symbol(Symbol.iterator)"){
>   return target[Symbol.iterator].bind(target);
> }
> return target.data[prop];
>   },
>   set(target, prop, value) {
> console.log(`Setting property: ${prop.toString()} to ${value}`);
> target.data[prop] = value;
> return true;
>   },
>   deleteProperty(target, prop) {
> console.log(`Deleting property: ${prop.toString()}`);
> delete target.data[prop.toString()];
> return true;
>   },
>   has(target, prop) {
> console.log(`Checking property presence: ${prop.toString()}`);
> return prop in target.data;
>   },
> });
>   }
>
>   valueOf() {
> return 'running valueOf: ' + JSON.stringify(this.data);
>   }
>   toString() {
> return 'running tostring:' + JSON.stringify(this.data);
>   }
>
>   *[Symbol.iterator]() {
> for (const key in this.data) {
>   console.log('called iterator!');
>   yield [key, this.data[key]];
> }
>   }
>
> }
>
> const obj = new MyClass();
> obj['key'] = 'value'; // Setting property: key to value
> console.log("testing setting and getting 'key'");
> console.log(obj['key']); // Getting property: key, value
> delete obj['key']; // Deleting property: key
> console.log("deleted, should be false: ")
> console.log('key' in obj); // Checking property presence: key, false
>
> console.log("testing toString ")
> obj['key3'] = 'value1';
> obj['key4'] = 'value2';
> console.log(obj.toString()); // {"key1":"value1","key2":"value2"}
>
> console.log("testing Symbol.iterator");
> for (const [key, value] of obj) {
>   console.log(`${key}: ${value}`);
> }
> On Friday, August 4, 2023 at 9:53:24 PM UTC-4 Félix wrote:
>
>> Dunder methods being (unexhaustive list) : *__contains__, __delitem__, 
>> __getitem__, __setitem__, __iter__ and __repr__* in my case.
>>
>> Using javascript little-known 'Proxy object', and passing itself as the 
>> target, it's possible  to implement the equivalent of Leo's 
>> SqlitePickleShare class!
>>
>> *simple proof-of-concept below where it just mimics a dummy dict. 
>> Customize as needed for other behaviors!*
>>
>> Félix 
>>
>> class MyClass {
>>   data = {};
>>
>>   constructor() {
>> return new Proxy(this, {
>>   get(target, prop) {
>> prop = prop.toString();
>> console.log(`Getting property: ${prop}`);
>> if(prop==="toString"){
>>   return ta

Re: ENB: How to mimic Python's overriding of the dunder methods in typescript.

2023-08-04 Thread Félix
Oops: corrected the typo in the example!
class MyClass {
  data = {};

  constructor() {
return new Proxy(this, {
  get(target, prop) {
prop = prop.toString();
console.log(`Getting property: ${prop}`);
if(prop==="toString"){
  return target.toString.bind(target);
}
if(prop==='valueOf'){
  return target.valueOf.bind(target);
}
if(prop==="Symbol(Symbol.iterator)"){
  return target[Symbol.iterator].bind(target);
}
return target.data[prop];
  },
  set(target, prop, value) {
console.log(`Setting property: ${prop.toString()} to ${value}`);
target.data[prop] = value;
return true;
  },
  deleteProperty(target, prop) {
console.log(`Deleting property: ${prop.toString()}`);
delete target.data[prop.toString()];
return true;
  },
  has(target, prop) {
console.log(`Checking property presence: ${prop.toString()}`);
return prop in target.data;
  },
});
  }

  valueOf() {
return 'running valueOf: ' + JSON.stringify(this.data);
  }
  toString() {
return 'running tostring:' + JSON.stringify(this.data);
  }

  *[Symbol.iterator]() {
for (const key in this.data) {
  console.log('called iterator!');
  yield [key, this.data[key]];
}
  }

}

const obj = new MyClass();
obj['key'] = 'value'; // Setting property: key to value
console.log("testing setting and getting 'key'");
console.log(obj['key']); // Getting property: key, value
delete obj['key']; // Deleting property: key
console.log("deleted, should be false: ")
console.log('key' in obj); // Checking property presence: key, false

console.log("testing toString ")
obj['key3'] = 'value1';
obj['key4'] = 'value2';
console.log(obj.toString()); // {"key1":"value1","key2":"value2"}

console.log("testing Symbol.iterator");
for (const [key, value] of obj) {
  console.log(`${key}: ${value}`);
}



On Friday, August 4, 2023 at 9:53:24 PM UTC-4 Félix wrote:

> Dunder methods being (unexhaustive list) : *__contains__, __delitem__, 
> __getitem__, __setitem__, __iter__ and __repr__* in my case.
>
> Using javascript little-known 'Proxy object', and passing itself as the 
> target, it's possible  to implement the equivalent of Leo's 
> SqlitePickleShare class!
>
> *simple proof-of-concept below where it just mimics a dummy dict. 
> Customize as needed for other behaviors!*
>
> Félix 
>
> class MyClass {
>   data = {};
>
>   constructor() {
> return new Proxy(this, {
>   get(target, prop) {
> prop = prop.toString();
> console.log(`Getting property: ${prop}`);
> if(prop==="toString"){
>   return target.toString.bind(target);
> }
> if(prop==='valueOf'){
>   return target.toString.bind(target);
> }
> if(prop==="Symbol(Symbol.iterator)"){
>   return target[Symbol.iterator].bind(target);
> }
> return target.data[prop];
>   },
>   set(target, prop, value) {
> console.log(`Setting property: ${prop.toString()} to ${value}`);
> target.data[prop] = value;
> return true;
>   },
>   deleteProperty(target, prop) {
> console.log(`Deleting property: ${prop.toString()}`);
> delete target.data[prop.toString()];
> return true;
>   },
>   has(target, prop) {
> console.log(`Checking property presence: ${prop.toString()}`);
> return prop in target.data;
>   },
> });
>   }
>
>   valueOf() {
> return 'running valueOf: ' + JSON.stringify(this.data);
>   }
>   toString() {
> return 'running tostring:' + JSON.stringify(this.data);
>   }
>
>   *[Symbol.iterator]() {
> for (const key in this.data) {
>   console.log('called iterator!');
>   yield [key, this.data[key]];
> }
>   }
>
> }
>
> const obj = new MyClass();
> obj['key'] = 'value'; // Setting property: key to value
> console.log("testing setting and getting 'key'");
> console.log(obj['key']); // Getting property: key, value
> delete obj['key']; // Deleting property: key
> console.log("deleted, should be false: ")
> console.log('key' in obj); // Checking property presence: key, false
>
> console.log("testing toString ")
> obj['key3'] = 'value1';
> obj['key4'] = 'value2';
> console.log(obj.toString()); // {"key1":"value1","key2":"value2"}
>
> console.log("testing Symbol.iterator");
> for (const [key, value] of obj) {
>   console.log(`${key}: ${value}`);
> }
>

-- 
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/f0795853-0703-4544-a5aa-ce47d9f0a092n%40googlegroups.com.


ENB: How to mimic Python's overriding of the dunder methods in typescript.

2023-08-04 Thread Félix
Dunder methods being (unexhaustive list) : *__contains__, __delitem__, 
__getitem__, __setitem__, __iter__ and __repr__* in my case.

Using javascript little-known 'Proxy object', and passing itself as the 
target, it's possible  to implement the equivalent of Leo's 
SqlitePickleShare class!

*simple proof-of-concept below where it just mimics a dummy dict. Customize 
as needed for other behaviors!*

Félix 

class MyClass {
  data = {};

  constructor() {
return new Proxy(this, {
  get(target, prop) {
prop = prop.toString();
console.log(`Getting property: ${prop}`);
if(prop==="toString"){
  return target.toString.bind(target);
}
if(prop==='valueOf'){
  return target.toString.bind(target);
}
if(prop==="Symbol(Symbol.iterator)"){
  return target[Symbol.iterator].bind(target);
}
return target.data[prop];
  },
  set(target, prop, value) {
console.log(`Setting property: ${prop.toString()} to ${value}`);
target.data[prop] = value;
return true;
  },
  deleteProperty(target, prop) {
console.log(`Deleting property: ${prop.toString()}`);
delete target.data[prop.toString()];
return true;
  },
  has(target, prop) {
console.log(`Checking property presence: ${prop.toString()}`);
return prop in target.data;
  },
});
  }

  valueOf() {
return 'running valueOf: ' + JSON.stringify(this.data);
  }
  toString() {
return 'running tostring:' + JSON.stringify(this.data);
  }

  *[Symbol.iterator]() {
for (const key in this.data) {
  console.log('called iterator!');
  yield [key, this.data[key]];
}
  }

}

const obj = new MyClass();
obj['key'] = 'value'; // Setting property: key to value
console.log("testing setting and getting 'key'");
console.log(obj['key']); // Getting property: key, value
delete obj['key']; // Deleting property: key
console.log("deleted, should be false: ")
console.log('key' in obj); // Checking property presence: key, false

console.log("testing toString ")
obj['key3'] = 'value1';
obj['key4'] = 'value2';
console.log(obj.toString()); // {"key1":"value1","key2":"value2"}

console.log("testing Symbol.iterator");
for (const [key, value] of obj) {
  console.log(`${key}: ${value}`);
}

-- 
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/4d3d4bc5-2175-4bb1-a72a-2496082763d8n%40googlegroups.com.


leojs status report

2023-08-01 Thread Félix
Just a quick post to say 'hi!' while I'm coding leojs, and to mention that 
I was overjoyed that I've got sqlite working on both the desktop -and- web 
version of vscode! (with web-assembly!)

So .db file support will soon be available!  *along with the regular .leo 
(XMLfiles) and leojs (JSON files) file formats already supported...*

The only two other things I'd like to do before releasing a first beta 
version is to finish implementing that .db file support just mentioned, 
and, a few importers... (let's say python, typescript/javascript and c)

So, I guess I'm still on track to release it during the summer! :D 

Félix


-- 
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/33809e9a-52d3-4be9-936f-abb64f9fabcen%40googlegroups.com.


Re: Leo 6.7.4 will be delayed for at least a week.

2023-07-20 Thread Félix
The issue was created right after we 
spoke: https://github.com/leo-editor/leo-editor/issues/3446 
But it's *not about undo/redo: It's about paste-as-clone, *which is bugged. 
(the inner clones of subtrees are not clones after pasting - as opposed to 
paste-as-template which seems to work fine)

the undo/redo of "arbitrary treeChanges" is another thing, which I'll 
implement right after this issue is solved.

Félix

On Thursday, July 20, 2023 at 5:52:41 AM UTC-4 Edward K. Ream wrote:

> Félix has discovered a serious undo bug that has been around for years. 
> That's good because it means my recent work is not the culprit :-)
>
>
> His fix creates a way of undoing/redoing arbitrary changes to trees.
>
>
> Félix has also convinced me that commands like refresh-from-disk should be 
> undoable. These commands will use his new undo/redo scheme. 
>
>
> *Summary*
>
>
> Félix will soon create a new issue that describes a significant bug and 
> its fix. The fix will show how to undo changes throughout a tree.
>
>
> Commands such as refresh-from-disk will soon be undoable.
>
>
> These changes will be part of Leo 6.7.4.
>
>
> 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/91bf7ed6-3352-4bee-a482-ac0a4763bc8bn%40googlegroups.com.


Re: ENB: big problems with undo/redo tree operations

2023-07-13 Thread Félix
There's no shame in having big data-changing commands not be undoable! Big 
software packages often have such commands!

On the other hand, it should be somewhat indicated when an action is not 
undoable. (perhaps add "This action is not undoable" in the string where 
the user is asked about refreshing from disk when an external file change 
is detected. idem for when an opened .leo file changes, and other 
non-undoable actions, when possible.) 

But the most important thing is to* wipe clear the undo stack when such an 
action occurs*, as undoing past an non-undoable action will corrupt the 
logical integrity and state of the outline with nonsensical structures and 
content. (as all other big software that i know also do as a standard)

Félix

On Thursday, July 13, 2023 at 12:53:17 PM UTC-4 Edward K. Ream wrote:

> On Thursday, July 13, 2023 at 8:57:57 AM UTC-5 Edward K. Ream wrote:
>
> On Thu, Jul 13, 2023 at 7:49 AM Edward K. Ream  wrote:
>
> > On second thought, *none of *[the git-diff commands] *need to be 
> undoable*.
>
>
> Otoh, undoing an accidental abbreviation is essential. It's the only hard 
> case, but I am confident that u.before/afterChangeGroup can do the job.
>
> 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/ce022749-26f3-4810-85f7-769a842c2f1an%40googlegroups.com.


Why does leo asks to restart when a .leo file modification is detected? (instead of asking to reload the file?)

2023-06-28 Thread Félix
Exactly as per the subject line, I'm wondering why does Leo asks to restart 
when a .leo file modification is detected? Instead of asking to reload the 
file?

I feel like I asked this question in the past and I cant remember the 
reason, ...but I searched this google-group for 'restart' and I couldn't 
find anything... so i just posted this

Thanks for anyone who can enlighten me about this :)

Félix

-- 
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/45396e60-a3d7-44e1-b75f-76ce7ecb4bb0n%40googlegroups.com.


Execute-script in leojs

2023-06-26 Thread Félix
People have asked about live scripting in leojs in the past (cant remember 
who exactly, perhaps Thomas, but I'm not sure)

That person inquired about javascript live scripting execution in leojs 
possibility.. along with the global Leo variables that are expected to be 
in the global script namespace / scope, such as g, p, c.

Not only is it possible, but I can now say it works perfectly fine, and, 
I've added the global *vscode* object  (see the screenshot, and check the 
lower right corner of that screenshot) I might also add two or three more 
global objects. (for the most common/useful libraries)

As I'm polishing and removing the last small bugs before release, I've had 
lots of fun trying this out!

[image: script with vscode global.png]

Félix

-- 
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/3d43390d-d1a2-4cb4-92ef-71af25e65e0dn%40googlegroups.com.


Re: leojs alpha

2023-06-26 Thread Félix
haha! don't worry - Leo is Leo and LeoJS is it's own thing :) 

But who knows what the future holds for Leo, LeoInteg and LeoJS?

Thanks again for your input! People's ideas and suggestions on this forum 
are what fueled my motivation to code all of this!

Félix

On Monday, June 26, 2023 at 3:38:56 PM UTC-4 jkn wrote:

> Hi Félix
>
> Thanks for the extra information. That does sound like a lot of work, I 
> (too) am impressed with your dedication. But I agree with Thomas that 
> maintaining two codebases in sync is probably and impossible job in 
> practice.
>
> I would kinda-hate Leo to end up as a javascript (/typescript) app instead 
> of a Python one ... but I am also very interested in seeing the results. I 
> will try to be a beta tester for you ;-)
>
> Regards, J^n
>
> On Monday, June 26, 2023 at 7:14:36 PM UTC+1 Félix wrote:
>
>> Hi jkn! :D
>>
>> Thanks for your interest and questions! 
>>
>> I've translated/transliterated (not sure which is appropriate!) about 99% 
>> myself manually, and I've used chatGPT for small parts (e.g. some regular 
>> expressions, some small quirky methods) which I would estimate to be 1% of 
>> the code. (anyways - from 2021 to early 2023 chatGPT did not even exist!)
>>
>> Even then, the parts translated with AI had to be manually inspected and 
>> tested. (I've played a lot with chatGPT translations from python to 
>> typescript and it does not account for subtle details in some "almost 
>> identical" native functions, which inevitably break the intended behavior) 
>> In fact, the more important and subtle a detail is, the more likely it is 
>> that AI will ignore it. (which may even compile and run in normal cases, 
>> but break in edge/extreme cases)
>>
>> For example, regex (Leo uses those a lot in critical places) have subtle 
>> differences in the usage of 'flags' such as 'm' or 'g' in python vs 
>> javascript, which will totally fail if not taken into account.
>>
>> So it's really risky to use AI for translation. (if not thoroughly 
>> inspected and tested) 
>>
>> About the 'upstream' work on Leo - I did the oldest, less likely to 
>> change code first. Also, I have not done the importers yet, nor the unl 
>> support, which happen to be re-written or changed in the last few weeks 
>> hehe !
>>
>>  For other stuff that changed, I try to keep up by collaborating with 
>> Edward to change Leojs & match Leo's changes as quickly as possible, as to 
>> not fall to much behind.
>>
>> I look in the commit history and diffs with tools in gitlens (vscode 
>> extension) to keep up with the changes and modify leojs as much as possible.
>>
>> I usually work on implementing stuff for 2-3 weeks ,and then spend a week 
>> to catch up with what was updated by Edward (if it happens to be on stuff 
>> already in leojs). 
>>
>> Thanks for your support and curiosity! Best to you - Hope you'll be 
>> testing & reporting bugs when I release the first beta in a few days (or 
>> weeks)!  ;)
>>
>> Félix
>>
>>
>> On Monday, June 26, 2023 at 10:09:17 AM UTC-4 jkn wrote:
>>
>>> Hi Felix - something I've missed in the exciting mentions re. leojs 
>>> here. Is the 'transliteration' done manually ('after coding for a few 
>>> years'...) or via some (semi'?)-automated process?
>>>
>>> If the former, I'm wondering how 'upstream' work on Leo gets 
>>> incorporated. If the latter, I'm curious about the process...
>>>
>>> Thanks & Regards, J^n
>>>
>>>
>>> On Sunday, June 25, 2023 at 7:47:30 PM UTC+1 Félix wrote:
>>>
>>>> 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/86ade383-c241-4b81-892f-4a79d6528cd6n%40googlegroups.com.


Re: leojs alpha

2023-06-26 Thread Félix
Hi jkn! :D

Thanks for your interest and questions! 

I've translated/transliterated (not sure which is appropriate!) about 99% 
myself manually, and I've used chatGPT for small parts (e.g. some regular 
expressions, some small quirky methods) which I would estimate to be 1% of 
the code. (anyways - from 2021 to early 2023 chatGPT did not even exist!)

Even then, the parts translated with AI had to be manually inspected and 
tested. (I've played a lot with chatGPT translations from python to 
typescript and it does not account for subtle details in some "almost 
identical" native functions, which inevitably break the intended behavior) 
In fact, the more important and subtle a detail is, the more likely it is 
that AI will ignore it. (which may even compile and run in normal cases, 
but break in edge/extreme cases)

For example, regex (Leo uses those a lot in critical places) have subtle 
differences in the usage of 'flags' such as 'm' or 'g' in python vs 
javascript, which will totally fail if not taken into account.

So it's really risky to use AI for translation. (if not thoroughly 
inspected and tested) 

About the 'upstream' work on Leo - I did the oldest, less likely to change 
code first. Also, I have not done the importers yet, nor the unl support, 
which happen to be re-written or changed in the last few weeks hehe !

 For other stuff that changed, I try to keep up by collaborating with 
Edward to change Leojs & match Leo's changes as quickly as possible, as to 
not fall to much behind.

I look in the commit history and diffs with tools in gitlens (vscode 
extension) to keep up with the changes and modify leojs as much as possible.

I usually work on implementing stuff for 2-3 weeks ,and then spend a week 
to catch up with what was updated by Edward (if it happens to be on stuff 
already in leojs). 

Thanks for your support and curiosity! Best to you - Hope you'll be testing 
& reporting bugs when I release the first beta in a few days (or weeks)!  ;)

Félix


On Monday, June 26, 2023 at 10:09:17 AM UTC-4 jkn wrote:

> Hi Felix - something I've missed in the exciting mentions re. leojs here. 
> Is the 'transliteration' done manually ('after coding for a few years'...) 
> or via some (semi'?)-automated process?
>
> If the former, I'm wondering how 'upstream' work on Leo gets incorporated. 
> If the latter, I'm curious about the process...
>
> Thanks & Regards, J^n
>
>
> On Sunday, June 25, 2023 at 7:47:30 PM UTC+1 Félix wrote:
>
>> 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/e5a888a6-326c-4f3b-aba9-233a5c78e9e9n%40googlegroups.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: expected behavior for removing spaces before lines outputed by an indented '@others'

2023-06-24 Thread Félix
Very good. 

yes indeed, I dont want to modify the algorithm, and I also see advantages 
to the current behavior.  (which i didn't take time to mention in the posts 
above)

  But in essence, as I was making sure leojs was behaving properly, i 
thought i'd ask if this is working as expected in Leo as per the Bernhard 
Mulder algorithm. (because i'm getting the same behavior in leojs - meaning 
i translated properly , hehe ) and that the algorithm was not 
mistakenly/accidentally changed in the last few years - thus, that this is 
the intended, original behavior of the Bernhard Mulder algorithm.

Thanks for your explanations, hope i cleared the confusion that I may have 
started by not being explicit enough in my original inquiry from my above 
posts.

Félix




On Saturday, June 24, 2023 at 7:08:23 AM UTC-4 Edward K. Ream wrote:

> On Saturday, June 24, 2023 at 5:54:02 AM UTC-5 Edward K. Ream wrote:
>
> >> What is the expected behavior when I remove the indentation of the line 
> produced by the @others in the external file, and save it as such to be 
> picked-up by Leo and have it refresh that outline from file?
>
> >Imo, there  is no "intention" involved. You'll get what the @clean update 
> algorithm gives you. That algorithm isn't going to change.
>
> Many years ago, when Bernhard Mulder first proposed @shadow, I hesitated 
> to adopt his proposal because I didn't realize that it didn't matter if the 
> update algorithm made slight "mistakes". That is, there is no way, in 
> principle, for the update algorithm to assign a line to the "proper" node 
> if that line could be assigned either to the end of one node or the 
> beginning of the following node. At last I understood that:
>
> 1. Writing the @shadow tree would create the same result either way.
> 2. The user could put the line in the "proper" node if they liked.
> Thereafter Leo would always put the line where it belongs.
>
> Similar remarks apply to @clean. The user can always adjust nodes, 
> including @others directives, as they like.  In short, edge cases involving 
> @others don't matter.
>
> 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/bd9656cc-6ee5-4a96-b287-2a8ec8ce613bn%40googlegroups.com.


Re: expected behavior for removing spaces before lines outputed by an indented '@others'

2023-06-23 Thread Félix
Yes. This inquiry only concerns @clean, not @file. 

When being refreshed from file after unindenting a line coming from an 
indented @others node, I would have expected the first line encountered (*being 
unindented past the indentation of it's originator @other node*), to be 
considered the first line to be *after* the @other node content. (as it 
cannot be from the original indented @other node, therefore it should be 
seen as a new content for after the @other directive. (along with all it's 
following lines in that node's output).

A 'ctrl+s' following that refreshing does not trigger it being re-written, 
as leo seems to consider this not being a 'dirty' state... so that behavior 
does not have an explicit apparent drawback.. but it's still there! hehe...

And so i'm wondering if it's the intended behavior..., and so I thought I'd 
ask people in this forum about their thoughts on that matter :)

Félix



On Friday, June 23, 2023 at 5:04:47 PM UTC-4 tbp1...@gmail.com wrote:

> Oh, I see.  If it's an external file with sentinels it could be tricky 
> because you'd have to unindent the correct block the right amount, 
> sentinels and all.  I just succeeded  with an @file tree, but it would be 
> easy to mess it up.  I converted the file to an @clean file and when I 
> unindented the line in the external file that was in the @others subtree (I 
> mean using an external editor), the "@others" line in the Leo outline did 
> not get unindented as one would expect.
>
> Tricky!
>
> On Friday, June 23, 2023 at 4:44:36 PM UTC-4 Félix wrote:
>
>> Thank, but the unexpected behavior I tried to verify is when* removing 
>> the indentation in the external file itself externally*  (with a file 
>> editor of your choice) and then saving it, to have Leo refresh it from file 
>> by answering 'yes' to the dialog that appears when you do so.
>>
>> On Friday, June 23, 2023 at 3:59:07 PM UTC-4 tbp1...@gmail.com wrote:
>>
>>> My expectation is that all lines in the @others subtree will be 
>>> additionally indented by the indentation of the "@others" string.  That's 
>>> how I have always used it.  I just tried it out in a little outline similar 
>>> to yours, and that's what I saw in the external file.  So if the @others 
>>> line is not indented, the @others subtree lines are not either.
>>>
>>> On Friday, June 23, 2023 at 2:39:46 PM UTC-4 Félix wrote:
>>>
>>>> In a simple outline with an @clean node containing an indented @others 
>>>> such as this: 
>>>>
>>>> [image: Screenshot from 2023-06-23 14-33-30.png]
>>>> Let's say there's a couple lines of text in the 'inside node' body 
>>>> pane. The external file will have those lines indented with as much space 
>>>> as there are before the @others in the parent node.
>>>>
>>>> What is the expected behavior when I remove the indentation of the line 
>>>> produced by the @others in the external file, and save it as such to be 
>>>> picked-up by Leo and have it refresh that outline from file? will the 
>>>> @others be unindented? or will the @others stay at its position, and the 
>>>> inside node content be empty and with it's now unindented line appear 
>>>> below 
>>>> the @others?
>>>>
>>>> In any case, none of this happens. So i'm wondering what's going on? 
>>>> (was it always this way? or is this a new intended/unintended behavior?)
>>>>
>>>> Félix
>>>>
>>>

-- 
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/0c93df92-5c08-4eb5-8f1f-312b14f7c456n%40googlegroups.com.


Re: expected behavior for removing spaces before lines outputed by an indented '@others'

2023-06-23 Thread Félix
Thank, but the unexpected behavior I tried to verify is when* removing the 
indentation in the external file itself externally*  (with a file editor of 
your choice) and then saving it, to have Leo refresh it from file by 
answering 'yes' to the dialog that appears when you do so.

On Friday, June 23, 2023 at 3:59:07 PM UTC-4 tbp1...@gmail.com wrote:

> My expectation is that all lines in the @others subtree will be 
> additionally indented by the indentation of the "@others" string.  That's 
> how I have always used it.  I just tried it out in a little outline similar 
> to yours, and that's what I saw in the external file.  So if the @others 
> line is not indented, the @others subtree lines are not either.
>
> On Friday, June 23, 2023 at 2:39:46 PM UTC-4 Félix wrote:
>
>> In a simple outline with an @clean node containing an indented @others 
>> such as this: 
>>
>> [image: Screenshot from 2023-06-23 14-33-30.png]
>> Let's say there's a couple lines of text in the 'inside node' body pane. 
>> The external file will have those lines indented with as much space as 
>> there are before the @others in the parent node.
>>
>> What is the expected behavior when I remove the indentation of the line 
>> produced by the @others in the external file, and save it as such to be 
>> picked-up by Leo and have it refresh that outline from file? will the 
>> @others be unindented? or will the @others stay at its position, and the 
>> inside node content be empty and with it's now unindented line appear below 
>> the @others?
>>
>> In any case, none of this happens. So i'm wondering what's going on? (was 
>> it always this way? or is this a new intended/unintended behavior?)
>>
>> Félix
>>
>

-- 
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/4a8d5530-fe26-4f45-ac46-e4abc2cc3f48n%40googlegroups.com.


expected behavior for removing spaces before lines outputed by an indented '@others'

2023-06-23 Thread Félix
In a simple outline with an @clean node containing an indented @others such 
as this: 

[image: Screenshot from 2023-06-23 14-33-30.png]
Let's say there's a couple lines of text in the 'inside node' body pane. 
The external file will have those lines indented with as much space as 
there are before the @others in the parent node.

What is the expected behavior when I remove the indentation of the line 
produced by the @others in the external file, and save it as such to be 
picked-up by Leo and have it refresh that outline from file? will the 
@others be unindented? or will the @others stay at its position, and the 
inside node content be empty and with it's now unindented line appear below 
the @others?

In any case, none of this happens. So i'm wondering what's going on? (was 
it always this way? or is this a new intended/unintended behavior?)

Félix

-- 
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/186cad8b-014f-4f78-9306-8bb77b98652cn%40googlegroups.com.


leojs alpha

2023-06-21 Thread Félix
After coding for a few years, I just spent a few minutes tonight playing 
around with a 'somewhat working' leojs...!

So I guess i'm just posting this to say that i'm excited to announce that a 
first leojs "alpha" is coming soon!

All the features I wanted for a first alpha release are done - and only 
some ironing out of little bugs remain. 

...So anywhere from a week or two, or a month or two, hard to say, but it's 
going to be this summer! :D

Thanks to all who supported me, (or just gave feedback and suggestion) It 
really made a difference and motivated me!

Félix

-- 
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/36a56472-a7fc-4217-9e02-cf93b55ea9d6n%40googlegroups.com.


Re: Please test PR #3398 in the ekr-fix-test branch

2023-06-21 Thread Félix
i finally got around to do so after realizing i was still testing on devel 
and not on ekr-fix-branch lol ! :)

On Tuesday, June 20, 2023 at 9:51:57 AM UTC-4 Edward K. Ream wrote:

> On Tue, Jun 20, 2023 at 8:24 AM Robert-Felix  wrote:
>
>> Oops, looks like i can't read! Sorry about that!
>>
>
> So you didn't run the tests in the ekr-fix-test branch?
>
> 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/aa2b71c9-68cd-4e14-95e3-1634be19eed6n%40googlegroups.com.


Re: Please test PR #3398 in the ekr-fix-test branch

2023-06-19 Thread Félix
about the tryStar test fail: 
I've stepped in the test running in a debugger, and in leoAst, 
the ast.parse call fails (when stepping into it brings us into 
usr/lib/python3.10/ast.py's parse function) and it throws an error in it's 
call to 'compile' function.:

*return compile(source, filename, mode, flags,  
 _feature_version=feature_version)*

Can't step into that since it's a native python lib. Anyways, it doesnt 
like the "*" asterisks of the test_TryStar contents, which i've checked to 
be somewhat ok while stepping in the code: 
try:
print('a1')
print('a2')
except* ImportError:
print('b1')
print('b2')
except* SyntaxError:
print('c1')
print('c2')
else:
print('d1')
finally:
print('e1')
print('e2')

I dont know much about this 'ast' business, :)  so i dont really know what 
to check for... 

anyways, no biggie,  let me know if there's any specific thing you'd like 
me to try out to help fix those tests :)

Félix

On Monday, June 19, 2023 at 11:05:45 PM UTC-4 Félix wrote:

> and on ubuntu with python 3.10 i also get that test_tryStar one, along 
> with the test_recursive_import one that checks for an absolute path 
> starting with "C:\" on linux systems (wich fails.)
>
> Since the minimize_headline contains this line: 
> *os.path.isabs(self.root_directory)*
> should the unittest check to give a path that is particular for 
> windows/vs/posix file paths? 
>
> e.g.: (from test_g_finalize and test_g_finalize_join, in 
> test_leoGlobals.py) 
> *expected_leo_base = 'C:/leo_base' if g.isWindows else '/leo_base'*
>
> (i'll investigate for the tryStar test fail in test_leoAst also soon)
>
> ==
> FAIL: test_TryStar (leo.unittests.core.test_leoAst.TestTOG)
> --
> Traceback (most recent call last):
>   File "/home/felix/leo-editor/leo/unittests/core/test_leoAst.py", line 
> 1138, in test_TryStar
> self.make_data(contents)
>   File "/home/felix/leo-editor/leo/unittests/core/test_leoAst.py", line 
> 181, in make_data
> self.fail('make_tree failed')  # pragma: no cover
> AssertionError: make_tree failed
>
> ==
> FAIL: test_recursive_import 
> (leo.unittests.core.test_leoImport.TestLeoImport)
> --
> Traceback (most recent call last):
>   File "/home/felix/leo-editor/leo/unittests/core/test_leoImport.py", line 
> 105, in test_recursive_import
> x.minimize_headline(root)
>   File "/home/felix/leo-editor/leo/core/leoImport.py", line 1785, in 
> minimize_headline
> assert os.path.isabs(self.root_directory)
> AssertionError
>
> --
> Ran 853 tests in 9.405s
>
> FAILED (failures=2, skipped=18)
> On Monday, June 19, 2023 at 8:54:43 PM UTC-4 Félix wrote:
>
>> on my old windows laptop, with python 3.9.6, i still get one failed test. 
>> Screenshot below:
>> [image: still-single-unit-test-fail-python396.png]
>>
>>
>> On Monday, June 19, 2023 at 8:58:17 AM UTC-4 Edward K. Ream wrote:
>>
>>>
>>>
>>> On Mon, Jun 19, 2023 at 7:21 AM Thomas Passin  wrote:
>>>
>>> Thanks for your tests. I'm not worried about warnings.
>>>
>>> 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/96ff529c-64f2-446b-9914-b6a734ab1a71n%40googlegroups.com.


Re: Please test PR #3398 in the ekr-fix-test branch

2023-06-19 Thread Félix
and on ubuntu with python 3.10 i also get that test_tryStar one, along with 
the test_recursive_import one that checks for an absolute path starting 
with "C:\" on linux systems (wich fails.)

Since the minimize_headline contains this line: 
*os.path.isabs(self.root_directory)*
should the unittest check to give a path that is particular for 
windows/vs/posix file paths? 

e.g.: (from test_g_finalize and test_g_finalize_join, in 
test_leoGlobals.py) 
*expected_leo_base = 'C:/leo_base' if g.isWindows else '/leo_base'*

(i'll investigate for the tryStar test fail in test_leoAst also soon)

==
FAIL: test_TryStar (leo.unittests.core.test_leoAst.TestTOG)
--
Traceback (most recent call last):
  File "/home/felix/leo-editor/leo/unittests/core/test_leoAst.py", line 
1138, in test_TryStar
self.make_data(contents)
  File "/home/felix/leo-editor/leo/unittests/core/test_leoAst.py", line 
181, in make_data
self.fail('make_tree failed')  # pragma: no cover
AssertionError: make_tree failed

==
FAIL: test_recursive_import 
(leo.unittests.core.test_leoImport.TestLeoImport)
--
Traceback (most recent call last):
  File "/home/felix/leo-editor/leo/unittests/core/test_leoImport.py", line 
105, in test_recursive_import
x.minimize_headline(root)
  File "/home/felix/leo-editor/leo/core/leoImport.py", line 1785, in 
minimize_headline
assert os.path.isabs(self.root_directory)
AssertionError

--
Ran 853 tests in 9.405s

FAILED (failures=2, skipped=18)
On Monday, June 19, 2023 at 8:54:43 PM UTC-4 Félix wrote:

> on my old windows laptop, with python 3.9.6, i still get one failed test. 
> Screenshot below:
> [image: still-single-unit-test-fail-python396.png]
>
>
> On Monday, June 19, 2023 at 8:58:17 AM UTC-4 Edward K. Ream wrote:
>
>>
>>
>> On Mon, Jun 19, 2023 at 7:21 AM Thomas Passin  wrote:
>>
>> Thanks for your tests. I'm not worried about warnings.
>>
>> 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/2edac48e-655e-410a-8722-8d84abe204e6n%40googlegroups.com.


Re: Please test PR #3398 in the ekr-fix-test branch

2023-06-19 Thread Félix
on my old windows laptop, with python 3.9.6, i still get one failed test. 
Screenshot below:
[image: still-single-unit-test-fail-python396.png]


On Monday, June 19, 2023 at 8:58:17 AM UTC-4 Edward K. Ream wrote:

>
>
> On Mon, Jun 19, 2023 at 7:21 AM Thomas Passin  wrote:
>
> Thanks for your tests. I'm not worried about warnings.
>
> 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/335afb10-18d5-46f3-98e4-72e68d23d91an%40googlegroups.com.


Re: Please test Leo's options code in devel

2023-06-18 Thread Félix
back, on windows I tried with python 3.9.6, this gives me a single test 
fail:
==
FAIL: test_TryStar (leo.unittests.core.test_leoAst.TestTOG)
--
Traceback (most recent call last):
  File "C:\prog\leo-editor\leo\unittests\core\test_leoAst.py", line 1138, 
in test_TryStar
self.make_data(contents)
  File "C:\prog\leo-editor\leo\unittests\core\test_leoAst.py", line 181, in 
make_data
self.fail('make_tree failed')  # pragma: no cover
AssertionError: make_tree failed

--
Ran 853 tests in 17.075s

FAILED (failures=1, skipped=20)

parse_ast: Syntax Error
[
 0: 'try:\n'
 1: "print('a1')\n"
 2: "print('a2')\n"
 3: 'except* ImportError:\n'
 4: "print('b1')\n"
 5: "print('b2')\n"
 6: 'except* SyntaxError:\n'
 7: "print('c1')\n"
 8: "print('c2')\n"
 9: 'else:\n'
10: "print('d1')\n"
11: 'finally:\n'
12: "    print('e1')\n"
13: "print('e2')\n"
]


On Sunday, June 18, 2023 at 11:43:52 PM UTC-4 Félix wrote:

> I pulled latest devel on my *windows* 10 machine, All tests pass on* 
> python 3.11.*
>
> I then pulled the latest devel on my *linux* machine. tested in *python 
> 3.9 and 3.10.* they both give the same two failed tests:
> ==
> FAIL: test_TryStar (leo.unittests.core.test_leoAst.TestTOG)
> --
> Traceback (most recent call last):
>   File "/home/felix/leo-editor/leo/unittests/core/test_leoAst.py", line 
> 1138, in test_TryStar
> self.make_data(contents)
>   File "/home/felix/leo-editor/leo/unittests/core/test_leoAst.py", line 
> 181, in make_data
> self.fail('make_tree failed')  # pragma: no cover
> AssertionError: make_tree failed
>
> ==
> FAIL: test_recursive_import 
> (leo.unittests.core.test_leoImport.TestLeoImport)
> --
> Traceback (most recent call last):
>   File "/home/felix/leo-editor/leo/unittests/core/test_leoImport.py", line 
> 105, in test_recursive_import
> x.minimize_headline(root)
>   File "/home/felix/leo-editor/leo/core/leoImport.py", line 1785, in 
> minimize_headline
> assert os.path.isabs(self.root_directory)
> AssertionError
>
> --
> Ran 853 tests in 6.481s
>
> FAILED (failures=2, skipped=18)
>
> (I'll report in a few minutes for results of testing on my other windows 
> machine which has python 3.9 and 3.10.)
>
> On Sunday, June 18, 2023 at 10:35:18 PM UTC-4 tbp1...@gmail.com wrote:
>
>> Python 3.10 on Ubuntu:
>>
>> === warnings summary 
>> ===
>>
>> leo/plugins/leo_babel/tests/lib_test.py:118
>>
>>   /home/tom/git/leo-editor/leo/plugins/leo_babel/tests/lib_test.py:118: 
>> PytestCollectionWarning: cannot collect test class 'TestCmdr' because it 
>> has a __init__ constructor (from: leo/plugins/leo_babel/tests/lib_test.py)
>>
>> class TestCmdr:
>>
>>
>>
>> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
>>
>> === short test summary info 
>> 
>>
>> FAILED leo/unittests/core/test_leoAst.py::TestTOG::test_TryStar - 
>> AssertionError: make_tree failed
>>
>> FAILED 
>> leo/unittests/core/test_leoImport.py::TestLeoImport::test_recursive_import 
>> - AssertionError
>>
>> = 2 failed, 850 passed, 1 skipped, 1 warning in 11.32s 
>> =
>>
>> Leo 6.7.4-devel, tbp-tree branch, build e58396da1b
>>
>> 2023-06-18 18:19:34 -0500
>> Python 3.10.6, PyQt version 6.3.2
>> linux
>>
>>

-- 
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/3a730c6d-816f-45b5-a3bc-fb91473286e3n%40googlegroups.com.


Re: Please test Leo's options code in devel

2023-06-18 Thread Félix
I pulled latest devel on my *windows* 10 machine, All tests pass on* python 
3.11.*

I then pulled the latest devel on my *linux* machine. tested in *python 3.9 
and 3.10.* they both give the same two failed tests:
==
FAIL: test_TryStar (leo.unittests.core.test_leoAst.TestTOG)
--
Traceback (most recent call last):
  File "/home/felix/leo-editor/leo/unittests/core/test_leoAst.py", line 
1138, in test_TryStar
self.make_data(contents)
  File "/home/felix/leo-editor/leo/unittests/core/test_leoAst.py", line 
181, in make_data
self.fail('make_tree failed')  # pragma: no cover
AssertionError: make_tree failed

==
FAIL: test_recursive_import 
(leo.unittests.core.test_leoImport.TestLeoImport)
--
Traceback (most recent call last):
  File "/home/felix/leo-editor/leo/unittests/core/test_leoImport.py", line 
105, in test_recursive_import
x.minimize_headline(root)
  File "/home/felix/leo-editor/leo/core/leoImport.py", line 1785, in 
minimize_headline
assert os.path.isabs(self.root_directory)
AssertionError

--
Ran 853 tests in 6.481s

FAILED (failures=2, skipped=18)

(I'll report in a few minutes for results of testing on my other windows 
machine which has python 3.9 and 3.10.)

On Sunday, June 18, 2023 at 10:35:18 PM UTC-4 tbp1...@gmail.com wrote:

> Python 3.10 on Ubuntu:
>
> === warnings summary 
> ===
>
> leo/plugins/leo_babel/tests/lib_test.py:118
>
>   /home/tom/git/leo-editor/leo/plugins/leo_babel/tests/lib_test.py:118: 
> PytestCollectionWarning: cannot collect test class 'TestCmdr' because it 
> has a __init__ constructor (from: leo/plugins/leo_babel/tests/lib_test.py)
>
> class TestCmdr:
>
>
>
> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
>
> === short test summary info 
> 
>
> FAILED leo/unittests/core/test_leoAst.py::TestTOG::test_TryStar - 
> AssertionError: make_tree failed
>
> FAILED 
> leo/unittests/core/test_leoImport.py::TestLeoImport::test_recursive_import 
> - AssertionError
>
> = 2 failed, 850 passed, 1 skipped, 1 warning in 11.32s 
> =
>
> Leo 6.7.4-devel, tbp-tree branch, build e58396da1b
>
> 2023-06-18 18:19:34 -0500
> Python 3.10.6, PyQt version 6.3.2
> linux
>
>

-- 
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/e2842042-78c1-4247-9770-e7802b0266dcn%40googlegroups.com.


Re: PR #3389 (in devel) concludes work on handling options

2023-06-16 Thread Félix
devel fails this single test on windows (not sure if related or if its a 
real problem) :

./leo/unittests/core/test_leoImport.py::TestLeoImport::test_recursive_import 
Failed: 'path: ekr-mypy2/mypy' != 'path: mypy'
- path: ekr-mypy2/mypy
+ path: mypy

  File "C:\Python311\Lib\unittest\case.py", line 57, in testPartExecutor
yield
  File "C:\Python311\Lib\unittest\case.py", line 623, in run
self._callTestMethod(testMethod)
  File "C:\Python311\Lib\unittest\case.py", line 579, in _callTestMethod
if method() is not None:
   
  File "c:\prog\leo-editor\leo\unittests\core\test_leoImport.py", line 106, 
in test_recursive_import
self.assertEqual(root.h, expected)
AssertionError: 'path: ekr-mypy2/mypy' != 'path: mypy'
- path: ekr-mypy2/mypy
+ path: mypy

On Friday, June 16, 2023 at 5:37:42 PM UTC-4 Edward K. Ream wrote:

> PR #3389  defines 
> four simple helper functions in leoGlobals.py.
>
> Imo these four functions do more than the entire argparse module. They are 
> simpler, easier and more flexible.
>
> Thanks again to Thomas for his careful reading of the 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/e8957739-b6fd-4cea-b440-8f8cff1bcbean%40googlegroups.com.


Re: When Does CTRL-Clicking On Functions/Methods/Classes Work?

2023-05-12 Thread Félix
This only works for python: it searches for "Class XXX" or "def XXX" 
(could be relatively easily be adapted to support other laguages based on 
regex for each languages)

Félix

On Friday, May 12, 2023 at 10:42:10 AM UTC-4 Edward K. Ream wrote:

> On Fri, May 12, 2023 at 7:44 AM Thomas Passin  wrote:
>
>> I'm used to CTRL-clicking on function names, etc, to move directly to 
>> their defs.  I assumed that this would work for basically any programming 
>> language.  But when I just tried it in a javascript code base, nothing 
>> happened for a CTRL-click.
>>
>> Is this capability limited only to Python code?  What are the limitations 
>> I can expect?
>>
>
> I have no idea :-) My guess is the same as yours.
>
> 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/3fd75ac9-d6de-45fd-b999-21d5e00f6bf4n%40googlegroups.com.


Re: Leo 6.7.3 released!

2023-05-12 Thread Félix
Next leoInteg (1.0.14) release will ask for minimum Leo version 6.7.3 :)
 (coming "soon" this spring, before leojs beta 0.1)

Félix

On Friday, May 12, 2023 at 10:02:18 AM UTC-4 Edward K. Ream wrote:

> On Friday, May 12, 2023 at 8:37:53 AM UTC-5 Edward K. Ream wrote:
>
> mypy rightly issues some complaints about master. I have verified that 
> those complaints do not cause problems in the affected code, so I see no 
> reason to change the release.
>
> I have already fixed those complaints in devel.
>
>
> PR #3331 <https://github.com/leo-editor/leo-editor/pull/3331> removes 
> no-longer used kwargs from calls g.es_exception and g.callers. Master 
> should work properly because:
>
> - g.es_exception has *args and **kwargs arguments.
> - The incorrect calls to g.callers occur only in disabled trace statements 
> in cursesGui2.py.
>
> 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/2ff6a89c-ddfa-43dc-8e3b-fba40dbe80cen%40googlegroups.com.


Re: Impressive ChatGPT responses

2023-05-11 Thread Félix
Imagine for a second, if you will, being a teacher, and being able to 
transliterate the text of a lesson, or whole textbook into something 
written as if the author was some personal super-hero, or mythic legendary 
being, that the child is specifically currently obsessed with...

Even more, imagine now that all 27 students of your class have a different 
character they're obsessed with, no problem, just run the query with a list 
of those 27 character names that those kids will gladly give in an instant! 
A couple year's work of professional writers done in seconds, now available 
for being printed on the laser copier and distributed.
 
(i know chatgpt/gpt 3.5 cant do this given a whole long text , but gpt4 can)

Anyways, i was just curious to read more experiences/reactions from 
leonistas about this new AI science that is blooming right now ! :)

On Thursday, May 11, 2023 at 11:36:09 PM UTC-4 Félix wrote:

> Maybe off-topic, (and sorry in advance if you've seen those kinds of 
> interactions with chatGPT before)  but while I'm finishing translating Leo 
> to typescript, I now use chatGPT to help move along faster. (while 
> verifying his answers carefully 'cause he sometimes hallucinates a little 
> something here and there) 
>
> I sometimes do a little extra interaction with it just for fun, mostly 
> because i'm still curious about that new wonder of the world that is AI can 
> do!
>
>  (like thanking him, and treating him like a person, to see how it will 
> react and answer, or sometimes just acting like it's the super intelligence 
> they have on the holodeck in startrek, i.e. asking him to role-play or act 
> as some historical figure... )
>
> So i thought you'd find it interesting to see this screenshot (also note 
> the choice of strings it took to fill in the arrays in the example code 
> below it's answer too!) 
>
> Félix
> [image: screenshot-gpt.png]
>
>
> On Wednesday, April 26, 2023 at 5:09:03 PM UTC-4 tbp1...@gmail.com wrote:
>
>> An interesting post on the subject, including "alignment": Large 
>> language model alignment “bias” and cultural consensus theory 
>> <https://statmodeling.stat.columbia.edu/2023/04/26/llm-alignment-bias-cultural-consensus-theory/>
>> .
>>
>> On Friday, April 21, 2023 at 12:57:32 PM UTC-4 Edward K. Ream wrote:
>>
>>> On Fri, Apr 21, 2023 at 11:13 AM Thomas Passin  
>>> wrote:
>>>
>>>> And now comes Google:  Google's Bard AI Chatbot Can Now Help You Code 
>>>> and Create Functions For Google Sheets 
>>>> <https://tech.slashdot.org/story/23/04/21/1353212/googles-bard-ai-chatbot-can-now-help-you-code-and-create-functions-for-google-sheets?utm_source=rss1.0mainlinkanon_medium=feed>.
>>>>   
>>>> *But*: Googlers say Bard AI is “worse than useless,” ethics concerns 
>>>> were ignored 
>>>> <https://arstechnica.com/gadgets/2023/04/googlers-say-bard-ai-is-worse-than-useless-ethics-concerns-were-ignored/>
>>>> .
>>>>
>>>
>>> There will be false starts.
>>>
>>> Here's an pithy intro to LLMs and NNs:
>>> https://www.youtube.com/watch?v=lnA9DMvHtfI
>>>
>>> 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/e216acc7-50e2-4bc4-a36e-8ff92828489an%40googlegroups.com.


Re: Leo on Raspbian?

2023-05-07 Thread Félix
Oh - i just fixed the parameter passing : the %U was extraneous., removing 
this and just keeping this  (below ) in the /usr/local/bin/leo script was 
enough :)

#!/bin/sh
python ~/path-to-leo-editor/launchLeo.py $1 --no-splash

On Sunday, May 7, 2023 at 2:18:05 AM UTC-4 Félix wrote:

> I'll resurrect this cool thread and report here that I installed Leo along 
> with vscode, websockets and leointeg on a Pi 4 today :) 
>
> Had fun testing it out and am still amazed that everything works just 
> fine! I'm now coding leojs with leointeg running on that pi! 
>
> I'll probably continue tomorrow to make sure that i can start a leobridge 
> server and connect from two different computers to edit the same Leo 
> outline served from that pi. Kind of a 'multi user' mode that I've never 
> had the time to test thoroughly :)
>
> So i'm just curious to hear from other people who may have in the meantime 
> got some more experiences with Leo on a rasp Pi device: 
>
>  (for instance did you get a file-association with .leo files working 
> properly for icons in the Pi's file manager? for  me passing the parameter 
> with %U creates a new file with the correct path, instead of opening the 
> file itself - but everything else works fine - i probably didnt create the 
> mimetype or the launch script properly in /usr/local/bin/leo, no biggie.. )
>
> Félix
>
> On Friday, December 28, 2018 at 9:32:46 PM UTC-5 Chris George wrote:
>
>> I have experience on all major linux variants (slackware is a little 
>> fuzzy, it was 1997). I also got Leo up and running under BSD.
>>
>> If you can get a functioning python environment working, Leo will run 
>> just fine.
>>
>> Keep us posted
>>
>> On Friday, December 28, 2018 at 4:57:41 PM UTC-8, Rob wrote:
>>>
>>> I'm starting to explore some fun projects with my son, a professional 
>>> programmer, using the Raspberry Pi device. The default OS is a Linux 
>>> variant called Raspbian. It has Python 2.7.3 and 3.x (not sure yet which 
>>> one) preinstalled. That's as far as I've gotten. My main Leo production 
>>> platforms have been Windows and MacOS and practically zero experience with 
>>> Linux.
>>>
>>> Just wondering if anyone here has any experience installing and running 
>>> Leo on this particular Linux variant? Thanks in advance.
>>>
>>> Rob
>>>
>>

-- 
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/16ace450-c5f6-44da-b8bd-3f954fe51a36n%40googlegroups.com.


Re: Leo on Raspbian?

2023-05-07 Thread Félix
I'll resurrect this cool thread and report here that I installed Leo along 
with vscode, websockets and leointeg on a Pi 4 today :) 

Had fun testing it out and am still amazed that everything works just fine! 
I'm now coding leojs with leointeg running on that pi! 

I'll probably continue tomorrow to make sure that i can start a leobridge 
server and connect from two different computers to edit the same Leo 
outline served from that pi. Kind of a 'multi user' mode that I've never 
had the time to test thoroughly :)

So i'm just curious to hear from other people who may have in the meantime 
got some more experiences with Leo on a rasp Pi device: 

 (for instance did you get a file-association with .leo files working 
properly for icons in the Pi's file manager? for  me passing the parameter 
with %U creates a new file with the correct path, instead of opening the 
file itself - but everything else works fine - i probably didnt create the 
mimetype or the launch script properly in /usr/local/bin/leo, no biggie.. )

Félix

On Friday, December 28, 2018 at 9:32:46 PM UTC-5 Chris George wrote:

> I have experience on all major linux variants (slackware is a little 
> fuzzy, it was 1997). I also got Leo up and running under BSD.
>
> If you can get a functioning python environment working, Leo will run just 
> fine.
>
> Keep us posted
>
> On Friday, December 28, 2018 at 4:57:41 PM UTC-8, Rob wrote:
>>
>> I'm starting to explore some fun projects with my son, a professional 
>> programmer, using the Raspberry Pi device. The default OS is a Linux 
>> variant called Raspbian. It has Python 2.7.3 and 3.x (not sure yet which 
>> one) preinstalled. That's as far as I've gotten. My main Leo production 
>> platforms have been Windows and MacOS and practically zero experience with 
>> Linux.
>>
>> Just wondering if anyone here has any experience installing and running 
>> Leo on this particular Linux variant? Thanks in advance.
>>
>> Rob
>>
>

-- 
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/9d003675-645a-4d70-a188-6cf686698744n%40googlegroups.com.


Re: Last call for reviews of PR #3277: improved path functions

2023-04-17 Thread Félix
Sorry - I didnt have the time yet: I'll review those changes tonight :)

Félix

On Monday, April 17, 2023 at 8:23:28 AM UTC-4 Edward K. Ream wrote:

> On Mon, Apr 17, 2023 at 7:21 AM Thomas Passin  wrote:
>
>> Some of my outlines have an @rst tree like this:
>>
>> - @path ...
>> - @rst .
>> - [the rest of the tree ...]
>>
>> I wanted to make sure the the @path directive would be honored when the 
>> rst3 command and then Sphinx were run.  I just checked this for one outline 
>> and it worked as intended.  So that's good, too.
>>
>
> Thanks for this testing.
>
> 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/505559ed-b691-486f-8225-a5ca3c5726cfn%40googlegroups.com.


Re: Example of me using chatGPT

2023-04-14 Thread Félix
Indeed, for smaller self-contained chunks of code, it's very useful and 
efficient. For more ambitious code, it's too risky to have hallucinated  
(erroneous) chunks of code.

Perhaps the years ahead will lead to other neuronal system architectures 
that will complement the "textual-generation-prediction" ones that are 
actually in vogue. 

On Thursday, April 13, 2023 at 8:34:45 AM UTC-4 tbp1...@gmail.com wrote:

> There was a recent thread about this on python-list, including someone's 
> experiments.  Here's what I wrote -
>
> " People need to remember that ChatGPT-like systems put words together the 
> way that many humans usually do.  So what they emit usually sounds smooth 
> and human-like.  If it's code they emit, it will tend to seem plausible 
> because lines of code are basically sentences, and learning how to 
> construct plausible sentences is what these systems are built to do. That's 
> **plausible**, not "logical" or "correct". 
>
> The vast size of these systems means that they can include a larger 
> context in figuring out what words to place next compared with earlier, 
> smaller systems. 
>
> But consider: what if you wrote code as a stream-of-consciousness 
> process?  That code might seem plausible, but why would you have any 
> confidence in it?  Or to put it another way, what if most of ChatGPT's 
> exposure to code came from StackOverflow archives? 
>
> On top of that, ChapGPT-like systems do not know your requirements nor the 
> reasons behind your requests.  They only know that when other people put 
> words and phrases together like you did, they tended to make responses that 
> sound like what the chatbot emits next.  It's basically cargo-culting its 
> responses. 
>
> Apparently researchers have been learning that the more parameters that a 
> system like this has, the more likely it is to learn how to emit responses 
> that the questioner likes.  Essentially, it could become the ultimate 
> yes-man! 
>
> So there is some probability that the system will tell you interesting or 
> useful things, some probability that it will try to tell you what it thinks 
> you want [to] hear, some probability that it will tell you incorrect things 
> that other people have repeated, and some probability that it will 
> perseverate - simply make things up. 
>
> If I were going to write a novel about an alternate history, I think that 
> a chatGPT-like system would be a fantastic writing assistant. Code? Not so 
> much."   
>
> On Thursday, April 13, 2023 at 8:15:59 AM UTC-4 Edward K. Ream wrote:
>
>> On Thursday, April 13, 2023 at 12:15:17 AM UTC-5 Félix wrote:
>>
>> Here I am, (simple screenshot below) working on leojs, converting the 
>> stripBOM function from leoGlobals.py from python to typescript.
>>
>> Have you tried? Any thoughts or particular productivity tips to share?
>>
>>
>> My impression is that chatGPT does well on small tests. I wouldn't trust 
>> it with larger tasks.
>>  
>>
>> (*I eventually plan to use Leo to organize and automate calls to it's 
>> API, to make some kind of agi-assistant experiment.*)
>>
>>
>> chatGPT has spawned many creative ideas including yours. Please let us 
>> know what happens :-)
>>
>> 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/a17b33b0-a3bc-4446-8fe2-fcaa2a20c930n%40googlegroups.com.


Re: Eye surgery tommorrow

2023-04-12 Thread Félix
Edward, I hope you get through that well & soon !!

Félix

On Wednesday, April 12, 2023 at 10:20:30 AM UTC-4 gates...@gmail.com wrote:

> Hoping it goes smoothly and you're back better than ever soon.
>
> Jake
>
> On Wed, Apr 12, 2023 at 10:13 AM jkn  wrote:
>
>> Best Wishes from me also
>>
>> Jon N
>>
>> On Wednesday, April 12, 2023 at 11:50:24 AM UTC+1 lewis wrote:
>>
>>> Best wishes, hope it goes well.
>>>
>>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/leo-editor/ae9460bc-7390-485a-8dd2-32c50c240018n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/leo-editor/ae9460bc-7390-485a-8dd2-32c50c240018n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/93a4981a-79b1-4c59-9748-725abccb696bn%40googlegroups.com.


Re: Discuss: remove support for Leo's path expressions

2023-04-07 Thread Félix
I just checked the path expressions in Leo's docs. Pretty cool feature i 
didn't even know existed.

That being said, I don't see why vscode would not allow me to evaluate 
parts of those strings as expected by this feature, as I already have 
support of scripting , including offereing g, c, p etc. available in the 
scope of the running scripts.

So personally, I'd leave that good stuff in! :) 

Félix

On Friday, April 7, 2023 at 5:55:26 PM UTC-4 Edward K. Ream wrote:

> #3260 <https://github.com/leo-editor/leo-editor/issues/3260> suggests 
> removing 
> support for Leo's path expressions 
> <https://leo-editor.github.io/leo-editor/directives.html#path-expressions> 
> by removing all calls to c.expand_path_expression in Leo's core and 
> plugins. My reasons:
>
> 1. Path expressions are a serious security concern.
> 2. Path expressions are not necessary. There are easy workarounds.
> 3. vs-code will never allow such expressions. leoJS can not possibly ever 
> support them.
>
> *Note*: c.expand_path_expression  will still exist should someone need it. 
>
> Your comments, please.
>
> 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/726fb668-cc88-4d73-a11a-d28b86f82c79n%40googlegroups.com.


Re: New undo methods for multiple headline changes on branch 'boltex/issue3219'

2023-03-28 Thread Félix
oh, you're right, https://github.com/leo-editor/leo-editor/pull/3228 is 
what i meant to paste 

On Tuesday, March 28, 2023 at 10:52:30 PM UTC-4 tbp1...@gmail.com wrote:

> Without a PR, it's hard to review the code without knowing what has been 
> changed.
>
> On Tuesday, March 28, 2023 at 10:46:42 PM UTC-4 Félix wrote:
>
>> If you'd like to test out some new proposed methods to undo/redo commands 
>> that alter many headlines at once: 
>> https://github.com/leo-editor/leo-editor/tree/boltex/issue3219
>>
>> Thanks for reviewing my code if you feel like it. Also, you can easily 
>> test it with the attached Leo file which provides 2 @buttons that try to 
>> change the headlines in the outline. One does it one by one, the other does 
>> it all at once (using the new proposed undo helpers):
>>
>> Félix
>>
>

-- 
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/ca3253fa-957d-4ae6-8670-9fbdf71b0695n%40googlegroups.com.


New undo methods for multiple headline changes on branch 'boltex/issue3219'

2023-03-28 Thread Félix
If you'd like to test out some new proposed methods to undo/redo commands 
that alter many headlines at once: 
https://github.com/leo-editor/leo-editor/tree/boltex/issue3219

Thanks for reviewing my code if you feel like it. Also, you can easily test 
it with the attached Leo file which provides 2 @buttons that try to change 
the headlines in the outline. One does it one by one, the other does it all 
at once (using the new proposed undo helpers):

Félix

-- 
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/20c0cbf4-f87d-4fb3-99f6-7de7aadca7a9n%40googlegroups.com.


test-change-headlines.leojs
Description: Binary data


Software for recording yourself doing a demo: 'obs studio'

2023-02-25 Thread Félix
After talking with Edward about how it would be nice to see small videos of 
actual usage of Thomas main software project, GF4, he suggested me to post 
info about the software I used to make the demo for 
LeoInteg: https://youtu.be/SYwlfdEukD4?t=12

On windows I use the open-source/free software called '*obs studio*'

Hope this inspires people to make small video demos of their projects! :)

Félix

-- 
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/df30b7bf-6edd-44c7-9c20-4aedb684dda4n%40googlegroups.com.


Re: Thumb-nail Explanation Of Leo

2023-02-25 Thread Félix
I also struggled a bit to write a concise and short explanation of what Leo 
is/does in the text introductions I wrote for LeoInteg and LeoJS... 

I enjoyed reading both of your posts! :)

If it can bring you some inspiration, the way I resume Leo as briefly as I 
can at the top of the readme for those projects is : 



*Literate Programming with Directed Acyclic Graphs (dag)Break your code 
down into sections structured as an outline, to derive or parse back your 
filesLeo is a fundamentally different way of using and organizing data, 
programs and scripts.*

... and in the 'welcome screen' of LeoInteg I wrote: 

*Use Leo, the Literate Editor with Outlines, to program with directed 
acyclic graphs, along with section-references, @others, and clones.*

Félix
On Saturday, February 25, 2023 at 3:06:50 PM UTC-5 Geoff Evans wrote:

> This reminds me of something I posted in 2012 (!)  It takes its starting 
> point not from what Leo is, but from the sorts of things people might want 
> to use and program a computer for in the first place which, for many of us, 
> have very little to do with editing.  Here is is again:
>
> 
>
> I should start by saying that I use Leo daily and wouldn't now consider 
> starting any project lasting more than a week without it. I'm immensely 
> grateful to Edward and the community of collaborators for creating and 
> polishing it. Two things prompt me nevertheless to write. First, I have 
> a strong feeling that there are ways I could be using it better, to make 
> my life even easier, if only I could manage to break into them; secondly, 
> Edward asks from time to time something like "Why isn't everybody using 
> Leo and what would it take to convert more people?" Maybe the following 
> will be a contribution. 
>
> When I started programming in Python a couple of years ago, and started 
> learning about object-oriented principles, one that struck me especially 
> was "Program to the interface, not the implementation." (It often takes 
> me a while to remember this when I'm working; but it always makes things 
> better when I do.) My "Aha" moment a couple of months ago came when I 
> realized that this wasn't true only of programming -- the same principle 
> applies to writing as well. Papers that jump right in to telling me what 
> the author did don't work nearly as well as those that start with the 
> reader and what s/he might care about and how the author proposes to 
> help with that. 
>
> [Isn't it interesting that the maxim I quoted above disobeys itself, 
> because 
> it refers to the implementation in a computer program whereas the 
> real interface is the general act of communication and the primacy of the 
> receiver over the transmitter.] 
>
> So I envisage a tutorial starting as follows (sketch only): 
>
> Suppose you have a project that entails using some data, doing some 
> computations, and writing up the results. If you want to easily: 
>
> -- work on / store / contemplate the project as a unified whole 
> [Leo manages all relevant files in one outline] 
>
> -- see and work on one small part in its context 
> [Leo is an outliner] 
>
> -- copy thoughts, results from one context to another 
> [clones] 
>
> -- switch between interactive and batch processing 
> [iPython interface] 
>
> -- produce nice printed (literate?) documentation for those who don't 
> use Leo or don't do all their work glued to a computer screen 
> [rst3? noweb? Fweb? maybe little sample batch files with all the 
> required steps?] 
>
> -- ??? 
> [scripting] 
> And here I'm stuck: Leo documentation assures me that scripting is an 
> amazingly powerful answer, but doesn't tell me what questions I might 
> like to ask, or what needs I might have, that it is an answer to. It 
> simply tells me what to do if I already know why I want to. 
>
> -- Here is where the community may want to contribute ways Leo has made 
> their working lives easier and more productive, by meeting existing needs 
> or wishes that had nothing intrinsically to do with Leo. 
>
> I envisage this as complementing the existing tutorial in leodocs. It 
> may provide an entrance that a different class of potential user would 
> find attractive. Or maybe I just need someone to gently point me to 
> where what I am suggesting already exists ;-) 
>
> Cheers, geoff evans
>
> ---
>
> Major offshoots in the last decade (e.g.ViewRendered) suggest further 
> examples of "if you want to easily ..." that people who use and understand 
> them could provide.
>
> Confession:  Most of what I used to do with Leo I now do with Jupyter 
> notebooks.  This is partly 

Feature to upgrade leoInteg and vscode

2023-02-15 Thread Félix
If you feel like it and have 5 seconds of free time, I would recommend 
upvoting this vscode feature request, which could benefit leoInteg and 
leojs :

https://github.com/microsoft/vscode/issues/170248

(Non critical bugs & feature requests have this - rather silly - system of 
counting the 'thumbs up' to get priority.)

Thanks ! :)

Félix

-- 
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/f9b4ef2a-6dae-4a91-812e-97a04435d3fan%40googlegroups.com.


Re: Python Developer Of The Week

2023-02-06 Thread Félix
That's pretty cool!! :)

Félix

On Monday, February 6, 2023 at 4:16:01 PM UTC-5 Edward K. Ream wrote:

> On Mon, Feb 6, 2023 at 9:58 AM Thomas Passin  wrote:
>
>> I gave an email interview to the PyDev Of The Week series.  Edward was 
>> featured there several years ago so I'm in good company.
>>
>> I'm posting it here because I talk quite a bit about Leo.
>>
>> PyDev Of The Week 
>> <https://www.blog.pythonlibrary.org/2023/02/06/pydev-of-the-week-thomas-passin/>
>>
>
> Congratulations :-) Thanks for the good mentions of Leo.
>
> 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/7e1a3fc9-8511-4254-8468-2b5d40a12303n%40googlegroups.com.


Re: Question about find-all-unique-regex

2023-02-05 Thread Félix
another unused property related to 'find all unique regex' is 
*unique_matches*

On Sunday, February 5, 2023 at 3:28:24 PM UTC-5 Edward K. Ream wrote:

> On Sun, Feb 5, 2023 at 1:25 PM Félix  wrote:
>
>> Good, i also think this command should go away.
>
>
> :-)
>
> I propose to remove it today from leointeg, leojs , leoserver.py (on the 
>> felix-server5 branch that i'm working on) - and i'll leave it to you to 
>> remove it from Leo's leoFind.py itself. (along with the findAllUniqueFlag 
>> variable in leoFind.py __init__ method.)
>>
>
> Will do. Thanks for finding this cruft.
>
> 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/c0aed208-f16a-450e-aeed-d0c556e2c61fn%40googlegroups.com.


Re: Why nits matter

2023-02-05 Thread Félix
I'll just chime in to say this is not trivial. (although it is good idea 
for a bool setting indeed, just that it would require more work than you 
would think.)

Unless it's implemented as a 'macro' cheat that adds a 'goto-next-visible' 
operation after a delete/cut command .

Félix

On Sunday, February 5, 2023 at 4:01:51 PM UTC-5 jkn wrote:

> Can I raise this nit again? I just hit the (surprising, to me) behaviour,
> and tracked it to #721, which is currently marked as 'won't do'.
> I'm unclear from the conversation above whether this is for 5.7, or
> for all time ... ;-)
>
> Thanks, jon N
>
>
> On Wednesday, February 14, 2018 at 11:13:38 AM UTC Edward K. Ream wrote:
>
>> On Wed, Feb 14, 2018 at 4:52 AM, Edward K. Ream  
>> wrote:
>>
>> ​> ​
>> I have just created #721 
>> <https://github.com/leo-editor/leo-editor/issues/721>. It will add 
>> support for @bool select-next-after-delete setting, with a default that 
>> will retain legacy operation.
>>
>> ​> ​
>> As I write this, it seems that it would be foolish to do this for 5.7 
>> final, but it might sneak in. 
>>
>> This item definitely *will not* be included in 5.7.  The code changes 
>> involving undo are *way* too complex to include at the last minute.
>>
>> 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/c3822d44-94fa-4a80-aec2-cc4abfbc1594n%40googlegroups.com.


Re: Question about find-all-unique-regex

2023-02-05 Thread Félix
Good, i also think this command should go away.

It was very much unused/redundant anyways because "find all" already exists 
to get all matches of a search, and it respects the 'whole-word' and 
'regex' checkbox flags. 

I propose to remove it today from leointeg, leojs , leoserver.py (on the 
felix-server5 branch that i'm working on) - and i'll leave it to you to 
remove it from Leo's leoFind.py itself. (along with the findAllUniqueFlag 
variable in leoFind.py __init__ method.)

I'll go do some groceries and i'll proceed with this in a few hours. :)

Thanks!! 

Félix


On Sunday, February 5, 2023 at 8:32:59 AM UTC-5 Edward K. Ream wrote:

> On Sat, Feb 4, 2023 at 7:44 PM Félix  wrote:
>
>> Trying to finish the big cleanup of leoFind.py, leoFind.ts in leojs and 
>> the find commands in leoserver.py, i'm a bit stumped with 
>> "find-all-unique-regex"...
>>
>
> I have no memory of this command. 
>
> A cff shows that no code in Leo calls interactive_find_all_unique_regex1.
>
> If you want to fix this command, feel free to do so, but I'm good with 
> moving this command to the attic.
>
> 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/8542a9f3-be87-41b0-80cc-d2abfde19849n%40googlegroups.com.


Re: Question about find-all-unique-regex

2023-02-04 Thread Félix
I just took a peek at the usage of findAllUniqueFlag : it's not used 
anymore. So in fact the find-all-unique-regex now does nothing more than 
find-all. 

This should be fixed/removed in some way... :)

Not sure what decision to take as I'm not understanding really what that 
command was used for originally :/

Félix

On Saturday, February 4, 2023 at 8:43:58 PM UTC-5 Félix wrote:

> Trying to finish the big cleanup of leoFind.py, leoFind.ts in leojs and 
> the find commands in leoserver.py, i'm a bit stumped with 
> "find-all-unique-regex"...
>
> This command does a find-all with the "findAllUniqueFlag" internal flag 
> 'on'. So far so good...
>
> Is it normal that it does not set the regex flag (self.pattern_match) 'on' 
> too? maybe i'm induced in thinking that it should because of the 'regex' in 
> the name?
>
> In fact, i guess my real question is: can someone explain what 
> the find-all-unique-regex actually is intended for? it's not evident from 
> the docstring alone because this command does not force the 'regex' flag 
> (self.pattern_match) to anything in particular.
>
> Thanks in advance! 
>
> Félix
>

-- 
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/9a60420b-641e-49d1-b404-ba72ccec96acn%40googlegroups.com.


Question about find-all-unique-regex

2023-02-04 Thread Félix
Trying to finish the big cleanup of leoFind.py, leoFind.ts in leojs and the 
find commands in leoserver.py, i'm a bit stumped with 
"find-all-unique-regex"...

This command does a find-all with the "findAllUniqueFlag" internal flag 
'on'. So far so good...

Is it normal that it does not set the regex flag (self.pattern_match) 'on' 
too? maybe i'm induced in thinking that it should because of the 'regex' in 
the name?

In fact, i guess my real question is: can someone explain what 
the find-all-unique-regex actually is intended for? it's not evident from 
the docstring alone because this command does not force the 'regex' flag 
(self.pattern_match) to anything in particular.

Thanks in advance! 

Félix

-- 
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/aae91edd-31c4-453a-9b06-213d55829041n%40googlegroups.com.


Re: What is Leo's current formatter for it's current code formating standards?

2023-02-03 Thread Félix
Thanks for your answer Edward! :)

 I should have mentioned that I was editing leoserver in leointeg, and I 
happened to modify the file directly, (not via the Leo:BODY pane) and when 
saving, vscode asked me if I wanted to install (and format with) one of 
those 3 formatters. (autopep8, black, or yapf)

hehe, but no problem at all, i just ignored that popup and everything went 
fine. 

thanks again for the details you've provided : I'll make sure to use the 
technique you described before making future pull request. :)

Félix

On Friday, February 3, 2023 at 5:00:42 PM UTC-5 Edward K. Ream wrote:

> On Fri, Feb 3, 2023 at 2:55 PM Félix  wrote:
>
> autopep8? or black, (or yapf?)
>
>
> Great question. I was unwisely assuming you knew the answer.
>
> To beautify Leo I run the script: leo/scripts/beautify-leo.cmd. Like all 
> .cmd files, this is a Windows-only script.
>
> I just checked. Yes, @clean ../scripts/beautify-leo.cmd (and all the 
> other .cmd scripts in leo/scripts) are in LeoPyRef.leo. Here is 
> beautify-leo:
>
> echo off
> cd C:\Repos\leo-editor
> echo beautify-leo
> call python -m leo.core.leoAst --orange --recursive leo\core
> call python -m leo.core.leoAst --orange --recursive leo\commands
> call python -m leo.core.leoAst --orange --recursive leo\plugins\importers
> call python -m leo.core.leoAst --orange --recursive leo\plugins\writers
>
> Leo's beautify-files command does roughly this for the files in the 
> selected outline, hence the name of the script. Running the script is 
> better/safer since the script beautifies all and only the desired files.
>
> I usually run leo/scripts/full-test-leo.cmd before pushing and after 
> pulling. full-test-leo includes beautify-leo. Please take a look at the 
> .cmd scripts in leo/scripts and adapt them for your environment as 
> necessary.
>
> My apologies that I haven't made my workflow more apparent. Info issue  
> #2867 <https://github.com/leo-editor/leo-editor/issues/2867> mentions 
> these scripts, but cryptically.
>
> 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/9150b7a8-e8c9-4fce-83c8-9d44caf5f9d2n%40googlegroups.com.


Re: Coming soon in LeoInteg 1.0.12 (...and leojs beta!)

2023-02-03 Thread Félix
@Thomas : For leointeg, it just relays the commands to the leoBridge 
instance the server is running. So leointeg already ran any scripts from 
it's first inception back in 2021. Just like it would normally in Leo, via 
@buttons, @commands, or just hittin CTRL+B with focus on onw of LeoInteg's 
panel. :)

For LeoJS, it will run javascript scripts instead of python scripts.

@Edward : Thanks! Yes I noticed your request for review, hehe , i'll get on 
it and test those new features this evening. 

It's been quite a cleanup/rehaul for leoFind.py those past few weeks! Can't 
wait to wrap this up and transliterate all those updates into leojs!! :)


Thanks again! I really appreciate your comments and attention to all those 
details! 

Félix


On Friday, February 3, 2023 at 5:20:36 PM UTC-5 Edward K. Ream wrote:

> On Fri, Feb 3, 2023 at 4:11 PM Edward K. Ream  wrote:
>
> > The original reason for the PR was that ctrl-clicking, say, _MyClass 
> wouldn't work. The old code only searched for def _myClass, not class 
> _MyClass.  The new (simpler!) code tries more search patterns.
>
> Oops.  I should have said, def _*M*yClass.
>
> Also, I forgot to mention that the new code searches for assignments 
> (aliases) as well.  So ctrl-clicking _MyClass will find this assignment:
>
> class AnotherClass:
> @others
>
> _MyClass = AnotherClass
>
> As before, the new code will conduct *alt searches* for defs.  For 
> example, if you search for open_with_file_name Leo will find the node 
> containing def openWithFileName.
>
> Happily, the machinery to conduct alt searches is much simpler in the new 
> 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/e769c31e-b247-45a8-9aa9-effc04f70809n%40googlegroups.com.


Coming soon in LeoInteg 1.0.12 (...and leojs beta!)

2023-02-03 Thread Félix
Hello to all my Leonistas friends!

Here's some good news for a change:

Since the VSCode API now allows for the nodes in a tree to have visible 
highlight ranges in their headlines, LeoInteg 1.0.12 will feature 'distinct 
search results' to be visible in the outline. Just like the regular Leo 
offers.

This feature will be enabled, in part,  by new server upgrades coming in 
Leo 6.7.2. (the current LeoInteg will not break with those new server 
features, in case upgrades are not simultaneous)

Of course, this feature will be present from the get-go in LeoJS beta, 
which I still plan to release before the spring.

Here's a screenshot of what is meant by "visible selection ranges in the 
headlines" (*looking for 'bla' string with the find commands of Leo F2 or 
F3, a match is highlighted in the second headline)*: 
[image: Screenshot from 2023-02-03 16-28-25.png]

Playing with it this afternoon to try it out, I have to say, it greatly 
improves the 'real Leo' feel and experience when using find commands in 
LeoInteg!

Félix

-- 
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/66fc1bd5-4ea7-460f-9a0d-d14035adfb65n%40googlegroups.com.


What is Leo's current formatter for it's current code formating standards?

2023-02-03 Thread Félix
autopep8? or black, (or yapf?)

Félix

-- 
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/acdf9490-c97b-4339-915c-1924afef7b01n%40googlegroups.com.


Re: Two more PRs merged into devel

2023-01-29 Thread Félix
I was trying for a while to run the unit tests before making a small pull 
request to the Leo codebase... (it's been a while) and I Had to resort to 
searching the forums for this thread.

So I just thought I'd suggest to someone who may feel knowledgeable than me 
about python unit-testing systems to add a bit of info on the '*Testing*' 
node in leoPyRef.leo.

My motivation is that I feel like simply mentioning: 

*Run these tests using unittest or pytest from the command line.*
*See g.run_unit_tests and g.run_coverage_tests.*

May not be enough for python/Leo newbies like me hehe.. :) 

Félix
On Saturday, October 29, 2022 at 5:06:38 PM UTC-4 Félix wrote:

> I was trying to find the way to test my modifications... (test-all has 
> been removed as you all stated in this thread)
>
> I found this thread and the commands given above 
>
> *py -m unittest *
> and
> *py -m unittest leo.unittests.core.test_leoserver*
>
> which worked fine on my windows machine (Thanks Thomas!)
>
> So i'm just wondering: Are the tests instructions/commands listed in 
> leoPyRef.leo? or at https://www.leoeditor.com/leo_toc.html?  I could not 
> find anything (although i admit i'm bad at searching and googling 
> sometimes!) 
>
> Félix
>
>
> On Monday, September 19, 2022 at 7:23:30 AM UTC-4 Edward K. Ream wrote:
>
>> On Mon, Sep 19, 2022 at 12:19 AM Viktor Ransmayr  
>> wrote:
>>
>> OK, I was only surprised, that the removal of ~ 50 (test-* & cover-*) 
>>> commands did not warrant an own msg.
>>>
>>
>> Not announcing the change more clearly was an oversight on my part.
>>
>> 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/79ef9b45-b737-447e-8a57-0cc4c6087b1bn%40googlegroups.com.


  1   2   3   4   5   >