Re: Why gnx-based unls are important

2023-07-06 Thread Thomas Passin
I have *@string unl-status-kind = legacy *set in myLeoSettings.leo, and the status bar does show the path-based UNL. I added a setting *@string unl-status-kind = gnx* to my workbook, restarted Leo, and for that outline, I see gnx-style addresses in the status bar. Leo 6.7.4-devel, devel

Re: Why gnx-based unls are important

2023-07-06 Thread Thomas Passin
On Thursday, July 6, 2023 at 8:56:59 AM UTC-4 Edward K. Ream wrote: On Wed, Jul 5, 2023 at 10:53 PM Thomas Passin wrote: This is why I am sticking with the legacy format for the status bar. What do you mean by "This"? What @iamap wrote: "Btw, I do believe gnx-based un

Re: "Unbreakable UNLs" Can Break Under A Common Scenario

2023-07-06 Thread Thomas Passin
ike CTRL-D) and moving it by cut-paste. I would say that a user who has not thought about, or maybe not even learned about, gnx's would not expect a unl to break when he did a cut-paste on a node. On Thursday, July 6, 2023 at 8:49:11 AM UTC-4 Edward K. Ream wrote: > On Thu, Jul 6, 2023 at 7

Re: "Unbreakable UNLs" Can Break Under A Common Scenario

2023-07-06 Thread Thomas Passin
is attached. On Thursday, July 6, 2023 at 8:31:07 AM UTC-4 Edward K. Ream wrote: > On Thu, Jul 6, 2023 at 6:40 AM Thomas Passin wrote: > > Maybe a paste of a node should always maintain the gnx unless it would >> create a clone. >> > > Hmm. Under what circumstance woul

Re: Proposal: abandon support for .json files and jupyter notebooks.

2023-07-06 Thread Thomas Passin
I might be more receptive to this idea if we can come up with a way for a user to change in and out of the stay-on-top property and the opacity. It won't work as one-size-fits-all, in my experience. On Thursday, July 6, 2023 at 1:20:46 AM UTC-4 iamap...@gmail.com wrote: > Btw, I believe

Re: "Unbreakable UNLs" Can Break Under A Common Scenario

2023-07-06 Thread Thomas Passin
Maybe a paste of a node should always maintain the gnx unless it would create a clone. On Thursday, July 6, 2023 at 12:21:12 AM UTC-4 Thomas Passin wrote: > I think it's not uncommon to cut a node and paste it somewhere else in the > outline. For example, if I want to move a node fro

"Unbreakable UNLs" Can Break Under A Common Scenario

2023-07-05 Thread Thomas Passin
I think it's not uncommon to cut a node and paste it somewhere else in the outline. For example, if I want to move a node from near the top to near the bottom of a long outline, it would be impractical to move it down node by node or to drag it. I simply cut and paste it. Trouble is, when

Re: Proposal: abandon support for .json files and jupyter notebooks.

2023-07-05 Thread Thomas Passin
On Wednesday, July 5, 2023 at 11:45:48 PM UTC-4 iamap...@gmail.com wrote: Thank you for providing a detailed explanation. By the way, I discovered the `add-editor` command, although it is not as versatile as the FW. I always had trouble using an added editor. I was forever switching one to

Re: Why gnx-based unls are important

2023-07-05 Thread Thomas Passin
This is why I am sticking with the legacy format for the status bar. On Wednesday, July 5, 2023 at 11:27:18 PM UTC-4 iamap...@gmail.com wrote: > Everything will work provided you define *@data unl-path-prefixes* in > your *myLeoSettings.leo* file *on each platform*. These data should > define

Re: Custom Menus Can Be Very Useful - An Example

2023-07-05 Thread Thomas Passin
. On Wednesday, July 5, 2023 at 10:58:50 PM UTC-4 iamap...@gmail.com wrote: > On Thu, Jul 6, 2023 at 10:51 AM Thomas Passin wrote: > >> Just so. I like some custom buttons, but you can only have so many. >> > > I have a small trick where I can place the iconbar vertically on the side

Re: Proposal: abandon support for .json files and jupyter notebooks.

2023-07-05 Thread Thomas Passin
On Wednesday, July 5, 2023 at 10:30:39 PM UTC-4 iamap...@gmail.com wrote: There's a large difference between Edward's work flow and mine - not that either of us has a single "work flow", I'm sure. He likes to use clones extensively - often extracting them with the cff command, I think. I

Re: Custom Menus Can Be Very Useful - An Example

2023-07-05 Thread Thomas Passin
Just so. I like some custom buttons, but you can only have so many. On Wednesday, July 5, 2023 at 10:50:21 PM UTC-4 iamap...@gmail.com wrote: > > I create a custom menu for Leo that is located just before the *Help* > menu. > > Thanks for sharing. > It just like grouped buttons. If I really

Re: Why gnx-based unls are important

2023-07-05 Thread Thomas Passin
On Wednesday, July 5, 2023 at 12:57:33 PM UTC-4 jkn wrote: Apologies for not fully following all of the recent good work here. I meant to mention this earlier but just wanted to check this 'platform independent' part. On my Linux box, I get something in the lower 'status bar' like(*)

Re: Proposal: abandon support for .json files and jupyter notebooks.

2023-07-05 Thread Thomas Passin
On Wednesday, July 5, 2023 at 12:15:59 PM UTC-4 iamap...@gmail.com wrote: As you re-organize a file like this, remember that the *extract* minibuffer command makes the process much easier. Add a line to the top of a block you want to extract, select the whole block, and the *extract* command

Re: Proposal: abandon support for .json files and jupyter notebooks.

2023-07-05 Thread Thomas Passin
On Wednesday, July 5, 2023 at 8:00:47 AM UTC-4 iamap...@gmail.com wrote: In most cases reading a .json file into a single file is a good enough *start*. You can then convert the node to @clean and reorganize as you like. OK, it seems like a reasonable solution. Thanks Edward As you

Re: Discuss: retire two of the three new gnx-related settings?

2023-07-05 Thread Thomas Passin
On Wednesday, July 5, 2023 at 10:50:36 AM UTC-4 Edward K. Ream wrote: On Wed, Jul 5, 2023 at 8:48 AM Thomas Passin wrote: As for your expression paths = list(reversed([z.h for z in p.self_and_parents()])), there is no need to cast it to a list. This is the second time you have made

Re: Custom Menus Can Be Very Useful - An Example

2023-07-05 Thread Thomas Passin
thub.io/leo-editor/customizing.html#menus>. On Wednesday, July 5, 2023 at 6:05:59 AM UTC-4 Edward K. Ream wrote: > On Tue, Jul 4, 2023 at 10:31 PM Thomas Passin wrote: > >> I create a custom menu for Leo that is located just before the *Help* menu. >> It's been so useful th

Re: New PRs related to gnx-based unls

2023-07-05 Thread Thomas Passin
As you have probably read by now in my reply to the other post, I don't agree at all. On Wednesday, July 5, 2023 at 8:02:53 AM UTC-4 Edward K. Ream wrote: > PR #3424 contains > *small* tweaks to Leo's code. > > Retiring the two settings

Re: Discuss: retire two of the three new gnx-related settings?

2023-07-05 Thread Thomas Passin
I disagree about removing the *@string unl-status-kind* setting. I get the most value from the status bar when I can see the path of a node. A gnx-based unl tells me nothing useful. If I want to see if the node is in the outline I think it is, I can look at its tab or the title bar of the

Custom Menus Can Be Very Useful - An Example

2023-07-04 Thread Thomas Passin
I create a custom menu for Leo that is located just before the *Help* menu. It's been so useful that I want to encourage others to create their own. You create one in *myLeoSettings.leo* if you want the menu to be available to all outlines, otherwise create in the outline's @settings tree if

Re: gnx-based unls make the backlink and quickMove plugins obsolete

2023-07-03 Thread Thomas Passin
This is getting me to think there should be a new method, say c.getCrossfileUnl(p), that returns a tuple (file, gnx). The caller can then assemble the two components into a cross-outline UNL if desired, or just use the gnx part. There would be no need for a caller to root around to find the

Enhancement - Dragging outline to desktop icon should open in same Leo session

2023-07-03 Thread Thomas Passin
Some people launch Leo from a desktop icon. If you have such an icon and drag'n'drop an outline on it, the outline will open in a new Leo session. Drag another outline, get yet another Leo session. Some programs (e.g., Notepad++ on Windows) will open dropped files in the same open session.

Re: Debate: always save session data?

2023-07-03 Thread Thomas Passin
On Monday, July 3, 2023 at 10:57:02 AM UTC-4 Edward K. Ream wrote: I'm going to shorten *--always-write-session-data* to *--write-session*. Remember to change *-a* to *-w *(it's the kind of thing I would forget :-) ). -- You received this message because you are subscribed to the Google

Re: Debate: always save session data?

2023-07-03 Thread Thomas Passin
I just tested the new code for *--always-write-session-data*, and it worked as expected: 1. Open Leo and load several outlines; 2. Close Leo and re-open with *.leo\workbook.leo* on the command line; 3. Close and re-open Leo without an outline on the command line. 4. Observe that the several

Re: Discuss: Remove all session commands?

2023-07-02 Thread Thomas Passin
I'm not sure we are disagreeing here, and maybe I don't understand the state of the code. I'm saying that if the other commands are in there and working, might as well leave them in. That wouldn't be featuritis since no features would be added. I suppose you could call it "conservation of

Re: Discuss: Remove all session commands?

2023-07-02 Thread Thomas Passin
On Sunday, July 2, 2023 at 10:09:56 AM UTC-4 Edward K. Ream wrote: Leo's now requires only two methods from leoSessions.py: *SM.save_snapshot* and *SM.load_snapshot*. These two methods read and write json data to *~/.leo/session.leo*. Issue #3409

Re: PR3215 UNL Not Found By CTRL-Click

2023-07-01 Thread Thomas Passin
All right, let's put it on the back burner for after the next release. I'll create a reminder issue for it. On Saturday, July 1, 2023 at 5:22:42 AM UTC-4 Edward K. Ream wrote: > On Fri, Jun 30, 2023 at 9:08 PM Thomas Passin wrote: > > Just one thing ... when a CTRL-Click on a UNL

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

2023-06-30 Thread Thomas Passin
On Friday, June 30, 2023 at 10:17:35 PM UTC-4 Thomas Passin wrote: I tested the script with the latest revision of the PR3215 branch that has all the UNL/GNX changes. It still works, Glory Hallelujah! On Wednesday, June 28, 2023 at 10:14:50 AM UTC-4 Edward K. Ream wrote: On Wed, Jun 28, 2023

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

2023-06-30 Thread Thomas Passin
I tested the script with the latest revision of the PR3215 branch that has all the UNL/GNX changes. It still works, Glory Hallelujah! On Wednesday, June 28, 2023 at 10:14:50 AM UTC-4 Edward K. Ream wrote: > On Wed, Jun 28, 2023 at 8:09 AM HaveF HaveF wrote: > > > Super useful function! It

Re: PR3215 UNL Not Found By CTRL-Click

2023-06-30 Thread Thomas Passin
All right, after merging the latest rev, the outlines open correctly on restart, and there is no message about the missing set-rep-dir.cmd file. I went back and checked that problematic UNL and it still is handled correctly. Just one thing ... when a CTRL-Click on a UNL navigates to its

Re: PR3215 UNL Not Found By CTRL-Click

2023-06-30 Thread Thomas Passin
UTC-4 Edward K. Ream wrote: > On Fri, Jun 30, 2023 at 1:25 PM Thomas Passin wrote: > >> Testing the PR3215 branch, I stumbled onto this path-based UNL that Leo >> cannot find using a CTRL-click in a different outline. I copied this UNL >> right from the status bar: >

Re: Transliterate mypy into rust? Using ChatGPT??

2023-06-30 Thread Thomas Passin
I'd try for Julia, myself. It's much more like Python, and reputedly very fast. I think the program is too large to be easy to find all the things the ChatGPT would get plausible but wrong ... On Friday, June 30, 2023 at 3:12:08 PM UTC-4 Edward K. Ream wrote: > I've just asked this question

PR3215 UNL Not Found By CTRL-Click

2023-06-30 Thread Thomas Passin
Testing the PR3215 branch, I stumbled onto this path-based UNL that Leo cannot find using a CTRL-click in a different outline. I copied this UNL right from the status bar: unl://C:/Tom/git/leo-editor/leo/core/LeoPyRef.leo#Code-->Gui base classes-->@file leoFind.py-->class LeoFind

Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Thomas Passin
On Friday, June 30, 2023 at 10:01:24 AM UTC-4 Edward K. Ream wrote: The idea, n*ow fully realized* in PR #3215 , is this: 1. On exit, Leo *always* saves a list of open outlines (automatic session-snapshot-save). 2. When you open Leo without

Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Thomas Passin
Sorry, posted by mistake before I was finished. On Friday, June 30, 2023 at 9:17:54 AM UTC-4 Thomas Passin wrote: On Friday, June 30, 2023 at 9:00:13 AM UTC-4 Edward K. Ream wrote: On Friday, June 30, 2023 at 7:54:48 AM UTC-5 Thomas wrote: I think this is exactly what is wanted most

Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Thomas Passin
On Friday, June 30, 2023 at 9:00:13 AM UTC-4 Edward K. Ream wrote: On Friday, June 30, 2023 at 7:54:48 AM UTC-5 Thomas wrote: I think this is exactly what is wanted most of the time, especially if each of the session-loaded outlines gets navigated to the focus when Leo was last closed. The

Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Thomas Passin
On Friday, June 30, 2023 at 8:41:08 AM UTC-4 Edward K. Ream wrote: 1. On exit, Leo *always* saves a list of open outlines (automatic session-snapshot-save). 2. When you open Leo without specifying any files Leo opens the saved list of outlines (automatic session-snapshot-load). I think this

Re: Heads up: The SessionManager class will go away

2023-06-29 Thread Thomas Passin
I will second this desire. I really like being able to restart Leo and pick up right where I left off. I think that has been a very positive trait of Leo. In fact, it gives the user - or at least me - a sense that Leo is especially well engineered and that user needs have been carefully

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-29 Thread Thomas Passin
Even though I dislike PRs that are very complicated and try to do too many things, I have to agree in this case. On Thursday, June 29, 2023 at 5:37:32 PM UTC-4 Edward K. Ream wrote: > On Thursday, June 29, 2023 at 3:43:22 AM UTC-5 Edward K. Ream wrote: > > > See #3404

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

2023-06-29 Thread Thomas Passin
I've wondered about this, too. It seems obvious to me that if LeoPyRef has been changed outside of the Leo session that Leo should restart. This could happen, e.g., if the user checks out a different branch of leo-editor or updates the current branch. For other outlines, maybe the thinking

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Thomas Passin
sue 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 11

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

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

Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Thomas Passin
on the command line. Clearing the recent files list had no effect on the behavior. Nether did deleting the .leo\db directory. On Tuesday, June 27, 2023 at 5:55:37 PM UTC-4 Thomas Passin wrote: > I haven't filed an issue on this yet because I haven't got all the > conditions naile

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

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

Heads Up - My Workbook Is Getting Destroyed

2023-06-27 Thread Thomas Passin
I haven't filed an issue on this yet because I haven't got all the conditions nailed down. But Leo has been replacing my workbook with the default CheatSheet ... sometimes. *Please* make sure you have a backup copy until this gets resolved. I noticed this behavior while I was testing code

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

2023-06-27 Thread Thomas Passin
I have several immediate reactions: 1. It was not long ago that we had a long discussion about whether to keep using functions in @path headlines. The outcome was no, don't include them. Why should it be different here? 2. Existing code in plugins and application-style scripts will break,

Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Thomas Passin
On Monday, June 26, 2023 at 2:26:36 PM UTC-4 Edward K. Ream wrote: On Mon, Jun 26, 2023 at 12:50 PM Thomas Passin wrote: 2. Both the bookmark manager and the zettelkasten apps partially work but not completely. I will look at using these new "legacy" methods next. Let me kno

Status bar behavior, especially with PR 3215

2023-06-26 Thread Thomas Passin
In the status bar, a right-click brings up a two-item context menu: *Select All* and *Copy*. I have always found this a little confusing. *Copy* implies that it will copy the contents (usually the UNL), but actually you have to select it first before *Copy* will do anything. It's possible to

Re: Execute-script in leojs

2023-06-26 Thread Thomas Passin
Lovely! Felix, I have to applaud all this hard and creative work you've been doing! On Monday, June 26, 2023 at 10:26:09 PM UTC-4 Félix wrote: > 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

Re: Code Review, Requirements, and Community Particiation

2023-06-26 Thread Thomas Passin
On Monday, June 26, 2023 at 5:15:45 PM UTC-4 mys...@gmail.com wrote: On Mon, Jun 26, 2023, 13:34 Thomas Passin wrote: In the announcement about the proposed PR 3215 that massively affects UNLs, @Edward wrote "I won't wait for a code review. The code involved is too tricky to under

Code Review, Requirements, and Community Particiation

2023-06-26 Thread Thomas Passin
In the announcement about the proposed PR 3215 that massively affects UNLs, @Edward wrote "I won't wait for a code review. The code involved is too tricky to understand in an hour or five." This statement contains two red flags. If it's too tricky for a code review, there's something out of

Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Thomas Passin
Something close to seven plugins use unls, including mod-http and quickMove. They should all be checked to see if they will still work (I don't know which of them still work apart from unl changes). -- You received this message because you are subscribed to the Google Groups "leo-editor"

Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Thomas Passin
On Monday, June 26, 2023 at 2:26:36 PM UTC-4 Edward K. Ream wrote: On Mon, Jun 26, 2023 at 12:50 PM Thomas Passin wrote: g.findGNX searches all *open* windows. The legacy version of g.handleUnl contained Leo-specific code which I deleted. Afterwards, the code called g.openWithFileName

Re: my excel file is not updated to add new data

2023-06-26 Thread Thomas Passin via Python-list
On 6/26/2023 1:46 PM, small marcc via Python-list wrote: pandas.ExcelWriter import pandas This code creates the path to the Excel file where the data will be written. It checks if the file already exists, and if so, reads the existing data into a DataFrame. Otherwise, it creates a new empty

Re: leojs alpha

2023-06-26 Thread Thomas Passin
On Monday, June 26, 2023 at 10:09:17 AM UTC-4 jkn wrote: If the former, I'm wondering how 'upstream' work on Leo gets incorporated. If the latter, I'm curious about the process... Keeping two code bases synchronized is nearly impossible in the long run. Each one evolves in its own way, and

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

2023-06-26 Thread Thomas Passin
On Monday, June 26, 2023 at 1:47:07 PM UTC-4 Edward K. Ream wrote: On Sun, Jun 25, 2023 at 10:22 AM Thomas Passin wrote: > Great! And if you want to do the same for a UNL in another outline, you can add these two lines (at least until that PR gets merged; I don't know about af

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

2023-06-26 Thread Thomas Passin
On Monday, June 26, 2023 at 1:29:24 PM UTC-4 Edward K. Ream wrote: On Sun, Jun 25, 2023 at 7:51 AM Thomas Passin wrote: "Remove support for cross-file UNLs" - WTF??? This will break some of my scripts. How are we going to navigate to other outlines by UNL? Wasn't that half of

Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Thomas Passin
After checking out the branch for this PR: 1. CTRL-clicking on an old-style unl pointing into the same outline navigates to the right node; for a unl pointing into a different outline it does not navigate to the right place or even the right outline. 2. Both the bookmark manager and the

Re: About PR #3215: unbreakable unls!

2023-06-26 Thread Thomas Passin
On Monday, June 26, 2023 at 7:34:57 AM UTC-4 Edward K. Ream wrote: On Sun, Jun 25, 2023 at 10:44 PM Thomas Passin wrote: Actually, bookmarks and zettelkasten should work *better* than before, provided: - they use the *new* p.get_UNL() and - they work with both legacy and new unls, which

Re: About PR #3215: unbreakable unls!

2023-06-25 Thread Thomas Passin
On Sunday, June 25, 2023 at 10:36:32 PM UTC-4 Edward K. Ream wrote: On Sun, Jun 25, 2023 at 4:48 PM Thomas Passin wrote: So now my bookmarks manager will not work, something I use every day and depend on. I suppose I will have to pull out code from the attic and put it into my own module

Re: About PR #3215: unbreakable unls!

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

Re: About PR #3215: unbreakable unls!

2023-06-25 Thread Thomas Passin
I would rather have created a new gnx:// type and left existing unls alone. Will existing UNL syntax and methods still work? On Sunday, June 25, 2023 at 12:00:26 PM UTC-4 Edward K. Ream wrote: > PR #3215 changes > many files in complex

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

2023-06-25 Thread Thomas Passin
On Sunday, June 25, 2023 at 10:20:28 AM UTC-4 iamap...@gmail.com wrote: c0, p0 = c, c.p c2 = g.handleUnl(unl, c) content = c2.p.b # < here is the content of the UNL's body c0.selectPosition(p) Oops, typo! The last line should read c0.selectPosition(p0) Hi, Thomas, It works, thank you!

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

2023-06-25 Thread Thomas Passin
ike markdown `[something](unl://xxx)` or even > pass parameter to that schema if the unl is a script... > `unl://x?para1=leo` > > On Sun, Jun 25, 2023 at 9:07 PM Thomas Passin wrote: > >> On Sunday, June 25, 2023 at 9:05:20 AM UTC-4 Thomas Passin wrote: >> >>

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

2023-06-25 Thread Thomas Passin
On Sunday, June 25, 2023 at 9:05:20 AM UTC-4 Thomas Passin wrote: On Sunday, June 25, 2023 at 8:43:25 AM UTC-4 iamap...@gmail.com wrote: For now, my UNL points to a position of the current outline. Could we have a quick way to get it? Assuming that these commands will continue to work after

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

2023-06-25 Thread Thomas Passin
On Sunday, June 25, 2023 at 8:43:25 AM UTC-4 iamap...@gmail.com wrote: For now, my UNL points to a position of the current outline. Could we have a quick way to get it? Assuming that these commands will continue to work after the PR: c0, p0 = c, c.p c2 = g.handleUnl(unl, c) content = c2.p.b

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

2023-06-25 Thread Thomas Passin
"Remove support for cross-file UNLs" - WTF??? This will break some of my scripts. How are we going to navigate to other outlines by UNL? Wasn't that half of the point of having UNLs in the first place? This looks like a situation where we should be adding a new API method, not changing how

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

2023-06-25 Thread Thomas Passin
On Sunday, June 25, 2023 at 7:59:09 AM UTC-4 iamap...@gmail.com wrote: Would you explain more fully what you mean by "access the content of..."? One way is to CTRL-click on the UNL's string in a body node. This will navigate you to that location, opening the outline if necessary. It

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

2023-06-25 Thread Thomas Passin
On Sunday, June 25, 2023 at 3:27:38 AM UTC-4 iamap...@gmail.com wrote: [snip] 2. Is there a simple method to access the content of a specific `unl://` node? I found `core/LeoPyRef.leo#Code-->Core classes-->@file leoGlobals.py-->g.Urls & UNLs`, but it doesn't seem to provide the right

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

2023-06-25 Thread Thomas Passin
On Sunday, June 25, 2023 at 3:27:38 AM UTC-4 iamap...@gmail.com wrote: [snip] 2. Is there a simple method to access the content of a specific `unl://` node? I found `core/LeoPyRef.leo#Code-->Core classes-->@file leoGlobals.py-->g.Urls & UNLs`, but it doesn't seem to provide the right function

Re: TKinter in Python - advanced notions

2023-06-23 Thread Thomas Passin via Python-list
On 6/23/2023 4:16 AM, Andreas Heckel via Python-list wrote: Hi, Apologies for potentially mis-using this thread. But I have been struggling recently making exactly this leap from simple GUI examples to a more elaborate MVVM concept. Mainly I have been struggling finding nice example python

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

2023-06-23 Thread Thomas Passin
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

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

2023-06-23 Thread Thomas Passin
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

Re: ChatGPT Helpful In Translating Tables

2023-06-22 Thread Thomas Passin
Even copying selected text out of a pdf file can be unpleasant. Often there will be no newlines, so words may run together when they were visually separated by a line break. On Thursday, June 22, 2023 at 8:52:14 AM UTC-4 David Szent-Györgyi wrote: > On Sunday, June 18, 2023 at 11:06:30 PM

Re: File system path annotations

2023-06-19 Thread Thomas Passin via Python-list
On 6/19/2023 10:04 AM, Roel Schroeven via Python-list wrote: Op 19/06/2023 om 11:44 schreef Peter Slížik: Thank you, Roel. You've answered all my questions. > [PEP 519]: ...as that can be represented with typing.Union[str, bytes, os.PathLike] easily enough and the hope is users > will slowly

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

2023-06-19 Thread Thomas Passin
Various Linuces: 3.11 Manjaro: leo\unittests\test_importers.py ...s... [ 5%] warnings summary leo/plugins/leo_babel/tests/lib_test.py:118

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

2023-06-19 Thread Thomas Passin
On Windows 10, py -3.xx pytest: python 3.11: leo\unittests\test_importers.py ...s... [ 5%] warnings summary leo\plugins\leo_babel\tests\lib_test.py:118

ChatGPT Helpful In Translating Tables

2023-06-18 Thread Thomas Passin
Very thoughtful piece by Jon Udell - Why LLM-assisted table transformation is a big deal . -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To

Re: Please test Leo's options code in devel

2023-06-18 Thread Thomas Passin
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

Re: Please test Leo's options code in devel

2023-06-18 Thread Thomas Passin
Python 3.9 on Linux Mint: === 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

Re: Please test Leo's options code in devel

2023-06-18 Thread Thomas Passin
18, 2023 at 10:09:05 PM UTC-4 Thomas Passin wrote: > On Windows 10, python 3.11, pytest passes all tests. python 3.10: > > warnings summary > leo\plugins\leo_babel\tests\lib_test.py:118 > C:\Tom\git\leo-editor\leo\plugins\

Re: Please test Leo's options code in devel

2023-06-18 Thread Thomas Passin
On Windows 10, python 3.11, pytest passes all tests. python 3.10: warnings summary leo\plugins\leo_babel\tests\lib_test.py:118 C:\Tom\git\leo-editor\leo\plugins\leo_babel\tests\lib_test.py:118: PytestCollectionWarning: cannot collect

Re: PR #3397 (screen shots) is ready for review

2023-06-18 Thread Thomas Passin
Oh, I misunderstood. I thought you meant that the PR had already been merged. What I'm looking at in the plugins directory must be the old version. On Sunday, June 18, 2023 at 2:06:53 PM UTC-4 Thomas Passin wrote: > It's in the plugins directory but not in LeoPyRef as yet. There is a

Re: PR #3397 (screen shots) is ready for review

2023-06-18 Thread Thomas Passin
It's in the plugins directory but not in LeoPyRef as yet. There is also a screen_capture.py plugin ... how do they differ? On Sunday, June 18, 2023 at 1:59:15 PM UTC-4 Edward K. Ream wrote: > PR #3397 : > > 1. Removes all traces of the

Distutils Will Be Gone From The Standard Library In Python 3.12

2023-06-17 Thread Thomas Passin
I don't know if Leo uses distutils in any way, but it won't be in the standard library any more. It has been absorbed into *setuptools*, so its features aren't really gone, but how to use them will change. -- You received this message because you are

Re: Open new window

2023-06-17 Thread Thomas Passin
On Saturday, June 17, 2023 at 2:16:13 PM UTC-4 Thomas Passin wrote: I've attached an image file illustrating this (this example was provided by @wangzhaohe). I meant to write "this asciidoc markup was provided by @wangzhaohe". -- You received this message because you are

Re: PR #3390 (more options work) merged into devel

2023-06-17 Thread Thomas Passin
Run from the leo-editor directory: py -m pytest [snip] leo\unittests\core\test_leoImport.py:106: AssertionError warnings summary leo\plugins\leo_babel\tests\lib_test.py:118

Re: Open new window

2023-06-17 Thread Thomas Passin
Yes, but just how depends on what you mean. For example, you can open a Qt window that displays MatPlotLib or Qt graphics. Or, if within Leo you run some MatPlotLib code, the pyplot.plot() command will open a window to display the plots. You can also run code for a system like Bokeh or

Re: Enum + new in 3.11

2023-06-16 Thread Thomas Passin via Python-list
On 6/16/2023 7:37 PM, dn via Python-list wrote: On 16/06/2023 23.47, Thomas Passin via Python-list wrote: On 6/16/2023 1:40 AM, dn via Python-list wrote: Have you figured-out a use for the @enum.member and @enum.nonmember decorators (new in Python 3.11)? mypy is having trouble with 3.11

Re: New argument processing code merged into devel

2023-06-16 Thread Thomas Passin
One additional idea you might entertain as long as you are thinking about argument parsing functions. Most command line processing functions return a string, and it is up to the downstream code to convert it to an int, float, whatever. My own - overly simple, for sure - includes an optional

Re: Enum + new in 3.11

2023-06-16 Thread Thomas Passin via Python-list
On 6/16/2023 1:40 AM, dn via Python-list wrote: Have you figured-out a use for the @enum.member and @enum.nonmember decorators (new in Python 3.11)? "What's New" says: Added the member() and nonmember() decorators, to ensure the decorated object is/is not converted to an enum member. The

Re: Discuss: don't use argparse to handle command-line arguments

2023-06-15 Thread Thomas Passin
er is missing its required value' % param raise ValueError(msg) return option On Thursday, June 15, 2023 at 8:50:14 AM UTC-4 Thomas Passin wrote: > I wrote my own a few years ago. It was simple to use and understand. It > was too simple, perhaps, but it did what I needed for a

Re: Discuss: don't use argparse to handle command-line arguments

2023-06-15 Thread Thomas Passin
I wrote my own a few years ago. It was simple to use and understand. It was too simple, perhaps, but it did what I needed for a range of small programs. The only thing it doesn't do is to flag unknown options: it ignores them instead. I say, if you don't need all the complexity of argparse

Re: Improved recursive import in devel. Please update scripts

2023-06-14 Thread Thomas Passin
On Wednesday, June 14, 2023 at 11:06:01 AM UTC-4 Edward K. Ream wrote: On Wed, Jun 14, 2023 at 8:06 AM Edward K. Ream wrote: On Wednesday, June 14, 2023 at 8:00:08 AM UTC-5 Edward K. Ream wrote: PR #3363 improves the outlines created by

Re: Fwd: AUTO EDITOR DIDN'T WORK

2023-06-13 Thread Thomas Passin via Python-list
On 6/13/2023 9:43 PM, gene heskett via Python-list wrote: On 6/13/23 19:10, Thomas Passin via Python-list wrote: On 6/13/2023 5:32 PM, Alan Gauld via Python-list wrote: Okay thanks. Meanwhile, I am not tech savvy so I may not say much here. I followed all the commands as given on the website

Re: Fwd: AUTO EDITOR DIDN'T WORK

2023-06-13 Thread Thomas Passin via Python-list
On 6/13/2023 5:32 PM, Alan Gauld via Python-list wrote: Okay thanks. Meanwhile, I am not tech savvy so I may not say much here. I followed all the commands as given on the website to install auto editor standing it on python but after rendering the XML file, I couldn't open it with my Davinci

Mint/XFCE Update May Cause Viewrendered3 Plugin to Crash Leo

2023-06-13 Thread Thomas Passin
It may even crash the whole system. This is not a bug in VR3, but some disconnect between a XFCE change in the OpenGL graphics version and its support. Other projects have had the same problem. The error message is strange, supposedly from vmware: "vmw_ioctl_command error Cannot allocate

Re: AUTO EDITOR DIDN'T WORK

2023-06-12 Thread Thomas Passin via Python-list
On 6/12/2023 5:26 AM, Real Live FootBall Tv via Python-list wrote: I recently Installed and Uninstalled Python, hence the system was trying to get why I UNINSTALLED python. I did it because I was going to use it with another application, A VIDEO EDITING APP, Auto EDITOR but it didn't work for

<    1   2   3   4   5   6   7   8   9   10   >