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 coul

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2023 at 3:15 PM Thomas Passin wrote: one defensive code change to make is for Leo never to replace the workbook > - whether or not it can find it - without asking the user. On first use, > when the Leo user gets created, that wouldn't apply. Good idea. Edward -- You received

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Thomas Passin
I agree, but with a non-reproducible report it's hard to make any progress. In this case I wanted to be able to file a more definite issue, but also alert people as soon as possible to back up their workbooks until the thing gets resolved. I do think that one defensive code change to make is

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Jacob Peck
I'd like to propose that *any* data corruption issue at all in Leo should be reported, regardless of whether the steps to replicate are known. The last thing an editor should ever do is destroy data. Jake On Wed, Jun 28, 2023 at 1:49 PM Thomas Passin wrote: > > On Wednesday, June 28, 2023 at 1

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Thomas Passin
On Wednesday, June 28, 2023 at 11:42:37 AM UTC-4 Edward K. Ream wrote: On Wed, Jun 28, 2023 at 10:27 AM Thomas Passin wrote: I've done more testing, and the pattern is definitely repeatable. If I check out the ekr-3181-mypy-links branch, the first time I launch Leo the workbook may not be a

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Thomas Passin
On Wednesday, June 28, 2023 at 12:52:42 PM UTC-4 jkn wrote: FWIW, I have a vague feeling that something like this happened to me a few months ago. It only occurred the once, and I am not 100% sure what happened, but it definitely involved the CheatSheet 'appearing'. Only mentioning it because t

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread jkn
FWIW, I have a vague feeling that something like this happened to me a few months ago. It only occurred the once, and I am not 100% sure what happened, but it definitely involved the CheatSheet 'appearing'. Only mentioning it because this would have been before the recent work. J^n On Wednesda

Re: New Ultra-fast replacement for pylint/flake8

2023-06-28 Thread Edward K. Ream
On Wednesday, June 28, 2023 at 9:17:50 AM UTC-5 tbp1...@gmail.com wrote: > Ruff ...is 100 times or more faster because it is written in Rust. Wow. ruff does the flake8 tests instantly. Here is the output of a script that checks leo/core and leo/commands with

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2023 at 10:27 AM Thomas Passin wrote: > I've done more testing, and the pattern is definitely repeatable. If I > check out the ekr-3181-mypy-links branch, the first time I launch Leo > the workbook may not be affected but every time after that it is destroyed > and replaced by t

Re: New Ultra-fast replacement for pylint/flake8

2023-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2023 at 9:17 AM Thomas Passin wrote: > Ruff is a new-ish linter program that > does the job of pylint or flake8 but is 100 times or more faster because it > is written in Rust. It might be worth looking at for Leo. Oh yeah! Edward -- You r

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Thomas Passin
I've done more testing, and the pattern is definitely repeatable. If I check out the ekr-3181-mypy-links branch, the first time I launch Leo the workbook may not be affected but every time after that it is destroyed and replaced by the default CheatSheet. When I change back to the devel bran

New Ultra-fast replacement for pylint/flake8

2023-06-28 Thread Thomas Passin
Ruff is a new-ish linter program that does the job of pylint or flake8 but is 100 times or more faster because it is written in Rust. It might be worth looking at for Leo. Here's one of the testimonials: Nick Schrock, founder of Elementl, co-creator of Gra

Re: Discuss: option for short file names in unls?

2023-06-28 Thread Edward K. Ream
On Tue, Jun 27, 2023 at 9:48 PM HaveF HaveF wrote: > I don't know the meaning of short url, is it just for easy look? > Yes. The new *@data unl-path-prefixes* setting resolves relative to absolute paths. As a result, shorter (relative) paths are likely to be more useful than long (absolute) path

Re: how to get all the content of the body?

2023-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2023 at 8:09 AM HaveF HaveF wrote: > Super useful function! It works! You save my day, Thomas! Thanks, Thomas, for your help. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiv

Re: PR #3215 is ready for review

2023-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2023 at 3:58 AM Edward K. Ream wrote: PR #3215 creates > *optional* unls based on gnxs. > And now the PR is even more ready for review :-) Todays revs: - Add two new helpers: *g.findAnyUnl* and *g.isValidUnl*. - Using g.findAn

Re: how to get all the content of the body?

2023-06-28 Thread HaveF HaveF
On Wed, Jun 28, 2023 at 8:26 PM Thomas Passin wrote: > I think you want the method g.getScript(). Look at its docstring in > LeoPyRef.leo to see how to use it. Super useful function! It works! You save my day, Thomas! I finally don't have to use my crappy, buggy recursive expansion functions th

Re: how to get all the content of the body?

2023-06-28 Thread Thomas Passin
I think you want the method g.getScript(). Look at its docstring in LeoPyRef.leo to see how to use it. BTW, here is how I found it. I remembered that Leo scripts get run by writing a file called *ScriptFile.py*. So I searched for that using the Nav tab. The first thing that came up was in *e

Re: PR #3215 is ready for review

2023-06-28 Thread Edward K. Ream
On Wednesday, June 28, 2023 at 3:58:07 AM UTC-5 Edward K. Ream wrote: > PR #3215 creates *optional* unls based on gnxs. I'll wait at least a week before merging this PR. There is plenty of time for comments and corrections. Edward -- You r

PR #3215 is ready for review

2023-06-28 Thread Edward K. Ream
PR #3215 creates *optional* unls based on gnxs. I have been eating my own dog food for days without problems. Please test the *ekr-3181-mypy-links* branch and report any problems. *Settings* leoSettings.leo contains three new settings relat