Re: macos 10.13 - leo 6.7.0 with miniconda

2022-10-16 Thread Thomas Passin
It's not very clear to me what kind of interface you are talking about.  I 
don't remember that far back.  Not SDI, apparently.  Not one window per 
outline.  No tabs.  So there must have been some other way to select which 
outline to view within the single Leo window.  Presumably that would have 
been some kind of a list of windows, something like a most recently used 
file list?  Or a dialog that popped up and listed the outlines?

Actually, Leo's *Files/Recent Files* menu *does* list open outlines.  They 
seem to be listed first. It's just that it doesn't show the open ones any 
differently from recent but closed ones, so it's hard to tell what's 
opened.  Maybe its display can be tweaked a little.  All the open outlines 
could be shown at the top, and the recent but closed entries below, 
separated by a separator line.  That shouldn't be too hard to arrange (for 
someone who knows how that menu item works).

Of course, if you are going to be working with 30 open outlines, it's going 
to be a little cumbersome to deal with no matter how you do it ...

On Sunday, October 16, 2022 at 1:26:51 PM UTC-4 kars...@googlemail.com 
wrote:

>
> ...
> I should have mentioned that the old code created so-called "SDI" windows 
> . To 
> repeat, I have no recollection of how Leo switched between open documents.
>
> 5.7.2 had normal windows. SDI windows are annoying but iirc were WINDOWS 
> only and deprecated for decades.
>
> I was looking for an easy switch. Apparently that's not there anymore.
>

-- 
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/510fef35-2a4e-417d-a261-95bb743a074an%40googlegroups.com.


Interesting Quote On Communication Via The Program

2022-10-17 Thread Thomas Passin
This paragraph caught my eye:

"One of the early experiences that led me to focus on communication was 
discovering Knuth's Literate Programming: a progam should read like a book. 
It should have plot, rhythm, and delightful little turns of phrase. When 
Ward Cunningham and I first read about literate programs, we decided to try 
it. We sat down with one of the cleanest pieces of code in the Smalltalk 
image, the ScrollController, and tried to make it into a story. Hours later 
we had completely rewritten the code on our way to a reasonable paper. 
Every time a bit of logic was a little hard to explain, it was easier to 
rewrite the code than explain why the code was hard to understand. The 
demands of communication changed our perspective on coding."

>From Kent Beck. "A Theory of Programming". Dr. Dobb's Journal, November 2007

-- 
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/b9b95e89-ed14-4cc3-ad33-83c43da984cen%40googlegroups.com.


Re: Interesting Quote On Communication Via The Program

2022-10-17 Thread Thomas Passin
I think that the idea that code should be able to communicate its intent 
clearly and simply is a good goal.  I also think that there are times when 
an explanation in a judicious comment as to why it's being done this way, 
or what is to be accomplished, can be very helpful.

On Monday, October 17, 2022 at 1:56:38 PM UTC-4 Edward K. Ream wrote:

> On Mon, Oct 17, 2022 at 10:17 AM Thomas Passin  wrote:
>
>> This paragraph caught my eye:
>>
>> "One of the early experiences that led me to focus on communication was 
>> discovering Knuth's Literate Programming: a progam should read like a book. 
>> It should have plot, rhythm, and delightful little turns of phrase. When 
>> Ward Cunningham and I first read about literate programs, we decided to try 
>> it. We sat down with one of the cleanest pieces of code in the Smalltalk 
>> image, the ScrollController, and tried to make it into a story. Hours later 
>> we had completely rewritten the code on our way to a reasonable paper. 
>> Every time a bit of logic was a little hard to explain, it was easier to 
>> rewrite the code than explain why the code was hard to understand. The 
>> demands of communication changed our perspective on coding."
>>
>
> Thanks for this. As you know, I have a different opinion. Rather than a 
> novel, programs are more like a reference book. Narrative is great for a 
> Theory of Operation. For everything else, not so much.
>
> 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/1777f039-f0de-44d3-83d5-26c4130d68c5n%40googlegroups.com.


Re: Interesting Quote On Communication Via The Program

2022-10-17 Thread Thomas Passin
On Monday, October 17, 2022 at 2:17:35 PM UTC-4 Edward K. Ream wrote:

> On Mon, Oct 17, 2022 at 1:16 PM Thomas Passin  wrote:
>
>> I think that the idea that code should be able to communicate its intent 
>> clearly and simply is a good goal.  I also think that there are times when 
>> an explanation in a judicious comment as to why it's being done this way, 
>> or what is to be accomplished, can be very helpful.
>>
>
> Who could argue with that :-)
>

There seem to be some people who think that code can speak for itself and 
need no comments at all.  I am not one of them.

-- 
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/9615b805-4a3e-4694-bc7d-181597bce6b8n%40googlegroups.com.


Re: Devel now disables plain key outline searches

2022-10-18 Thread Thomas Passin
The behavior confused me too.  It means that if you are focused in the 
outline pane, and type, say, a "d", the focus moves to the next headline 
that contains a "d".  I think it's a vestigial remnant of an attempt to 
have a more sophisticated (but complicated) way of navigating to a node.

In practice, if the focus shifted to the outline pane but you thought it 
was still in the body - the usual case for me - when you started typing the 
outline would start jumping around apparently without rhyme or reason.

On Tuesday, October 18, 2022 at 1:01:10 PM UTC-4 jkn wrote:

> Can you explain what this actually affects, please? The current 
> description:
>
> True: plain keys in the outline pane search for headlines.
> False: Ignore plain keys in the outline pane.
>
> doesn't make much sense to me...
>
> Thanks, J^n
>
>
> On Tuesday, October 18, 2022 at 11:44:29 AM UTC+1 Edward K. Ream wrote:
>
>> I was shocked that the default for @bool plain-key-outline-search was 
>> True. 
>>
>> Rev fa3ad59 
>> 
>>  
>> in devel makes the default False.
>>
>> This is the kind of nerdy featuritis that should *never* be the default. 
>> This change is reason enough to release Leo 6.7.1 in November.
>>
>> If you do use this feature, please update your myLeoSettings.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/64900323-5d3a-4759-b2a6-701db54d03fen%40googlegroups.com.


Re: A recent update has broken my Leo installation

2022-10-19 Thread Thomas Passin
The printout should have included the exception, according to the code in 
runLeo.  Does something else get printed before the message that you quoted?

On Wednesday, October 19, 2022 at 7:01:35 AM UTC-4 Edward K. Ream wrote:

> On Wed, Oct 19, 2022 at 1:38 AM Richard Twyning <
> service.manag...@gmail.com> wrote:
>
>
>> I'm getting...
>> *** Leo could not be started ***
>>
>  ...
>
>> Is there anything more specific I can look at that tells me exactly 
>> what's missing?
>>
>
> Excellent question.
>
> The message comes from runLeo.py. I would do the following:
>
> - Edit leo/core/runLeo.py in your favorite text editor.
> - After line 39, insert these two lines (right before the 'try' statement):
>
> import pdb
> pdb.set_trace()
>
> Now invoke `python runLeo.py` from the command line. You should drop into 
> python's pdb debugger .
>
> pdb will (eventually) show the exception that caused the message, so you 
> can just type 'n' until you see the exception.  That may be enough of a 
> hint.  If not, you can rerun `python runLeo.py`, choosing 's' instead of 
> 'n' to trace into the import logic.
>
> HTH. Please let me know if this strategy doesn't work.
>
> 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/3674a769-668f-44f2-8282-9842289949can%40googlegroups.com.


Re: Formatting of "devel" in docs

2022-10-19 Thread Thomas Passin
A single asterisk or backtick before and after gives italics, double 
asterisks give bold.  Underscores are used by Markdown. Well, Github 
markdown, anyway not sure about others.  Asterisks also work for Markdown.

On Wednesday, October 19, 2022 at 1:11:03 PM UTC-4 thequie...@gmail.com 
wrote:

> At this link 
>  we 
> read:
>
> followed by checking out the _devel_ branch:
>
> But `_devel_` is deceptive because the actual branch is `devel` 
>
> I think some intended emphasis formatting failed. What format is used for 
> this text? restructured text?
>
> Should there be 2 underscores before and after "devel" instead of one?
>
> I'll be happy to supply a PR once I know the right way to go with a fix.
>
>
>

-- 
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/a1785641-dc39-41d8-8585-d58087c65d04n%40googlegroups.com.


Re: `git checkout devel` fails

2022-10-19 Thread Thomas Passin
I don't know the answer, but here's something to check.  Go to the .git 
directory for your leo-editor repo, and look at the file named *config.* It 
will tell you the branches that git knows about for your clone.  Mine 
starts like this:

[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[submodule]
active = .
[remote "origin"]
url = https://github.com/tbpassin/leo-editor.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "upstream"]
url = https://github.com/leo-editor/leo-editor.git
fetch = +refs/heads/*:refs/remotes/upstream/*
[branch "6.2"]
remote = origin
merge = refs/heads/6.2
[branch "devel"]
remote = upstream
merge = refs/heads/devel

>From the git clone manual page:

"After the clone, a plain git fetch without arguments will update all the 
remote-tracking branches, and a git pull without arguments will in addition 
merge the remote master branch into the current master branch, if any"

Maybe you just need to do git fetch or git pull.

On Wednesday, October 19, 2022 at 1:17:18 PM UTC-4 thequie...@gmail.com 
wrote:

> I forked leo and then cloned my fork and then attempted to switch to the 
> devel branch and it failed.
>
> Is there not a contributing section in the official docs that shows one 
> how to get started? 
>
> cmd.exe shell transcript follows:
> [snip]
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

-- 
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/7d74af64-b291-46f2-b777-c7c35f71b36an%40googlegroups.com.


Re: What lies ahead; what lies beneath

2022-10-21 Thread Thomas Passin
On Friday, October 21, 2022 at 9:14:16 AM UTC-4 Edward K. Ream wrote:

> On Thursday, October 20, 2022 at 7:59:40 AM UTC-5 Edward K. Ream wrote:
>
> We recently discussed the role of comments and narratives in our programs. 
>> coverage has some of the best docstrings I've ever seen.  Two longish 
>> examples: [snip]
>>
>
> Notice the contingent and pragmatic nature of these (excellent!) comments:
>
> - They depend on the actual code: they could not have been written 
> beforehand.
> - They are *not* part of a general narrative: they discuss low-level 
> details or bugs.
>

And they are essential for understanding why the code is there and is the 
way it is.  I don't think reading the same code without the comments would 
let any normal person modify or rewrite the code without messing up the 
program's desired operation.

-- 
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/dcf22d9d-cac7-4bdb-acfa-2f5ff8bf0407n%40googlegroups.com.


Re: Annoyances

2022-10-23 Thread Thomas Passin
For comparison, on my Windows and Linux systems using the devel branch 
(6.7.1-devel) from a few days ago:

On Sunday, October 23, 2022 at 8:37:15 AM UTC-4 kars...@googlemail.com 
wrote:

> Again all this applies to Leo 6.7.0 on macos 10.13.6
>
> The annoyances just for today; trying to do some work.
>
>
> *indent inserts TABs *Even if there is no TAB character in the file, 
> using TAB to indent a selection inserts TAB characters. This goes to the 
> point that Leo refuses to save the file because of mixed TABs and SPACEs
>

Me: For plain nodes with no file type (not an @file, @clean, etc tree), 
 inserts spaces not TABs. 

>
>
> *indent need a selection*I have to select a single line to indent it? 
> Usually I position the cursor at the beginning of a line and press tab.
>
> Me: When the cursor is at the start of a line,  indents it whether or 
not the line has been selected.
 

>
> *find always switches "search Headline" back on*I need this in about 5% 
> of my searches. Press command-F and it's back on.
>
> Me: Same for my systems.  I suppose its a matter of taste, but I agree 
that if it's been unchecked, it should stay unchecked.
 

>
> *find does not honor the "Suboutline only" flag*searches go beyond the 
> selected node at start.
>

Suboutline flag works as expected: searches stop at the end of the subtree.
 

> *find does not always select the found string*
> Doing repeatedly find-next the found string is not always selected; 
> sometimes selected, sometimes blinking cursor.
>

Me: Not sure about this one.  I have only noticed that the found string was 
selected, but it's possible that sometimes it wasn't and I didn't notice.  
I don't use the Find tab very often - I usually use the Nav tab instead - 
so I could be overlooking or not remembering some things.  Have you noticed 
whether  "File Only" searches stay confined to the entire external file 
(@file, @clean, etc)?

It's odd that these behaviors are different on your system.  If it's a 
Mac-specific thing, I won't be able to help track it down.

As a stopgap measure for mixed TABs and spaces, there is a command 
*convert-all-tabs* that converts all TABs to spaces.  You can use it from 
the *Edit/Edit Text*  menu, or as a Minibuffer command  I believe that the 
command operates on the selected node and its subtree.

-- 
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/1c5e994e-db00-414b-aa3c-bde7f4b1e869n%40googlegroups.com.


Re: Annoyances

2022-10-23 Thread Thomas Passin
Remember that when you delete your .leo directory, your myLeoSettings.leo 
and workbook.leo files will go away with it.

On Sunday, October 23, 2022 at 11:04:40 AM UTC-4 kars...@googlemail.com 
wrote:

> I forgot to mention: I'm editing Python files. The only other files  I use 
> with Leo are settings, html and css.
>
> I'l give it another try and delete the ~/.leo directory
>
>
>

-- 
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/0afdcf19-23e3-4fe9-bb88-a057cfbfe0b6n%40googlegroups.com.


Re: Annoyances

2022-10-23 Thread Thomas Passin
 I don't see your problems with @file or @clean python files either.

On Sunday, October 23, 2022 at 11:04:40 AM UTC-4 kars...@googlemail.com 
wrote:

> I forgot to mention: I'm editing Python files. The only other files  I use 
> with Leo are settings, html and css.
>
> I'l give it another try and delete the ~/.leo directory
>
>
>

-- 
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/1db9bdd3-d3e9-40d2-85e5-63123f0ed1c6n%40googlegroups.com.


Re: Annoyances

2022-10-23 Thread Thomas Passin
Wow, that's a lot of strangeness cleared up by deleting the .leo 
directory!  Well done!

On Sunday, October 23, 2022 at 2:27:00 PM UTC-4 kars...@googlemail.com 
wrote:

> On Sunday, October 23, 2022 at 2:37:15 PM UTC+2 Karsten Wolf wrote:
>
>> Again all this applies to Leo 6.7.0 on macos 10.13.6
>>
>> The annoyances just for today; trying to do some work.
>>
>>
>> *indent inserts TABs *Even if there is no TAB character in the file, 
>> using TAB to indent a selection inserts TAB characters. This goes to the 
>> point that Leo refuses to save the file because of mixed TABs and SPACEs
>>
>
> Gone with killing the .leo directory
>
>  
>
>>
>>
>> *indent need a selection*I have to select a single line to indent it? 
>> Usually I position the cursor at the beginning of a line and press tab.
>>
>
> Gone with killing the .leo directory
>  
>
>>
>>
>> *find always switches "search Headline" back on*I need this in about 5% 
>> of my searches. Press command-F and it's back on.
>>
>>
>> *find does not honor the "Suboutline only" flag*searches go beyond the 
>> selected node at start.
>>
>
> Gone with killing the .leo directory
>  
>
>>
>> *find does not always select the found string*
>> Doing repeatedly find-next the found string is not always selected; 
>> sometimes selected, sometimes blinking cursor.
>>
>
> Gone with killing the .leo directory
>
> Now I need my mac keyboard shortcuts working.
>
>  
>

-- 
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/9ab227ed-62e7-4a28-b00f-00bbae0335c1n%40googlegroups.com.


Re: Annoyances

2022-10-25 Thread Thomas Passin
More than likely it was deleting the "db" directory inside ".leo" that did 
the job.  I recently had an infuriating period where I was working with 
LeoPyRef a lot.  Each time I saved the outline, after the save succeeded 
Leo would block for 5 to 10 seconds, or even more.  Nothing I thought of 
did any good.  Finally I deleted the "db" directory and now Leo no longer 
blocks after saving LeoPyRef.

I have no idea how Leo uses its sqlite database, but I notice that in the 
old version - I "deleted" it by renaming it to "dbx" so it's not truly gone 
- the file *g_app_db/cache.sqlite* has a size of 120 kb.  The same file in 
the new "db" directory is only 12 kb.  The other cache.sqlite file in both 
old and new "db" directories are only 12 kb in size.  This makes me wonder 
if Leo sometimes makes a query that takes a very long time to execute if 
the database has been used a lot.  Maybe there needs to be an index on some 
of the fields (if sqlite supports indexes; I've never used it and don't 
know any details about it).  An index can make a dramatic difference for 
queries that need to scan the entire database over and over.

Or maybe that database file needs to be defraged/compacted from time to 
time.  The Thunderbird email client has a command to compact its database, 
and running it can reduce the database size quite a lot.

On Sunday, October 23, 2022 at 5:18:26 PM UTC-4 Thomas Passin wrote:

> Wow, that's a lot of strangeness cleared up by deleting the .leo 
> directory!  Well done!
>
> On Sunday, October 23, 2022 at 2:27:00 PM UTC-4 kars...@googlemail.com 
> wrote:
>
>> On Sunday, October 23, 2022 at 2:37:15 PM UTC+2 Karsten Wolf wrote:
>>
>>> Again all this applies to Leo 6.7.0 on macos 10.13.6
>>>
>>> The annoyances just for today; trying to do some work.
>>>
>>>
>>> *indent inserts TABs *Even if there is no TAB character in the file, 
>>> using TAB to indent a selection inserts TAB characters. This goes to the 
>>> point that Leo refuses to save the file because of mixed TABs and SPACEs
>>>
>>
>> Gone with killing the .leo directory
>>
>>  
>>
>>>
>>>
>>> *indent need a selection*I have to select a single line to indent it? 
>>> Usually I position the cursor at the beginning of a line and press tab.
>>>
>>
>> Gone with killing the .leo directory
>>  
>>
>>>
>>>
>>> *find always switches "search Headline" back on*I need this in about 5% 
>>> of my searches. Press command-F and it's back on.
>>>
>>>
>>> *find does not honor the "Suboutline only" flag*searches go beyond the 
>>> selected node at start.
>>>
>>
>> Gone with killing the .leo directory
>>  
>>
>>>
>>> *find does not always select the found string*
>>> Doing repeatedly find-next the found string is not always selected; 
>>> sometimes selected, sometimes blinking cursor.
>>>
>>
>> Gone with killing the .leo directory
>>
>> Now I need my mac keyboard shortcuts working.
>>
>>  
>>
>

-- 
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/31ddfdff-466a-477f-b347-746b31f7d954n%40googlegroups.com.


Re: Annoyances

2022-10-25 Thread Thomas Passin
I've just found a GUI sqlite browser that looks very decent:  DB Browser 
for SQLite <https://sqlitebrowser.org>.  It may not be very useful for 
Leo's sqlite data since it's all stored as blobs, but it's probably worth 
checking out if you use sqlite.

On Tuesday, October 25, 2022 at 9:47:05 AM UTC-4 Thomas Passin wrote:

> More than likely it was deleting the "db" directory inside ".leo" that did 
> the job.  I recently had an infuriating period where I was working with 
> LeoPyRef a lot.  Each time I saved the outline, after the save succeeded 
> Leo would block for 5 to 10 seconds, or even more.  Nothing I thought of 
> did any good.  Finally I deleted the "db" directory and now Leo no longer 
> blocks after saving LeoPyRef.
>
> I have no idea how Leo uses its sqlite database, but I notice that in the 
> old version - I "deleted" it by renaming it to "dbx" so it's not truly gone 
> - the file *g_app_db/cache.sqlite* has a size of 120 kb.  The same file 
> in the new "db" directory is only 12 kb.  The other cache.sqlite file in 
> both old and new "db" directories are only 12 kb in size.  This makes me 
> wonder if Leo sometimes makes a query that takes a very long time to 
> execute if the database has been used a lot.  Maybe there needs to be an 
> index on some of the fields (if sqlite supports indexes; I've never used it 
> and don't know any details about it).  An index can make a dramatic 
> difference for queries that need to scan the entire database over and over.
>
> Or maybe that database file needs to be defraged/compacted from time to 
> time.  The Thunderbird email client has a command to compact its database, 
> and running it can reduce the database size quite a lot.
>
> On Sunday, October 23, 2022 at 5:18:26 PM UTC-4 Thomas Passin wrote:
>
>> Wow, that's a lot of strangeness cleared up by deleting the .leo 
>> directory!  Well done!
>>
>> On Sunday, October 23, 2022 at 2:27:00 PM UTC-4 kars...@googlemail.com 
>> wrote:
>>
>>> On Sunday, October 23, 2022 at 2:37:15 PM UTC+2 Karsten Wolf wrote:
>>>
>>>> Again all this applies to Leo 6.7.0 on macos 10.13.6
>>>>
>>>> The annoyances just for today; trying to do some work.
>>>>
>>>>
>>>> *indent inserts TABs *Even if there is no TAB character in the file, 
>>>> using TAB to indent a selection inserts TAB characters. This goes to the 
>>>> point that Leo refuses to save the file because of mixed TABs and SPACEs
>>>>
>>>
>>> Gone with killing the .leo directory
>>>
>>>  
>>>
>>>>
>>>>
>>>> *indent need a selection*I have to select a single line to indent it? 
>>>> Usually I position the cursor at the beginning of a line and press tab.
>>>>
>>>
>>> Gone with killing the .leo directory
>>>  
>>>
>>>>
>>>>
>>>> *find always switches "search Headline" back on*I need this in about 
>>>> 5% of my searches. Press command-F and it's back on.
>>>>
>>>>
>>>> *find does not honor the "Suboutline only" flag*searches go beyond the 
>>>> selected node at start.
>>>>
>>>
>>> Gone with killing the .leo directory
>>>  
>>>
>>>>
>>>> *find does not always select the found string*
>>>> Doing repeatedly find-next the found string is not always selected; 
>>>> sometimes selected, sometimes blinking cursor.
>>>>
>>>
>>> Gone with killing the .leo directory
>>>
>>> Now I need my mac keyboard shortcuts working.
>>>
>>>  
>>>
>>

-- 
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/3a9a2118-d90b-4b92-b2fc-61de03d2b963n%40googlegroups.com.


QtPy - Handles Qt5/Qt6 Automatically

2022-10-26 Thread Thomas Passin
I just found QtPy, which perhaps would have been (or still may be) useful 
for Leo and Leo projects. From its Github page:

"*QtPy* is a small abstraction layer that lets you write applications using 
a single API call to either PyQt or PySide.

It provides support for PyQt5, PyQt6, PySide6, PySide2 using the Qt5 layout 
(where the QtGui module has been split into QtGui and QtWidgets).

Basically, you can write your code as if you were using PyQt or PySide 
directly, but import Qt modules from qtpy instead 
of PyQt5, PySide2, PyQt6 or PySide6.

Accordingly, when porting code between different Qt bindings (PyQt vs 
PySide) or Qt versions (Qt5 vs Qt6), QtPy makes this much more painless, 
and allows you to easily and incrementally transition between them. QtPy 
handles incompatibilities and differences between bindings or Qt versions 
for you while keeping your project running, so you can focus more on your 
own code and less on keeping track of supporting every Qt version and 
binding. Furthermore, when you do want to upgrade or support new bindings, 
it allows you to update your project module by module rather than all at 
once."

-- 
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/7be7eae8-5381-44b7-9288-7e5161e05605n%40googlegroups.com.


Re: QtPy - Handles Qt5/Qt6 Automatically

2022-10-27 Thread Thomas Passin
Here's the Github URL -

https://github.com/spyder-ide/qtpy

I'm not suggesting that Leo should change over to using it, just that it's 
another way to get the results that Leo does in terms of adapting to 
qt5/qt6.

On Thursday, October 27, 2022 at 5:08:17 AM UTC-4 jkn wrote:

> Yes, I don't disagree. I might enjoy taking a look for other projects 
> though...
>
> On Thursday, October 27, 2022 at 10:01:17 AM UTC+1 Edward K. Ream wrote:
>
>> On Wednesday, October 26, 2022 at 11:40:01 PM UTC-5 tbp1...@gmail.com 
>> wrote:
>>
>> I just found QtPy, which perhaps would have been (or still may be) useful 
>>> for Leo and Leo projects.
>>
>>
>> I've discussed this before. Probably several years ago.
>>
>> Any abstraction layer introduces another dependency and potential bugs. 
>> Leo's present approach, though not perfect, is better, imo.
>>
>> 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/d1bdc44f-fb7a-4850-bb54-37ac42ccddf5n%40googlegroups.com.


Re: Is there an example of using command flush-lines or keep-lines

2022-10-28 Thread Thomas Passin
I don't know anything about these commands, but their source in LeoPyRef is 
marked "(doesn't work)".  I would, though, like to know what "Transient 
Mark mode" is.

On Friday, October 28, 2022 at 8:08:30 PM UTC-4 wangz...@gmail.com wrote:

> I want a help for the commands for I don't know how to use the regexp.
>
> Thanks a lot!
>

-- 
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/f4a85dea-2bf4-4a9d-aad3-4d880d9fn%40googlegroups.com.


Scroll Bars in Leo

2022-10-29 Thread Thomas Passin
I have an issue with Leo's scroll bars, especially the vertical scrollbar 
for the outline view.  Most of the more recent themes don't show an arrow 
at the ends of the scrollbar region.  
Scroll bars normally have two clickable regions, the line-by-line region 
and the page-by-page region.  The line-by-line region usually shows an 
arrow to click, except for these Leo themes.  The page-by-page region is 
everywhere in the scollbar area that isn't the handle or the arrows.

With invisible arrows, I can't always tell if I'm clicking in the 
page-by-page or the line-by-line, so sometimes the outline will 
unexpectedly jump by a page when I wanted a line.  I really dislike that.  
This happens with the newer "solarized"-based themes including Leo's 
default theme, and my own themes (the ones with "tbp" in their names) that 
are derived from the default.

I have experimented with the CSS styles for the parts of the scrollbars, 
and it's very tricky.  There are very few CSS properties that you can 
change and still have the arrows.  Basically, without adding CSS properties 
to the stylesheets, Qt figures out the right colors, etc., to match your 
page colors, and sets up arrows and borders to suit.  But change one color, 
padding, margin, etc, and then Qt gives up and makes you specify everything 
yourself.  And you won't get an arrow.  You can arrange to have a box with 
a dot where the arrow normally is, and you can provide your own arrow 
image.  It's tricky but doable to get that set up.

The two exceptions I have found are that you can change the background 
color of the page-by-page regions, and you can change the width of the 
scrollbars.

To avoid making this post even longer, I'll give examples in my next post, 
and then ask readers for their opinions and suggestions.

-- 
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/aa954f22-c2c9-4807-be7e-6de041d8b779n%40googlegroups.com.


Re: Scroll Bars in Leo (Part 3)

2022-10-29 Thread Thomas Passin
I would like to discuss what, if anything, Leo's standard themes should do 
about the arrow issue.  Of course, it's always possible to modify any theme 
and put it into your own .leo/themes directory, but I'd like to improve a 
new or non-developer user's experience with Leo.  That makes me want to 
have something visible in the line-by-line areas.

A full solution would require supplying our own arrows and styling all the 
parts of the scrollbars.  I don't especially want to personally create up-, 
down-, left- and right- arrowhead images (maybe with various colors to suit 
various themes), and I would be reasonably well satisfied with the style 
shown in default-theme-page-by-page-color screenshot, which I'm repeating 
here.  An alternative would be to style all the scrollbar pieces ourselves 
and accept having a line-by-line region with a dot but not an arrow.

If there is some agreement, I would update the following themes in Leo's 
directory:

- DefaultTheme.leo
- EKRDark.leo
- minimal-ui-tbp_dark_solarized.leo
- minimal-ui-tbp_light_quasi-solarized.leo
- minimal-ui-tbp_light_solarized.leo
- tbp_dark.leo

I would leave the tbp-xxx-solarized themes alone.  They look the same as 
the current minimal-ui-tbp-xxx-solarized themes (although their overall CSS 
is more detailed than it needs to be), so anyone who uses the tbp-solarized 
themes but prefers the current scrollbar appearance could use them.

Please reply with your opinions and suggestions.
On Saturday, October 29, 2022 at 10:21:00 AM UTC-4 Thomas Passin wrote:

> Here is a screen shot of the default Leo theme, showing the scrollbars 
> with no arrows (default_scroll_bars.png).  Next is the same theme with all 
> CSS styling removed ( default-theme-no-scrollbar-css).  Apparently Qt could 
> not match the background color so it provided a hatched appearance for the 
> page-by-page areas.  Qt applies a reasonable solid color for some themes 
> but hatched like this for others.  Notice that we now have arrows at the 
> ends.
>
> Next is the same theme but has specified a color for the page-by-page 
> areas (default-theme-page-by-page-color.png).
>
> I have also added an image from a Qt tutorial on styling scrollbars 
> (stylesheet-scrollbar.png).  It's for a horizontal scrollbar and shows the 
> line-by-line areas but not with actual arrows.  Leo themes could do 
> something similar - I have worked out the combination of margins and 
> heights to make it work - but I like arrows better.
>
>
> On Saturday, October 29, 2022 at 10:00:50 AM UTC-4 Thomas Passin wrote:
>
>> I have an issue with Leo's scroll bars, especially the vertical scrollbar 
>> for the outline view.  Most of the more recent themes don't show an arrow 
>> at the ends of the scrollbar region.  
>> Scroll bars normally have two clickable regions, the line-by-line region 
>> and the page-by-page region.  The line-by-line region usually shows an 
>> arrow to click, except for these Leo themes.  The page-by-page region is 
>> everywhere in the scollbar area that isn't the handle or the arrows.
>>
>> With invisible arrows, I can't always tell if I'm clicking in the 
>> page-by-page or the line-by-line, so sometimes the outline will 
>> unexpectedly jump by a page when I wanted a line.  I really dislike that.  
>> This happens with the newer "solarized"-based themes including Leo's 
>> default theme, and my own themes (the ones with "tbp" in their names) that 
>> are derived from the default.
>>
>> I have experimented with the CSS styles for the parts of the scrollbars, 
>> and it's very tricky.  There are very few CSS properties that you can 
>> change and still have the arrows.  Basically, without adding CSS properties 
>> to the stylesheets, Qt figures out the right colors, etc., to match your 
>> page colors, and sets up arrows and borders to suit.  But change one color, 
>> padding, margin, etc, and then Qt gives up and makes you specify everything 
>> yourself.  And you won't get an arrow.  You can arrange to have a box with 
>> a dot where the arrow normally is, and you can provide your own arrow 
>> image.  It's tricky but doable to get that set up.
>>
>> The two exceptions I have found are that you can change the background 
>> color of the page-by-page regions, and you can change the width of the 
>> scrollbars.
>>
>> To avoid making this post even longer, I'll give examples in my next 
>> post, and then ask readers for their opinions and suggestions.
>>
>

-- 
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/1276df97-e8d5-4953-8d58-3134a8931e00n%40googlegroups.com.


Re: Is there an example of using command flush-lines or keep-lines

2022-10-29 Thread Thomas Passin

On Saturday, October 29, 2022 at 6:48:26 PM UTC-4 Edward K. Ream wrote:

> On Fri, Oct 28, 2022 at 9:32 PM Thomas Passin  wrote:
>
>> I don't know anything about these commands, but their source in LeoPyRef 
>> is marked "(doesn't work)".  I would, though, like to know what "Transient 
>> Mark mode" is.
>>
>
> So would I :-)  I am going to delete these commands.
>

Might that mean that after an operation, the "mark" is removed from the 
affected nodes?  And is there anywhere that actually can happen (except for 
deleting a marked node)?

-- 
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/ccad7866-d5cd-45da-b1bb-e082d99c41aen%40googlegroups.com.


Re: Scroll Bars in Leo (Part 3)

2022-10-29 Thread Thomas Passin
The arrows are standard everywhere else, and there's something to be said 
for being consistent with normal practice.  At first I liked the look with 
them not present.  It's just that I've had too much trouble clicking in an 
inactive place, or having the pane jump by a page when I expected a line or 
vice-versa.  That's what got me looking at it again.

I'll wait for a bit to see if anyone else wants to comment before deciding 
what to do.  If nobody cares, I can just change my own versions of these 
outlines in ~/.leo/themes.

On Saturday, October 29, 2022 at 9:22:14 PM UTC-4 Edward K. Ream wrote:

> On Sat, Oct 29, 2022 at 9:41 AM Thomas Passin  wrote:
>
> I would like to discuss what, if anything, Leo's standard themes should do 
>> about the arrow issue.  
>
>
> The arrows seem like a waste of space to me. But I suppose the arrows do 
> give a bit more control.
>
> I would rather not change the existing stylesheets, but feel free to 
> create one or more PRs that add new themes.
>
> 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/db4cb0d5-55d6-44a2-98b6-b9c7f061f409n%40googlegroups.com.


Tabbed Apps In Leo

2022-10-30 Thread Thomas Passin
I have made several apps (really, "applets") to run in tabs in Leo's Log 
frame.  I find this convenient because they don't need to take up a whole 
panel, as Viewrendered/Viewrendered3 do, and they don't even need to be 
plugins so they can be simpler.  They are mostly intended to be used in a 
specific outline; their code can reside in the outline.  

I wanted to share how I open these apps in  the Log frame.  Since they are 
not plugins, they don't load automatically when Leo starts.  I don't find 
that to be a problem, since it's easy to provide a Leo command, button, or 
menu item to open them when you want to use them.

I open a tabbed app with the following command:

def toggle_app_tab(log, tabname, top_widget):
"""Create or remove our app's tab.

ARGUMENTS
log -- the log panel object for this outline.
tabname -- a string to use as the display name of our tab.
top_widget -- an instance of top level widget of our app.
"""
# If our tab is visible, remove it
if log.contentsDict.get(f'{tabname}-visible', False):
log.deleteTab(tabname)
log.contentsDict[f'{tabname}-visible'] = False
else:
# Show our tab, reusing our widget if already loaded
if log.contentsDict.get(f'{tabname}-loaded', False):
log.createTab(tabname,
widget = log.contentsDict[f'{tabname}-widget'],
createText = False)
log.contentsDict[f'{tabname}-visible'] = True
log.selectTab(tabname)
else:
# Create our tab for the first time
log.createTab(tabname, widget = w,
  createText = False)
log.selectTab(tabname)
log.contentsDict[f'{tabname}-loaded'] = True
log.contentsDict[f'{tabname}-visible'] = True
log.contentsDict[f'{tabname}-widget'] = w

By "widget", I mean a PyQt widget.  It will usually contain other GUI 
widgets and code.  Here's how this function would typically be called.  The 
widget does not need to have the signature shown here, but it's an obvious 
way to get Leo's key objects into the app.

log = c.frame.log
TABNAME = 'The App'
import theApp
w = theApp.MainWidget(g, c)
toggle_app_tab(log, TABNAME, w)

Notice that when we "remove" the app - meaning the app's tab is removed 
from the Log frame - we keep a reference to the main widget.  This way, 
when we make the tab visible again, the app will have retained all its 
state and you can pick up where you left off.

I have attached a screen shot of one of my tabbed apps in session.

-- 
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/9f057c38-f710-4b97-befd-79723ac86123n%40googlegroups.com.


Re: Tabbed Apps In Leo

2022-10-31 Thread Thomas Passin
Yes.  

On Monday, October 31, 2022 at 4:57:04 AM UTC-4 Edward K. Ream wrote:

> On Sun, Oct 30, 2022 at 10:09 AM Thomas Passin  wrote:
>
> I have made several apps (really, "applets") to run in tabs in Leo's Log 
>> frame.  I find this convenient because they don't need to take up a whole 
>> panel, as Viewrendered/Viewrendered3 do, and they don't even need to be 
>> plugins so they can be simpler.  They are mostly intended to be used in a 
>> specific outline; their code can reside in the outline.  
>
>
> Thanks for this how-to.  I think it would make a good info issue. Are you 
> willing to create one?
>
> 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/234a4949-5667-4648-8bb1-4fa9e4b27611n%40googlegroups.com.


It's No Small Project - How Python Is Getting Faster

2022-10-31 Thread Thomas Passin
Making Python run faster is a long-term project -

A Team at Microsoft is Helping Make Python Faster 


Turns out that the speedups announced for Python 3.11 are just the 
beginning.

-- 
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/e51f9952-6a7e-4a7f-a462-99951eaf41d7n%40googlegroups.com.


Re: Tabbed Apps In Leo

2022-10-31 Thread Thomas Passin
On Monday, October 31, 2022 at 11:12:14 AM UTC-4 jkn wrote:

> Thanks, this looks very interesting...
>
> I have one question - something I have wondered about before. If I have 
> your example code as a button command, say ... then where/how can I put the 
>
> def toggle_app_tab(log, tabname, top_widget):
> # ...
>
> code, in order for it to accessible by multiple such buttons/commands? 
> I've never been sure about this.
>
> Thanks, J^n
>
[snip]

For the function to be available to all outlines, I'm sure people have 
various ideas.  One thing I've done in the past (with other functions) is 
to assign it to some object.  I tend to use c, the outline's commander.  If 
Edward ever changes it to use slots, I suppose this wouldn't work any 
more.  Using this technique, your launch command would first look to see if 
it has been assigned to c.  If not, it runs the def and assigns it.  Then 
it would be invoked.  Something like this sketch -

has_tabbed_app_toggle = hasattr(c, 'toggle_app_tab')
if not has_tabbed_app_toggle:
def toggle_app_tab(log, tabname, top_widget):
  # Body of function here
c.toggle_app_tab = toggle_app_tab

# Invoke function here

You can even make the function into a method of c.  Other people may do 
that differently, but I think the easiest way is 

c.has_tabbed_app_toggle = has_tabbed_app_toggle.__get__(c)

If you did this, you would need to change the function to include *self*, 
and you would need to use *self* instead of *c* in the code.

There is also a Leo decorator, *g.CommanderCommand*, that you could use (it 
would have to be run first before the function could be used, and your 
function cannot use "g"):

@g.CommanderCommand('z-f1')
def z_f1(self, x, y):
print(x * y)

Then:
c.z_f1(2, 3)
# prints 6

(It seems to me that there was something recently about not using this 
decorator, but I can't remember for sure).

-- 
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/c279d409-e772-4026-b8d5-71e8b286c8c2n%40googlegroups.com.


Re: Tabbed Apps In Leo

2022-10-31 Thread Thomas Passin
Using *@g.CommanderCommand* would probably be better, since once run it 
would be available to all outlines.

On Monday, October 31, 2022 at 1:05:53 PM UTC-4 Thomas Passin wrote:

> On Monday, October 31, 2022 at 11:12:14 AM UTC-4 jkn wrote:
>
>> Thanks, this looks very interesting...
>>
>> I have one question - something I have wondered about before. If I have 
>> your example code as a button command, say ... then where/how can I put the 
>>
>> def toggle_app_tab(log, tabname, top_widget):
>> # ...
>>
>> code, in order for it to accessible by multiple such buttons/commands? 
>> I've never been sure about this.
>>
>> Thanks, J^n
>>
> [snip]
>
> For the function to be available to all outlines, I'm sure people have 
> various ideas.  One thing I've done in the past (with other functions) is 
> to assign it to some object.  I tend to use c, the outline's commander.  If 
> Edward ever changes it to use slots, I suppose this wouldn't work any 
> more.  Using this technique, your launch command would first look to see if 
> it has been assigned to c.  If not, it runs the def and assigns it.  Then 
> it would be invoked.  Something like this sketch -
>
> has_tabbed_app_toggle = hasattr(c, 'toggle_app_tab')
> if not has_tabbed_app_toggle:
> def toggle_app_tab(log, tabname, top_widget):
>   # Body of function here
> c.toggle_app_tab = toggle_app_tab
>
> # Invoke function here
>
> You can even make the function into a method of c.  Other people may do 
> that differently, but I think the easiest way is 
>
> c.has_tabbed_app_toggle = has_tabbed_app_toggle.__get__(c)
>
> If you did this, you would need to change the function to include *self*, 
> and you would need to use *self* instead of *c* in the code.
>
> There is also a Leo decorator, *g.CommanderCommand*, that you could use 
> (it would have to be run first before the function could be used, and your 
> function cannot use "g"):
>
> @g.CommanderCommand('z-f1')
> def z_f1(self, x, y):
> print(x * y)
>
> Then:
> c.z_f1(2, 3)
> # prints 6
>
> (It seems to me that there was something recently about not using this 
> decorator, but I can't remember for sure).
>

-- 
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/799df4f2-a43f-442c-a1eb-267972c10b04n%40googlegroups.com.


Re: Tabbed Apps In Leo

2022-10-31 Thread Thomas Passin
I don't know if Edward would approve, but this also works and seems 
convenient:

If you execute this:

@g.command('y-f1')
def y_f1(x, y):
g.es(x * y, c)

Then in any outline you can do this:

d = g.global_commands_dict
d['y-f1'](2,3)
# Prints 6

On Monday, October 31, 2022 at 1:46:00 PM UTC-4 Thomas Passin wrote:

> Using *@g.CommanderCommand* would probably be better, since once run it 
> would be available to all outlines.
>
> On Monday, October 31, 2022 at 1:05:53 PM UTC-4 Thomas Passin wrote:
>
>> On Monday, October 31, 2022 at 11:12:14 AM UTC-4 jkn wrote:
>>
>>> Thanks, this looks very interesting...
>>>
>>> I have one question - something I have wondered about before. If I have 
>>> your example code as a button command, say ... then where/how can I put the 
>>>
>>> def toggle_app_tab(log, tabname, top_widget):
>>> # ...
>>>
>>> code, in order for it to accessible by multiple such buttons/commands? 
>>> I've never been sure about this.
>>>
>>> Thanks, J^n
>>>
>> [snip]
>>
>> For the function to be available to all outlines, I'm sure people have 
>> various ideas.  One thing I've done in the past (with other functions) is 
>> to assign it to some object.  I tend to use c, the outline's commander.  If 
>> Edward ever changes it to use slots, I suppose this wouldn't work any 
>> more.  Using this technique, your launch command would first look to see if 
>> it has been assigned to c.  If not, it runs the def and assigns it.  Then 
>> it would be invoked.  Something like this sketch -
>>
>> has_tabbed_app_toggle = hasattr(c, 'toggle_app_tab')
>> if not has_tabbed_app_toggle:
>> def toggle_app_tab(log, tabname, top_widget):
>>   # Body of function here
>> c.toggle_app_tab = toggle_app_tab
>>
>> # Invoke function here
>>
>> You can even make the function into a method of c.  Other people may do 
>> that differently, but I think the easiest way is 
>>
>> c.has_tabbed_app_toggle = has_tabbed_app_toggle.__get__(c)
>>
>> If you did this, you would need to change the function to include *self*, 
>> and you would need to use *self* instead of *c* in the code.
>>
>> There is also a Leo decorator, *g.CommanderCommand*, that you could use 
>> (it would have to be run first before the function could be used, and your 
>> function cannot use "g"):
>>
>> @g.CommanderCommand('z-f1')
>> def z_f1(self, x, y):
>> print(x * y)
>>
>> Then:
>> c.z_f1(2, 3)
>> # prints 6
>>
>> (It seems to me that there was something recently about not using this 
>> decorator, but I can't remember for sure).
>>
>

-- 
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/bd855744-afa8-4720-8bac-224f41a0626an%40googlegroups.com.


Re: Tabbed Apps In Leo

2022-10-31 Thread Thomas Passin
All right, then, putting these pieces together:

1. In *myLeoSettings.leo*, in the *@settings/@commands tree*,  add an *@command 
*node that defines and registers the function:

@command reg-y-f1  # Node headline
# Node body:
@g.command('y-f1')  # A very simplified function for expository purposes
def y_f1(x, y):
g.es(x * y)

When the settings are loaded, this will register the command *def-y-f1 *that 
will define and register your function when it is run.

2. In any outline, when you want to invoke the function *y_f1(2, 3)*:

cmmd = g.global_commands_dict.get('y-f1', None)
if not cmmd:
c.k.simulateCommand('reg-y-f1')  # Register the function
cmmd = g.global_commands_dict['y-f1']
cmmd(2,3)
# prints 6

It's a little clunky, but not too bad...  I don't know if it can be made 
simpler, because Leo doesn't support auto-run of commands on loading an 
outline.  I'm sure that's a wise design decision, since auto-run code could 
be a security risk.  I could imagine a plugin that registered and ran all 
your special commands on startup, but that's would be way overkill.
On Monday, October 31, 2022 at 2:43:08 PM UTC-4 Thomas Passin wrote:

> I don't know if Edward would approve, but this also works and seems 
> convenient:
>
> If you execute this:
>
> @g.command('y-f1')
> def y_f1(x, y):
> g.es(x * y, c)
>
> Then in any outline you can do this:
>
> d = g.global_commands_dict
> d['y-f1'](2,3)
> # Prints 6
>
> On Monday, October 31, 2022 at 1:46:00 PM UTC-4 Thomas Passin wrote:
>
>> Using *@g.CommanderCommand* would probably be better, since once run it 
>> would be available to all outlines.
>>
>> On Monday, October 31, 2022 at 1:05:53 PM UTC-4 Thomas Passin wrote:
>>
>>> On Monday, October 31, 2022 at 11:12:14 AM UTC-4 jkn wrote:
>>>
>>>> Thanks, this looks very interesting...
>>>>
>>>> I have one question - something I have wondered about before. If I have 
>>>> your example code as a button command, say ... then where/how can I put 
>>>> the 
>>>>
>>>> def toggle_app_tab(log, tabname, top_widget):
>>>> # ...
>>>>
>>>> code, in order for it to accessible by multiple such buttons/commands? 
>>>> I've never been sure about this.
>>>>
>>>> Thanks, J^n
>>>>
>>> [snip]
>>>
>>> For the function to be available to all outlines, I'm sure people have 
>>> various ideas.  One thing I've done in the past (with other functions) is 
>>> to assign it to some object.  I tend to use c, the outline's commander.  If 
>>> Edward ever changes it to use slots, I suppose this wouldn't work any 
>>> more.  Using this technique, your launch command would first look to see if 
>>> it has been assigned to c.  If not, it runs the def and assigns it.  Then 
>>> it would be invoked.  Something like this sketch -
>>>
>>> has_tabbed_app_toggle = hasattr(c, 'toggle_app_tab')
>>> if not has_tabbed_app_toggle:
>>> def toggle_app_tab(log, tabname, top_widget):
>>>   # Body of function here
>>> c.toggle_app_tab = toggle_app_tab
>>>
>>> # Invoke function here
>>>
>>> You can even make the function into a method of c.  Other people may do 
>>> that differently, but I think the easiest way is 
>>>
>>> c.has_tabbed_app_toggle = has_tabbed_app_toggle.__get__(c)
>>>
>>> If you did this, you would need to change the function to include *self*, 
>>> and you would need to use *self* instead of *c* in the code.
>>>
>>> There is also a Leo decorator, *g.CommanderCommand*, that you could use 
>>> (it would have to be run first before the function could be used, and your 
>>> function cannot use "g"):
>>>
>>> @g.CommanderCommand('z-f1')
>>> def z_f1(self, x, y):
>>> print(x * y)
>>>
>>> Then:
>>> c.z_f1(2, 3)
>>> # prints 6
>>>
>>> (It seems to me that there was something recently about not using this 
>>> decorator, but I can't remember for sure).
>>>
>>

-- 
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/d2cfbb96-3342-4876-a6a2-69adc426e681n%40googlegroups.com.


Re: Help with a Latex line ender script

2022-11-04 Thread Thomas Passin
Don't forget to set up for undo.

On Friday, November 4, 2022 at 6:48:50 AM UTC-4 Edward K. Ream wrote:

> On Fri, Nov 4, 2022 at 3:25 AM Luka  wrote:
>
> There are plenty of ways to do it in LEO but this is how I do it.
>>
>> Create a @button node with script, select text in body, and run:
>>
>> @language python
>>
>> #get selected text from body
>> w = c.frame.body.wrapper
>> s = w.getSelectedText()
>> start,end=w.getSelectionRange()
>> b=p.b
>>
>> #do something
>> s=s.replace('\n','\n')
>>
>> #insert edited text back
>> p.b=b[:start]+s+b[end:]
>> c.redraw()
>>
>
> Thanks, Luka, for this tip.
>
> Leo itself typically expands the selection to include entire lines. Like 
> this (tested) code:
>
> w = c.frame.body.wrapper
> s = w.getAllText()
> i, j = w.getSelectionRange()
> start, junk = g.getLine(s, i)
> junk, end = g.getLine(s, j)
>
> 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/d2f7c53d-0f68-4562-b9d5-29c2f6129ddfn%40googlegroups.com.


Re: Help with a Latex line ender script

2022-11-04 Thread Thomas Passin
No need to apologize!  Leo can do so many things that it's hard to find 
information, or even know there is something to look for.  I looked in 
LeoDocs.leo (you can open it from the Help menu).   Search for _Undoably 
changing body text_ (I originally just searched for _undo_).  It says

To undo a single change to body text::

command = 'my-command-name'
b = c.undoer.beforeChangeNodeContents(p, oldYScroll=ypos)
# Change p's body text.
c.undoer.afterChangeNodeContents(p,
command=command, bunch=b, dirtyVnodeList=[])

Someone else can correct me, but I don't think that the exact value of the 
string *command* matters.  Your script will probably have a command name, 
though, so might as well use it.
On Friday, November 4, 2022 at 8:17:01 AM UTC-4 Israel Hands wrote:

> Many thanks for such prompt and helpful advice. A significant part of what 
> makes Leo so great. I'm off to try Luka's and Edward's solutions. Sorry to 
> be so slow tbp1, but how do I set up undo?
>
> Thanks again from momentarily sunny Wales.
>
> IH
>
> On Friday, 4 November 2022 at 12:01:10 UTC tbp1...@gmail.com wrote:
>
>> Don't forget to set up for undo.
>>
>> On Friday, November 4, 2022 at 6:48:50 AM UTC-4 Edward K. Ream wrote:
>>
>>> On Fri, Nov 4, 2022 at 3:25 AM Luka  wrote:
>>>
>>> There are plenty of ways to do it in LEO but this is how I do it.

 Create a @button node with script, select text in body, and run:

 @language python

 #get selected text from body
 w = c.frame.body.wrapper
 s = w.getSelectedText()
 start,end=w.getSelectionRange()
 b=p.b

 #do something
 s=s.replace('\n','\n')

 #insert edited text back
 p.b=b[:start]+s+b[end:]
 c.redraw()

>>>
>>> Thanks, Luka, for this tip.
>>>
>>> Leo itself typically expands the selection to include entire lines. Like 
>>> this (tested) code:
>>>
>>> w = c.frame.body.wrapper
>>> s = w.getAllText()
>>> i, j = w.getSelectionRange()
>>> start, junk = g.getLine(s, i)
>>> junk, end = g.getLine(s, j)
>>>
>>> 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/92f3c9ea-ad0b-4e23-bfdd-ba98a7fb212bn%40googlegroups.com.


FunctionTrace - Low overhead Python Profiler

2022-11-05 Thread Thomas Passin
I stumbled upon an interesting profiler today - FunctionTrace.  It works 
together with Firefox so as to make use of Firefox's profiling UI, and 
supposedly incurs almost no slowdown while profiling.  It's currently 
Linux.Mac only.

FunctionTrace Home Page 
Building FunctionTrace, a graphical Python profiler 


I've never done any Python profiling, but this looks worth looking at, 
especially the second link.

-- 
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/db3e4d6b-30ea-4a3f-a1af-a60e8dfaa409n%40googlegroups.com.


Encoding Problems On Windows With Python Redirecting From Console

2022-11-13 Thread Thomas Passin
On Windows, if you redirect console output to a file or pipe, and if there 
are non-ascii unicode characters in your output, you may get failure with 
an error message about the wrong code page.  The reason is obscure, and 
discussed here with solutions:

UnicodeEncodeError in Windows agent CI pipelines 


tl;dr - When you redirect the output, Windows uses the system locale 
encoding instead of the console encoding.  Even if the console encoding is 
65001 (quasi-utf-8), the local encoding is probably using still using 
cp1252 (ascii) or similar.  Windows 11 may have a different behavior.

-- 
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/f41fdca2-4b1a-4c96-a49e-6bfbc158eec6n%40googlegroups.com.


Different Version Installed on Windows, Linux

2022-11-15 Thread Thomas Passin
Now that 6.7.1 has been released, I pip-installed it on my Windows 
machine.  But when I did the same on my Linux Mint VM, it only 
installed leo-6.6.4.  Does anyone have some insight into the difference?

-- 
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/030ed0c4-4908-4417-b8c7-3da69aee3898n%40googlegroups.com.


Re: Different Version Installed on Windows, Linux

2022-11-15 Thread Thomas Passin
My Debian VM did install 6.7.1. Weird.

On Tuesday, November 15, 2022 at 4:00:13 PM UTC-5 Thomas Passin wrote:

> Now that 6.7.1 has been released, I pip-installed it on my Windows 
> machine.  But when I did the same on my Linux Mint VM, it only 
> installed leo-6.6.4.  Does anyone have some insight into the difference?

-- 
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/3ea602ca-d6fe-4792-b4f7-fd88cd1a43edn%40googlegroups.com.


Re: Different Version Installed on Windows, Linux

2022-11-15 Thread Thomas Passin
Ha!  The default version of python3 was 3.8.  I should have typed 
"python3.9 -m pip ...", since Leo now requires Python3.9+.   Mint still 
does not have an official package for Python 3.9.  I forget how I installed 
it, but since it was not through the package manager, it's not symlinked to 
"python3".

On Tuesday, November 15, 2022 at 4:04:28 PM UTC-5 Thomas Passin wrote:

> My Debian VM did install 6.7.1. Weird.
>
> On Tuesday, November 15, 2022 at 4:00:13 PM UTC-5 Thomas Passin wrote:
>
>> Now that 6.7.1 has been released, I pip-installed it on my Windows 
>> machine.  But when I did the same on my Linux Mint VM, it only 
>> installed leo-6.6.4.  Does anyone have some insight into the difference?
>
>

-- 
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/a66c7263-b59d-46a8-9851-bdb0973ec0bfn%40googlegroups.com.


Re: possible to move to nodes without changing docus from body?

2022-11-24 Thread Thomas Passin
CTRL-u and CTRL-d work in the tree pane when the cursor is in the body pane 
but they don't change the body displayed in the editor pane.  That's a 
little confusing to me because I expect that the body would always match 
the selected node in the tree.  Actually, that means that CTRL-u and CTRL-d 
behave differently depending on whether the starting focus is in the body 
or the tree.  I'm inclined to think of that as a bug on the grounds that 
the edit pane should always show the body of the node that is selected in 
the tree.  Maybe @edward thinks it's a feature instead?

TAB moves the focus back from the tree to the body pane.  I find that 
pretty easy and natural.

On Thursday, November 24, 2022 at 8:43:11 AM UTC-5 jkn wrote:

> Hi all
> a simple navigation/key-binding question here:
>
> Is it possible to keep focus in the body pane, whilst navigating the 
> headline tree, and changing the actual node whose body is under the cursor?
>
> I would quite often like to to do this instead of:
>
> - type in body pane
> - use cursor to move to nearby node in tree pane (or Alt-T etc)
> - click in body pane or type Alt-B to get focus back to body pane
> - carry on typing in new node
>
> I haven't seen such an option in the commands, but it's possible I am 
> missing the terminology.
>
> 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/8007b98a-8816-44ac-8f62-e3cae7486617n%40googlegroups.com.


Re: possible to move to nodes without changing docus from body?

2022-11-24 Thread Thomas Passin
After a little more thought, I see I mixed up a couple of things.  Keeping 
the same body while moving nodes up or down makes sense because the focus 
is staying on the same node all the time.  It's *ALT-uparrow, ALT-downarrow* 
that will change the selected node even if the original focus was in the 
editor.  And the editor pane reflects the selected tree node, as I expect.  
All good, although the focus ends up in the tree, not the body, as the OP 
would like.  Still, ALT-arrow then TAB seems pretty easy to me.

On Thursday, November 24, 2022 at 9:27:47 AM UTC-5 Thomas Passin wrote:

> CTRL-u and CTRL-d work in the tree pane when the cursor is in the body 
> pane but they don't change the body displayed in the editor pane.  That's a 
> little confusing to me because I expect that the body would always match 
> the selected node in the tree.  Actually, that means that CTRL-u and CTRL-d 
> behave differently depending on whether the starting focus is in the body 
> or the tree.  I'm inclined to think of that as a bug on the grounds that 
> the edit pane should always show the body of the node that is selected in 
> the tree.  Maybe @edward thinks it's a feature instead?
>
> TAB moves the focus back from the tree to the body pane.  I find that 
> pretty easy and natural.
>
> On Thursday, November 24, 2022 at 8:43:11 AM UTC-5 jkn wrote:
>
>> Hi all
>> a simple navigation/key-binding question here:
>>
>> Is it possible to keep focus in the body pane, whilst navigating the 
>> headline tree, and changing the actual node whose body is under the cursor?
>>
>> I would quite often like to to do this instead of:
>>
>> - type in body pane
>> - use cursor to move to nearby node in tree pane (or Alt-T etc)
>> - click in body pane or type Alt-B to get focus back to body pane
>> - carry on typing in new node
>>
>> I haven't seen such an option in the commands, but it's possible I am 
>> missing the terminology.
>>
>> 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/d9aa96d7-a8a8-4d9d-bd1a-2faf7d684dd3n%40googlegroups.com.


Re: Wanting a nofooter boolean flag in settings of VR3 asciidoctor

2022-11-25 Thread Thomas Passin
I will look into it.  This is for asciidoc, is it not?  Do you happen to 
know if this is a specific Asciidoctor directive, or do Asciidoc and 
Asciidoc3 also support it?

On Friday, November 25, 2022 at 3:26:50 AM UTC-5 wangz...@gmail.com wrote:

> Now the footer is shown in VR3 panel always. So I have to set `:nofooter:` 
> in each body text. Would you plan to add this attribute?
>
> Thanks for your help!
>

-- 
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/78d8bb20-d4ac-4ccc-a0e2-8684eb0e8c21n%40googlegroups.com.


Re: Wanting a nofooter boolean flag in settings of VR3 asciidoctor

2022-11-25 Thread Thomas Passin
Thank you, that will be helpful.

On Friday, November 25, 2022 at 11:38:12 AM UTC-5 wangz...@gmail.com wrote:

> 
>
> I think `nofooter` is a specific **Asciidoctor** head attribute.
>
> Asciidoc & Asciidoc3 don't suppor `nofooter` attribute after I had some 
> test by change  myLeoSettings.leo.
>
> Step1: use asciidoc3
> ```
> @@string vr3-prefer-external = asciidoctor
> @bool vr3-prefer-asciidoc3=True
> ```
> Result: Not support :nofooter:
>
> Step2: use asciidoc
> ```
> @@string vr3-prefer-external = asciidoctor
> @bool vr3-prefer-asciidoc3=False
> ```
> Result: Not support :nofooter:
> 在2022年11月25日星期五 UTC+8 23:39:10 写道:
>
>> I will look into it.  This is for asciidoc, is it not?  Do you happen to 
>> know if this is a specific Asciidoctor directive, or do Asciidoc and 
>> Asciidoc3 also support it?
>>
>> On Friday, November 25, 2022 at 3:26:50 AM UTC-5 wangz...@gmail.com 
>> wrote:
>>
>>> Now the footer is shown in VR3 panel always. So I have to set 
>>> `:nofooter:` in each body text. Would you plan to add this attribute?
>>>
>>> Thanks for your help!
>>>
>>

-- 
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/aca7ac55-9c2a-47cd-ab2c-c21e9498cce6n%40googlegroups.com.


Re: Wanting a nofooter boolean flag in settings of VR3 asciidoctor

2022-11-25 Thread Thomas Passin
Done - there is a new setting @bool vr3-asciidoctor-nofooter = True 
(default: False) to suppress the footer.  This only affects the external 
Asciidoctor processor.

The Pull Request for this change has been submitted.  When accepted and 
merged, it will be available in the *devel*  branch.

On Friday, November 25, 2022 at 5:08:06 PM UTC-5 Thomas Passin wrote:

> Thank you, that will be helpful.
>
> On Friday, November 25, 2022 at 11:38:12 AM UTC-5 wangz...@gmail.com 
> wrote:
>
>> <https://docs.asciidoctor.org/asciidoc/latest/document/header-ref/>
>>
>> I think `nofooter` is a specific **Asciidoctor** head attribute.
>>
>> Asciidoc & Asciidoc3 don't suppor `nofooter` attribute after I had some 
>> test by change  myLeoSettings.leo.
>>
>> Step1: use asciidoc3
>> ```
>> @@string vr3-prefer-external = asciidoctor
>> @bool vr3-prefer-asciidoc3=True
>> ```
>> Result: Not support :nofooter:
>>
>> Step2: use asciidoc
>> ```
>> @@string vr3-prefer-external = asciidoctor
>> @bool vr3-prefer-asciidoc3=False
>> ```
>> Result: Not support :nofooter:
>> 在2022年11月25日星期五 UTC+8 23:39:10 写道:
>>
>>> I will look into it.  This is for asciidoc, is it not?  Do you happen to 
>>> know if this is a specific Asciidoctor directive, or do Asciidoc and 
>>> Asciidoc3 also support it?
>>>
>>> On Friday, November 25, 2022 at 3:26:50 AM UTC-5 wangz...@gmail.com 
>>> wrote:
>>>
>>>> Now the footer is shown in VR3 panel always. So I have to set 
>>>> `:nofooter:` in each body text. Would you plan to add this attribute?
>>>>
>>>> Thanks for your help!
>>>>
>>>

-- 
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/704426b2-2be8-4961-a14e-2eb19f16d5abn%40googlegroups.com.


Re: Wanting a nofooter boolean flag in settings of VR3 asciidoctor

2022-11-26 Thread Thomas Passin
This change has been merged and is now available in the *devel* branch.

On Friday, November 25, 2022 at 7:16:44 PM UTC-5 Thomas Passin wrote:

> Done - there is a new setting @bool vr3-asciidoctor-nofooter = True 
> (default: False) to suppress the footer.  This only affects the external 
> Asciidoctor processor.
>
> The Pull Request for this change has been submitted.  When accepted and 
> merged, it will be available in the *devel*  branch.
>
> On Friday, November 25, 2022 at 5:08:06 PM UTC-5 Thomas Passin wrote:
>
>> Thank you, that will be helpful.
>>
>> On Friday, November 25, 2022 at 11:38:12 AM UTC-5 wangz...@gmail.com 
>> wrote:
>>
>>> <https://docs.asciidoctor.org/asciidoc/latest/document/header-ref/>
>>>
>>> I think `nofooter` is a specific **Asciidoctor** head attribute.
>>>
>>> Asciidoc & Asciidoc3 don't suppor `nofooter` attribute after I had some 
>>> test by change  myLeoSettings.leo.
>>>
>>> Step1: use asciidoc3
>>> ```
>>> @@string vr3-prefer-external = asciidoctor
>>> @bool vr3-prefer-asciidoc3=True
>>> ```
>>> Result: Not support :nofooter:
>>>
>>> Step2: use asciidoc
>>> ```
>>> @@string vr3-prefer-external = asciidoctor
>>> @bool vr3-prefer-asciidoc3=False
>>> ```
>>> Result: Not support :nofooter:
>>> 在2022年11月25日星期五 UTC+8 23:39:10 写道:
>>>
>>>> I will look into it.  This is for asciidoc, is it not?  Do you happen 
>>>> to know if this is a specific Asciidoctor directive, or do Asciidoc and 
>>>> Asciidoc3 also support it?
>>>>
>>>> On Friday, November 25, 2022 at 3:26:50 AM UTC-5 wangz...@gmail.com 
>>>> wrote:
>>>>
>>>>> Now the footer is shown in VR3 panel always. So I have to set 
>>>>> `:nofooter:` in each body text. Would you plan to add this attribute?
>>>>>
>>>>> Thanks for your help!
>>>>>
>>>>

-- 
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/ecd1c838-d48b-445c-8a0c-3c004f1f6136n%40googlegroups.com.


Re: Wanting a nofooter boolean flag in settings of VR3 asciidoctor

2022-11-26 Thread Thomas Passin
Thanks for testing.

On Saturday, November 26, 2022 at 8:36:31 AM UTC-5 wangz...@gmail.com wrote:

> Thanks a lot!
>
> The test step is:
>
> 1. git pull
> 2. @bool vr3-asciidoctor-nofooter=True in myLeoSettings.leo
> 3.  run reload-settings
> 4. Not input :nofooter: below @language asciidoc in body panel.
>
> Result: VR3 panel does not show the footer. *So the code run ok.*
> 在2022年11月26日星期六 UTC+8 21:15:20 写道:
>
>> This change has been merged and is now available in the *devel* branch.
>>
>> On Friday, November 25, 2022 at 7:16:44 PM UTC-5 Thomas Passin wrote:
>>
>>> Done - there is a new setting @bool vr3-asciidoctor-nofooter = True 
>>> (default: False) to suppress the footer.  This only affects the external 
>>> Asciidoctor processor.
>>>
>>> The Pull Request for this change has been submitted.  When accepted and 
>>> merged, it will be available in the *devel*  branch.
>>>
>>> On Friday, November 25, 2022 at 5:08:06 PM UTC-5 Thomas Passin wrote:
>>>
>>>> Thank you, that will be helpful.
>>>>
>>>> On Friday, November 25, 2022 at 11:38:12 AM UTC-5 wangz...@gmail.com 
>>>> wrote:
>>>>
>>>>> <https://docs.asciidoctor.org/asciidoc/latest/document/header-ref/>
>>>>>
>>>>> I think `nofooter` is a specific **Asciidoctor** head attribute.
>>>>>
>>>>> Asciidoc & Asciidoc3 don't suppor `nofooter` attribute after I had 
>>>>> some test by change  myLeoSettings.leo.
>>>>>
>>>>> Step1: use asciidoc3
>>>>> ```
>>>>> @@string vr3-prefer-external = asciidoctor
>>>>> @bool vr3-prefer-asciidoc3=True
>>>>> ```
>>>>> Result: Not support :nofooter:
>>>>>
>>>>> Step2: use asciidoc
>>>>> ```
>>>>> @@string vr3-prefer-external = asciidoctor
>>>>> @bool vr3-prefer-asciidoc3=False
>>>>> ```
>>>>> Result: Not support :nofooter:
>>>>> 在2022年11月25日星期五 UTC+8 23:39:10 写道:
>>>>>
>>>>>> I will look into it.  This is for asciidoc, is it not?  Do you happen 
>>>>>> to know if this is a specific Asciidoctor directive, or do Asciidoc and 
>>>>>> Asciidoc3 also support it?
>>>>>>
>>>>>> On Friday, November 25, 2022 at 3:26:50 AM UTC-5 wangz...@gmail.com 
>>>>>> wrote:
>>>>>>
>>>>>>> Now the footer is shown in VR3 panel always. So I have to set 
>>>>>>> `:nofooter:` in each body text. Would you plan to add this attribute?
>>>>>>>
>>>>>>> Thanks for your help!
>>>>>>>
>>>>>>

-- 
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/ca455bbf-f84c-4f92-9fb8-a8cff532c4f2n%40googlegroups.com.


Is the mode catalog still used?

2022-11-27 Thread Thomas Passin
"Modes" are programming languages recognized by Leo, e.g., by the *@language 
xx* directive.  They are in the *modes* directory.  They are for the most 
part python files except for *clojure.xml* and *markdown.xml*.

In the directory there is also a file named *catalog*.  It lists most or 
(maybe all) of the .py files as entries.  The file starts with this comment:




The entries look like this:



Now here is the point that caught my attention.  Those *FILE* attributes 
all end in .xml, but there are no such .xml files in the leo directory tree.

I'm guessing that this catalog file was taken from jEdit or some other 
source and that Leo has never used those .xml files.  Leo could just 
directly look for **'py* and *.xml* files in the directory and not ever 
need the catalog.

Is this speculation right, or does Leo actually use the catalog file?

-- 
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/6ee2914c-697a-4f05-ae21-6c8234a9994dn%40googlegroups.com.


Re: Is the mode catalog still used?

2022-11-27 Thread Thomas Passin
I didn't find any "catalog" used in LeoPyRef.leo except for one plugin, and 
that used what was a clearly different catalog.  Maybe this answers the 
question...

On Sunday, November 27, 2022 at 3:18:02 PM UTC-5 Thomas Passin wrote:

> "Modes" are programming languages recognized by Leo, e.g., by the *@language 
> xx* directive.  They are in the *modes* directory.  They are for the most 
> part python files except for *clojure.xml* and *markdown.xml*.
>
> In the directory there is also a file named *catalog*.  It lists most or 
> (maybe all) of the .py files as entries.  The file starts with this comment:
>
> 
> 
>
> The entries look like this:
>
>  FILE_NAME_GLOB="*.js" />
>
> Now here is the point that caught my attention.  Those *FILE* attributes 
> all end in .xml, but there are no such .xml files in the leo directory tree.
>
> I'm guessing that this catalog file was taken from jEdit or some other 
> source and that Leo has never used those .xml files.  Leo could just 
> directly look for **'py* and *.xml* files in the directory and not ever 
> need the catalog.
>
> Is this speculation right, or does Leo actually use the catalog file?
>

-- 
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/2e17749b-47c2-4d08-be79-2aa3abef856bn%40googlegroups.com.


Re: Is the mode catalog still used?

2022-11-28 Thread Thomas Passin
VR3 does not use any of those files.  If Leo knows about any of the modes, 
VR3 can be modded to use them.  In fact, I'm thinking about allowing all 
the mode languages.  It would be a minor change to the code, so far as I 
can see.  Now, whether pygments can colorize every one of them in the 
rendered output, that I don't know.  Pygments supports a great number of 
languages, so we can hope ...

On Monday, November 28, 2022 at 4:21:18 AM UTC-5 Edward K. Ream wrote:

> On Mon, Nov 28, 2022 at 3:08 AM Edward K. Ream  wrote:
>
> Please issue a PR that deletes these files.
>>
>
> See #2975 . VR3 
> doesn't appear to use the xml files, so I'll create the PR myself.
>
> 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/3d94de83-17f7-4f7b-91ae-9c6fe3bd9c89n%40googlegroups.com.


Dart Has Been Added To The Languages Supported By Viewrendered3

2022-11-29 Thread Thomas Passin
Now merged into the *devel* branch.

-- 
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/b423aae6-38c2-4b1a-bb41-fa42d2cf3683n%40googlegroups.com.


PyScript - Real Python In The Browser

2022-12-03 Thread Thomas Passin
A new project named PyScript, built on PyIodide, runs Python in the 
browser.  It can actually run many of the most important scientific 
packages such as matplotlib, numpy, scipy, etc., and do graphics with Bokeh 
and others.  This might be an alternative route to Leo in a browser.

See PyScript home page , A First Look at PyScript: 
Python in the Web Browser 
.

I tried an example from a PyScript "Getting Started" tutorial, one that 
uses matplotlib to plot some random numbers.  I copied the code below 
verbatim into a Leo node, opened viewrendered3, and the plot rendered in 
VR3.  There was some delay while all the imported code got compiled to 
WebAssembly, downloaded, and initialized.



  https://pyscript.net/latest/pyscript.css"; />
  https://pyscript.net/latest/pyscript.js";>


  
Let's plot random numbers


{
  "packages": ["numpy", "matplotlib"]
}


  import matplotlib.pyplot as plt
  import numpy as np
  x = np.random.randn(1000)
  y = np.random.randn(1000)
  fig, ax = plt.subplots()
  ax.scatter(x, y)
  fig

  


-- 
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/0cf7ba35-a377-4555-a6ce-805eb2796533n%40googlegroups.com.


Re: PyScript - Real Python In The Browser

2022-12-03 Thread Thomas Passin
When I tried it,  the plot did finally appear, but after a much longer wait 
time than I expected after seeing that message.  For a long-running GUI 
program (as a Leo implementation would be), a long initial wait would be 
annoying but once it was over, the program should interact normally.

Also, in daily use one would probably copy the PyScript javascript scripts, 
package files, and the WebAssembly compile resources to one's own 
computer.  This should make startup much faster.

On Saturday, December 3, 2022 at 9:11:50 AM UTC-5 Edward K. Ream wrote:

> On Sat, Dec 3, 2022 at 7:55 AM Thomas Passin  wrote:
>
>
>> I tried an example from a PyScript "Getting Started" tutorial, one that 
>> uses matplotlib to plot some random numbers.  I copied the code below 
>> verbatim into a Leo node, opened viewrendered3, and the plot rendered in 
>> VR3.  There was some delay while all the imported code got compiled to 
>> WebAssembly, downloaded, and initialized.
>>
>
> The VR3 pane shows "Let's plot random numbers", but the "loading runtime" 
> message never goes away. Presumably a firewall issue.
>
> 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/c9b44ddb-df88-45d4-867e-1063da39f6acn%40googlegroups.com.


Re: Second try: Please test PR #2985

2022-12-04 Thread Thomas Passin
Using ekr-black2, I found the following bug:

Leo subtree:
@path c:/temp/leo
@file a.py
@file b.py

1. Select the *a.py* node.  Neither *blacken-files* nor *blacken-files-diff* 
find any file to blacken.
2. Select the *@path* node.  *Blacken-files-diff *only finds *a.py*, not 
*b.py*. (I assume *blacken-files* would do the same but did not test it).

The culprit seems to be *g.findRootsWithPredicate(c, c.p)*.  I put a print 
statement in to verify 1) and 2).

Otherwise, using *-b* did produce *# @xxx* sentinels on write.  Test files 
with blackened sentinels did load into Leo with no warnings or apparent 
errors.
On Sunday, December 4, 2022 at 11:09:26 AM UTC-5 Edward K. Ream wrote:

> Drat: I hit the "Post Message" button trying to format some text.  Here is 
> the full post.
>
> Leo issue #2983  
> suggests supporting so-called *blackened sentinels*, sentinel lines that 
> start with "# @" instead of the usual "#@". Such lines can arise in 
> external files created by @file after the user reformats the file with 
> Black .
>
> PR #2985  contains 
> the changes, which involve *inherently dangerous* changes to Leo's read 
> code. #2983  gives 
> the rationale for accepting the risks involved, which I'll repeat here:
>
> - Leo *cannot *prevent Leonistas from blackening external files 
> *unintentionally*. Black's *existence* imposes a burden on Leo.
>
> - Leo *should not* prevent Leonistas from blackening external files 
> *intentionally*.
> --black-sentinels can help avoid huge diffs in projects mandating Black.
>
> - Any change to Leo's read/write code is inherently dangerous, but doing 
> nothing may be more dangerous in the long run.
>
> *Summary of changes*
>
> Leo has (supposedly) been able to handle blackened sentinels for a long 
> time. However, recent tests have exposed problems with Leo's legacy code. 
> The new code fixes several bugs, some serious (potentially damaging data!) 
> and some less so (crashers).
>
> The PR adds support for  --black-sentinels (aka -b), which causes Leo to 
> *write* blackened sentinels.
>
> *Testing status*
>
> I have strengthened several unit tests to test for both blackened and 
> legacy sentinels.
>
> All of Leo's files pass round-trip read/write tests, both with and without 
> -b. This is the strongest test I know of.
>
> I have been eating my own dog food without any serious problems.
>
> *Summary*
>
> PR #2985  contains 
> inherently dangerous changes to Leo's read code.
>
> I have tested the code as well as I can, but additional testing seems 
> wise before merging PR #2985 
>  into devel. Please 
> test that branch now.
>
> I'll wait about a week before doing the merge. Please report any problems 
> immediately.
>
> 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/4107e53f-b5f0-496e-b31c-fd713ee48a6cn%40googlegroups.com.


Re: Dart Has Been Added To The Languages Supported By Viewrendered3

2022-12-04 Thread Thomas Passin
Thanks for testing!

On Sunday, December 4, 2022 at 9:29:03 PM UTC-5 wangz...@gmail.com wrote:

> Tested && run well.
>
> 在2022年11月29日星期二 UTC+8 23:22:06 写道:
>
>> Now merged into the *devel* branch.
>
>

-- 
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/fa164c15-3b73-47b0-964d-0d4e84e6250an%40googlegroups.com.


Re: Discuss: Retire @button write-leoPyRef?

2022-12-05 Thread Thomas Passin
This whole subject confuses me, partly because Leo opens LeoPyRef.leo, not 
LeoPy.leo, when the latter is selected in *File/Open Specific Leo File*.  
So I would never see or work on LeoPy.leo.  Almost all my work has been 
working on existing external files.  When I commit changes, I don't commit 
LeoPyRef.leo because it will load the committed changes when it loads my 
changed file.  The only time I would need to commit changes to LeoPyRef 
would be if I were to create a new external file, possibly with a new 
*@path* directory for it.  In that case, I don't see what the  
*write-leoPyRef* button would do for me (or to LeoPyRef.leo), and I 
probably wouldn't even think of using it.

At a minimum, if the button is only for LeoPy.leo and not LeoPyLef.leo, it 
should be renamed to make that clear.  Since I don't see an actual file 
named "LeoPy.leo" in my clone, I assume the one is supposed to be an alias 
for the other.  This confuses me even more.

So as a lowly developer, I'd like to know:

- What is the difference between the LeoPyRef.leo and LeoPy.leo files, if 
any;
- Why is there a distinction?
- When should I use the *write-leoPyRef* button?
- What bad things will happen if I don't use it?

I assume there must be some non-leo-code nodes that need to be in certain 
places, maybe for packaging or installation, and that the button's code 
tries to check for them and restore them to their desired places if 
possible.  If that's right, no wonder it might have some bugs or quirks!
On Monday, December 5, 2022 at 8:30:05 AM UTC-5 Edward K. Ream wrote:

> LeoPyRef.leo defines this button. The button does the following:
>
> - Check that the button is running from leoPy.leo, not LeoPyRef.leo.
> - Updates LeoPyRef.leo using only specific subtrees of leoPy.leo.
>
> Félix and I have noticed that sometimes this script creates large diffs 
> between the old and new versions of LeoPyRef.leo.
>
> Instead, the following workflow seems to work better for me:
>
> - Save leoPy.leo as LeoPyRef.leo.
> - Load the new LeoPyRef.leo.
> - Delete unwanted parts of the new LeoPyRef.leo.
> - Execute the git-diff command within LeoPyRef.leo.
>
> The git-diff command will ensure I've not deleted too much :-)
>
> More importantly, the Leonine git-diff shows me the "real" diffs, 
> regardless of "extraneous" diffs caused by moving/alphabetizing nodes.
>
> *Summary*
>
> `@button write-leoPyRef` seems buggy in hard-to-pin-down ways.
>
> Updating LeoPyRef.leo "by hand" is safe, provided one checks the work 
> using Leo's git-diff command.
>
> 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/b9feac7e-e12e-4969-ae56-68db044b92d7n%40googlegroups.com.


Re: Second try: Please test PR #2985

2022-12-05 Thread Thomas Passin
Alt-G goto-global-line is broken in branch ekr-black2:

 return line.startswith(sentinel1, sentinel2)
TypeError: slice indices must be integers or None or have an __index__ 
method

On Monday, December 5, 2022 at 2:41:06 AM UTC-5 Edward K. Ream wrote:

> On Sun, Dec 4, 2022 at 5:04 PM Thomas Passin  wrote:
>
>> Using ekr-black2, I found the following bug:
>
>
> I have just created #2989 
> <https://github.com/leo-editor/leo-editor/issues/2989> for this.
>
> Otherwise, using *-b* did produce *# @xxx* sentinels on write.  Test 
>> files with blackened sentinels did load into Leo with no warnings or 
>> apparent errors.
>>
>
> Thanks for 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/8df24343-95d1-4fb1-b6d2-3776f4ae4e3bn%40googlegroups.com.


Re: Discuss: Retire @button write-leoPyRef?

2022-12-06 Thread Thomas Passin
I find that I can't remember what state extra untracked files are in for 
very long.  I usually need to stash them when I update some branch, like 
devel - git makes me do it before it will let me merge changes from, say, 
the devel branch in Leo's repo.  Pretty soon I lose track of their status.  
So mostly I don't do that any more.  I foresee having the same problems 
with a private LeoPy.leo outline.

Usually, I use a freshly-updated branch - not devel - private to my own 
repo for development or experimental work.  I update it as close to 
submitting a PR as possible.  Any changes I make to LeoPyRef.leo can get 
walked back or even reset if need be.  This way I feel safe in that I won't 
be accidentally modifying the "real" LeoPyRef.  If I were to get stuck 
somehow so that my own branch got too far out of sync and couldn't be 
merged, I would probably copy the external files I changed somewhere 
outside my repo, then update to the current devel version, then restore my 
changes from the temporary location.  With any luck, that won't happen, but 
operator error is always possible so who knows?

On Tuesday, December 6, 2022 at 1:57:47 PM UTC-5 vitalije wrote:

> Have you tried commands `set-reference-file`, `update-ref-file`  and 
> `read-ref-file` instead?
>
> In all of my projects, nowadays, I have public -ref.leo and 
> private .leo pair of files. Inside the private Leo file, I set 
> the reference file to be public -ref.leo file. At the same time 
> inside public Leo file, I have defined a button node with the headline 
> `@button 
> n-save @key=Ctrl-s` and the body like this:
>
> c.save()
> # if using @bool tree-declutter = True uncomment next line
> # clean_uas()
> c.fileCommands.save_ref()
>
> Now, every time I press Ctrl-s to save the outline, public outline is 
> updated accordingly. After executing `git pull` , I open my private outline 
> and execute mini buffer command `read-ref-file` to synchronize private 
> outline with the public one. After that I continue to work on my project 
> using only private outline.
>
> I don't really have collaborators to work on my projects, so I can't say 
> that this setup has been battle tested. Sometimes I work on different 
> machines and I haven't noticed any problem synchronizing work using this 
> method. I haven't seen unexpectedly big diffs either.
>
> HTH Vitalije
>
> On Monday, December 5, 2022 at 2:30:05 PM UTC+1 Edward K. Ream wrote:
>
>> LeoPyRef.leo defines this button. The button does the following:
>>
>> - Check that the button is running from leoPy.leo, not LeoPyRef.leo.
>> - Updates LeoPyRef.leo using only specific subtrees of leoPy.leo.
>>
>> Félix and I have noticed that sometimes this script creates large diffs 
>> between the old and new versions of LeoPyRef.leo.
>>
>> Instead, the following workflow seems to work better for me:
>>
>> - Save leoPy.leo as LeoPyRef.leo.
>> - Load the new LeoPyRef.leo.
>> - Delete unwanted parts of the new LeoPyRef.leo.
>> - Execute the git-diff command within LeoPyRef.leo.
>>
>> The git-diff command will ensure I've not deleted too much :-)
>>
>> More importantly, the Leonine git-diff shows me the "real" diffs, 
>> regardless of "extraneous" diffs caused by moving/alphabetizing nodes.
>>
>> *Summary*
>>
>> `@button write-leoPyRef` seems buggy in hard-to-pin-down ways.
>>
>> Updating LeoPyRef.leo "by hand" is safe, provided one checks the work 
>> using Leo's git-diff command.
>>
>> 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/aec99888-57e5-4fec-b621-f1e92f654bf8n%40googlegroups.com.


FeatherNotes - A Kind Of Mini-Leo Note Taker

2022-12-11 Thread Thomas Passin
I just found FeatherNotes, a Linux-only Qt-based note taking program.

It's at FeatherNotes .  Not that 
I'm suggesting it could replace Leo, but it's interesting to see the 
similarities and differences.  It's a tree-based, hierarchical program, 
with a tree view.  One difference from Leo is that the nodes are rich text 
rather than plain text, and they can contain images, tables, etc.  In this 
way they are more like word processor pages than Leo's nodes.

Although the install instructions tell you to compile it, FeatherNotes is 
available as a standard installable package in both Debian and Mint (the 
only OSs I checked) using Synaptics (i.e., apt-get, etc.).

I've only played with it for a few minutes.  As a Leo user, I feel almost 
crippled trying to use it, but if I were after just a note-taking app, it 
would probably be quite satisfactory.

I stumbled across it while I was wondering how practical it would be to 
embed images in Leo nodes.  It turns out to be easy to insert them.  
However, to manage them, save and restore nodes containing the images, 
using scripts that operate on the contents of nodes, etc. looks like it 
would be tricky without making serious changes to the way Leo works.  If 
you want to see images mixed in with text, you can already do that in Leo 
with RestructuredText/Markdown/Asciidoc nodes using the viewrendered3 
plugin.

-- 
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/e5d0fdd4-fceb-4f16-8569-dec97709676dn%40googlegroups.com.


Should leoeditor.com Be Moved To GitHub or Somewhere Else?

2022-12-26 Thread Thomas Passin
Currently Speed Ream (@Edward's brother, IIUC) is the registered contact 
for leoeditor.com and the domain name registrar is Launchpad.com, according 
to Whois.com.  I don't know where the actual server is, who pays for it, or 
who is authorized to put anything on it or modify anything that's there.

I wonder if it's time that leoeditor.com be made more available, at least 
to actively contributing members of the Leo community.  Could there be a 
home for the server that doesn't require a periodic payment, for example?  
We don't want it to go away if something happens to the wrong person at the 
wrong time.  And someone outside of {Edward, Speed} needs to be able to 
know how to access and administer it.

Perhaps this is already taken care of, and I just don't know where it's 
written up?

-- 
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/ce04ea00-ea24-4be8-94ac-6bf5fb411b0en%40googlegroups.com.


Re: Should leoeditor.com Be Moved To GitHub or Somewhere Else?

2022-12-27 Thread Thomas Passin
I might be willing, but I'm thinking it would be better to have someone 
younger pick it up - you know, better for long-term corporate memory and 
all that.  I'd be willing to work on getting it all moved over and working 
if no one else is able to just now.

It seems to me that the content at leoeditor.com could be hosted on GitHub 
at no additional cost.  Any non-commercial GitHub project can do so.  I 
don't know about linking the domain name to it, but we can work on that.  
If need be, we could change all the documentation links and slowly 
deprecate leoeditor.com. (I don't know how nostalgic you (@edward) feel 
about that domain name)
On Tuesday, December 27, 2022 at 2:11:43 PM UTC-5 Edward K. Ream wrote:

> On Monday, December 26, 2022 at 9:24:05 PM UTC-8 tbp1...@gmail.com wrote:
>
>> Currently Speed Ream (@Edward's brother, IIUC) is the registered contact 
>> for leoeditor.com and the domain name registrar is Launchpad.com, 
>> according to Whois.com.  I don't know where the actual server is, who pays 
>> for it, or who is authorized to put anything on it or modify anything 
>> that's there.
>>
>> I wonder if it's time that leoeditor.com be made more available, at 
>> least to actively contributing members of the Leo community.  Could there 
>> be a home for the server that doesn't require a periodic payment, for 
>> example?  We don't want it to go away if something happens to the wrong 
>> person at the wrong time.  And someone outside of {Edward, Speed} needs to 
>> be able to know how to access and administer it.
>>
>> Perhaps this is already taken care of, and I just don't know where it's 
>> written up?
>>
>
> Thanks for reminding me of this issue. I have just reopened #480. 
>
> Iirc there needs to be some close collaboration between Speed and whoever 
> is assigned to make the move. The previous attempt failed--iirc both 
> collaborators were waiting for the other.
>
> Thomas, are you willing to take on this project?  If so I'll give you 
> Speed's phone and email.
>
> 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/059ce6f0-fc11-4549-be80-f1ae187c9f28n%40googlegroups.com.


Re: Failing unittest in devel branch

2022-12-28 Thread Thomas Passin
You have to install it using the package manager.  Here is what I have 
found (quoted from the Users' Guide for my GF4 project)::

"On Debian/Ubuntu, tkinter has to be installed by 
the package manager:

sudo apt-get install python3-tk

This may also be the case with some non-Debian systems.
The package manager command will be different.  For the Yum package manager 
(you might have to use sudo, su root, or its equivalent to get 
administrative
permissions):

yum install tkinter

You may also need to install ImageTk.  On Debian-based systems:

sudo apt-get install python3-pil.imagetk

On CentOS/RHEL, the PIL-related packages to install with the package 
manager 
are (*pillow* has replaced the older *PIL* imaging library):

python3-pillow
python3-pillow-tk"

But if it's the curses gui, why does it need tkinter?  That seems strange.
On Wednesday, December 28, 2022 at 5:15:32 AM UTC-5 viktor@gmail.com 
wrote:

> Hello Edward,
>
> When I run the unit tests for the latest version of the devel branch, I 
> receive the following error:
>
> ###
>
> ==
> ERROR: test_cursesGui2 (leo.unittests.test_plugins.TestPlugins)
> --
> Traceback (most recent call last):
>   File 
> "/home/user/PyVE/GitHub/Leo/leo-editor/leo/unittests/test_plugins.py", line 
> 114, in test_cursesGui2
> import leo.plugins.cursesGui2 as cursesGui2
>   File 
> "/home/user/PyVE/GitHub/Leo/leo-editor/leo/plugins/cursesGui2.py", line 50, 
> in 
> from tkinter import Tk
> ModuleNotFoundError: No module named 'tkinter'
>
> --
> Ran 941 tests in 7.309s
>
> FAILED (errors=1, skipped=3)
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
>
> ###
>
> This happens in a Debian 11 - as well as - a Fedora 36 VM.
>
> 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/0b9181e8-b798-4abe-bdd9-031c43fa61ebn%40googlegroups.com.


Re: Failing unit test in devel branch

2022-12-28 Thread Thomas Passin
There's no "blame" here, just a need to work around how the Linux packagers 
have decided to work.  I *think* they want to split up and locate python 
components in particular ways to suit their packaging philosophies, so they 
have to modify pip, etc., to work that way.

It is possible to install Python on Linux using Linux installers /tarballs 
from python.org.  These do come with (I think) pip and tk, but they won't 
be managed by the Linux update system, which utility, etc., and they may 
not install into the locations favored by the distro people.

On Wednesday, December 28, 2022 at 1:30:10 PM UTC-5 viktor@gmail.com 
wrote:

> Hello Thomas,
>
> Thanks for this explanation / info.
>
> tbp1...@gmail.com schrieb am Mittwoch, 28. Dezember 2022 um 16:16:37 
> UTC+1:
>
>> You have to install it using the package manager.  Here is what I have 
>> found (quoted from the Users' Guide for my GF4 project)::
>>
>> "On Debian/Ubuntu, tkinter has to be installed by 
>> the package manager:
>>
>> sudo apt-get install python3-tk
>>
>
> I also double-checked & saw that 'setup.py' has added "tk" as an install 
> requirement.
>
> As I initially only did a 'git pull' on Leo's devel branch - and - did NOT 
> perform a subsequent 'pip install --editable 
> /home/user/PyVE/GitHub/Leo/leo-editor' I re-tried running the unit tests 
> afterwards & the same failure occurred ...
>
> Who is to 'blame' for treating Linux as a second-class citizen?
>
> Leo's 'setup.py' script - or - the Python Packagers of Debian & Fedora 
> Linux ...
>
> 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/89f59e2f-a110-4115-a133-4a80222a647an%40googlegroups.com.


Re: Failing unit test in devel branch

2022-12-28 Thread Thomas Passin
" I also double-checked & saw that 'setup.py' has added "tk" as an install 
requirement."

I wonder if Leo needs tk at all any more.  Maybe it can be removed as a 
requirement.

On Wednesday, December 28, 2022 at 1:30:10 PM UTC-5 viktor@gmail.com 
wrote:

> Hello Thomas,
>
> Thanks for this explanation / info.
>
> tbp1...@gmail.com schrieb am Mittwoch, 28. Dezember 2022 um 16:16:37 
> UTC+1:
>
>> You have to install it using the package manager.  Here is what I have 
>> found (quoted from the Users' Guide for my GF4 project)::
>>
>> "On Debian/Ubuntu, tkinter has to be installed by 
>> the package manager:
>>
>> sudo apt-get install python3-tk
>>
>
> I also double-checked & saw that 'setup.py' has added "tk" as an install 
> requirement.
>
> As I initially only did a 'git pull' on Leo's devel branch - and - did NOT 
> perform a subsequent 'pip install --editable 
> /home/user/PyVE/GitHub/Leo/leo-editor' I re-tried running the unit tests 
> afterwards & the same failure occurred ...
>
> Who is to 'blame' for treating Linux as a second-class citizen?
>
> Leo's 'setup.py' script - or - the Python Packagers of Debian & Fedora 
> Linux ...
>
> 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/10550470-8d0d-46d8-ba00-2462a888e867n%40googlegroups.com.


Re: Failing unit test in devel branch

2022-12-28 Thread Thomas Passin
I doubt that it's actually "required" in the sense that tk is used any 
more.  If a test calls for it, probably that test should be updated.

On Wednesday, December 28, 2022 at 2:23:07 PM UTC-5 viktor@gmail.com 
wrote:

> Hello Thomas,
>
> tbp1...@gmail.com schrieb am Mittwoch, 28. Dezember 2022 um 19:47:10 
> UTC+1:
>
>> " I also double-checked & saw that 'setup.py' has added "tk" as an 
>> install requirement."
>>
>> I wonder if Leo needs tk at all any more.  Maybe it can be removed as a 
>> requirement.
>>
>
> Here's the complete output from my second attempt to run unit tests on 
> Debian:
>
>  (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ cd leo-editor/
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python -m 
> unittest
> 
> 
> 
> 
> 
> 
> 
> ...s
> 
> s...
> 
> 
> 
> 
> 
> 
> 
> 
> 
> s...
> 
> 
> ...cursesGui2.py: Tk 
> module required for clipboard handling.
> E.
>
> ==
> ERROR: test_cursesGui2 (leo.unittests.test_plugins.TestPlugins)
> --
> Traceback (most recent call last):
>   File 
> "/home/user/PyVE/GitHub/Leo/leo-editor/leo/unittests/test_plugins.py", line 
> 114, in test_cursesGui2
> import leo.plugins.cursesGui2 as cursesGui2
>   File 
> "/home/user/PyVE/GitHub/Leo/leo-editor/leo/plugins/cursesGui2.py", line 50, 
> in 
> from tkinter import Tk
> ModuleNotFoundError: No module named 'tkinter'
>
> --
> Ran 941 tests in 7.338s
>
> FAILED (errors=1, skipped=3)
> (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ 
>
> If I read the info correctly, than at least the cursesGui2 plugin - and/or 
> - the unit tests for it, still require the 'tkinter' module ...
>
> Let's wait & see what Edward thinks.
>
> 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/94dde278-2f94-4a64-a5a1-c782a6cd909dn%40googlegroups.com.


Re: Should leoeditor.com Be Moved To GitHub or Somewhere Else?

2022-12-28 Thread Thomas Passin
I meant that the server should be more available to devs or an admin.  
Right now, it may very well that only Speed and Edward can access it to 
make changes, etc. Also, someone is presumably paying for the server and 
the domain.  That person might go away or lose interest at some time, and 
then no one else would be able to maintain the server or domain.

If the documentation were moved to github.io, and the links changed to 
point there instead of leoeditor.com, newer users could find the docs and 
the older docs on leoeditor.com could slowly age away.

On Wednesday, December 28, 2022 at 3:18:30 PM UTC-5 jkn wrote:

> I'm not very clear about the motivation - what does 'make leoeditor.com 
> more available...' mean?
>
> If it's an idea towards (for instance) allowing more, interested, parties 
> contributing to Leo's documentation, then I think that is a good idea. It's 
> not clear to me whether that is where the suggestion is coming from.
>
> I would have thought that this could be done without deprecating 
> leoeditor.com; plenty of projects seem to separate out code and 
> documentation in this way. I don't know if the cost of serving 
> leoeditor.com is an issue...
>
> J^n
>
>
> On Tuesday, December 27, 2022 at 10:51:52 PM UTC tbp1...@gmail.com wrote:
>
>> I might be willing, but I'm thinking it would be better to have someone 
>> younger pick it up - you know, better for long-term corporate memory and 
>> all that.  I'd be willing to work on getting it all moved over and working 
>> if no one else is able to just now.
>>
>> It seems to me that the content at leoeditor.com could be hosted on 
>> GitHub at no additional cost.  Any non-commercial GitHub project can do 
>> so.  I don't know about linking the domain name to it, but we can work on 
>> that.  If need be, we could change all the documentation links and slowly 
>> deprecate leoeditor.com. (I don't know how nostalgic you (@edward) feel 
>> about that domain name)
>> On Tuesday, December 27, 2022 at 2:11:43 PM UTC-5 Edward K. Ream wrote:
>>
>>> On Monday, December 26, 2022 at 9:24:05 PM UTC-8 tbp1...@gmail.com 
>>> wrote:
>>>
 Currently Speed Ream (@Edward's brother, IIUC) is the registered 
 contact for leoeditor.com and the domain name registrar 
 is Launchpad.com, according to Whois.com.  I don't know where the actual 
 server is, who pays for it, or who is authorized to put anything on it or 
 modify anything that's there.

 I wonder if it's time that leoeditor.com be made more available, at 
 least to actively contributing members of the Leo community.  Could there 
 be a home for the server that doesn't require a periodic payment, for 
 example?  We don't want it to go away if something happens to the wrong 
 person at the wrong time.  And someone outside of {Edward, Speed} needs to 
 be able to know how to access and administer it.

 Perhaps this is already taken care of, and I just don't know where it's 
 written up?

>>>
>>> Thanks for reminding me of this issue. I have just reopened #480. 
>>>
>>> Iirc there needs to be some close collaboration between Speed and 
>>> whoever is assigned to make the move. The previous attempt failed--iirc 
>>> both collaborators were waiting for the other.
>>>
>>> Thomas, are you willing to take on this project?  If so I'll give you 
>>> Speed's phone and email.
>>>
>>> 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/a5d76683-46a3-494f-bcd7-be1a45b4ff5fn%40googlegroups.com.


Re: Should leoeditor.com Be Moved To GitHub or Somewhere Else?

2022-12-30 Thread Thomas Passin
That would be great!  GitHub Pages only support static pages, so any PHP 
usage will need to be reworked not to use it.  Also, won't someone need to 
keep renewing and paying for the leoeditor.com domain, if that becomes 
linked to GitHub Pages?  If so, ultimately it would be good to phase that 
DNS entry out.

On Friday, December 30, 2022 at 7:48:52 AM UTC-5 Edward K. Ream wrote:

> On Wednesday, December 28, 2022 at 3:04:39 PM UTC-6 tbp1...@gmail.com 
> wrote:
>
>> I meant that the server should be more available to devs or an admin.  
>> Right now, it may very well that only Speed and Edward can access it to 
>> make changes, etc. 
>
>
> Thanks to all for your comments.
>
> After looking at the docs for GitHub Pages , I 
> think I should do the admin work required to transfer leo-editor.com. 
> Once the DNS stuff 
> 
>  
> goes through any Leo dev (including me) should be able to update Leo's docs 
> simply by doing a PR to a dedicated branch.
>
> I have just created #3019 
>  for this project. 
> It's a restart of #480 
> , which I have just 
> now closed.
>
> 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/f20b12cf-2590-40d3-a064-582f933c47d9n%40googlegroups.com.


Re: Should leoeditor.com Be Moved To GitHub or Somewhere Else?

2022-12-31 Thread Thomas Passin
I agree. There are sites out there that refer to leoeditor.com, like the 
LeoVue web site.  It would probably be good if those links could still work 
for some time as we got the new site going.

On Saturday, December 31, 2022 at 5:50:21 PM UTC-5 Félix wrote:

> Indeed, using the technique referenced by Edward at 
> https://pages.github.com/, (which I used for https://boltex.github.io/) 
> would yield the URL https://leo-editor.github.io/ which I feel is totally 
> acceptable, and would be available without maintenance nor fees, for years 
> if not decades.
>
> Félix
>
> On Friday, December 30, 2022 at 8:12:44 AM UTC-5 tbp1...@gmail.com wrote:
>
>> That would be great!  GitHub Pages only support static pages, so any PHP 
>> usage will need to be reworked not to use it.  Also, won't someone need to 
>> keep renewing and paying for the leoeditor.com domain, if that becomes 
>> linked to GitHub Pages?  If so, ultimately it would be good to phase that 
>> DNS entry out.
>>
>> On Friday, December 30, 2022 at 7:48:52 AM UTC-5 Edward K. Ream wrote:
>>
>>> On Wednesday, December 28, 2022 at 3:04:39 PM UTC-6 tbp1...@gmail.com 
>>> wrote:
>>>
 I meant that the server should be more available to devs or an admin.  
 Right now, it may very well that only Speed and Edward can access it to 
 make changes, etc. 
>>>
>>>
>>> Thanks to all for your comments.
>>>
>>> After looking at the docs for GitHub Pages , 
>>> I think I should do the admin work required to transfer leo-editor.com. 
>>> Once the DNS stuff 
>>> 
>>>  
>>> goes through any Leo dev (including me) should be able to update Leo's docs 
>>> simply by doing a PR to a dedicated branch.
>>>
>>> I have just created #3019 
>>>  for this 
>>> project. It's a restart of #480 
>>> , which I have 
>>> just now closed.
>>>
>>> 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/d073082d-6685-404d-9e69-7d6fdb38a0f6n%40googlegroups.com.


Re: Should leoeditor.com Be Moved To GitHub or Somewhere Else?

2023-01-01 Thread Thomas Passin
I'm comfortable with this approach.  Once the new site is up and working, 
let's try contacting each site that we know references leoeditor.com and 
inform them of the change.  That won't catch everything but I don't know 
what else we can do, once leoeditor.com itself lapses at some point in the 
future.

On Sunday, January 1, 2023 at 6:26:11 AM UTC-5 Edward K. Ream wrote:

> > *Félix*: the technique referenced by Edward at https://pages.github.com/, 
> (which I used for https://boltex.github.io/) would yield the URL 
> https://leo-editor.github.io/ which I feel is totally acceptable, and 
> would be available without maintenance nor fees, for years if not decades. 
>
> > *Thomas*: I agree. There are sites out there that refer to leoeditor.com, 
> like the LeoVue web site.  It would probably be good if those links could 
> still work for some time as we got the new site going.
>
> I'm convinced. We should phase out leoeditor.com in favor of a new 
> website hosted on GitHub. Using ensure that Leo's website (including 
> documentation) will continue after my brother and I are gone.
>
> I have just updated #3019 
>  with the following 
> plan:
>
> 1. Create a new website using GitHub pages. Details (and url) unclear at 
> present.
>I expect to continue to use Sphinx to create Leo's documentation.
>
> 2. When all looks good (and works as expected), change the top-level 
> leo-editor.com page so that it redirects visitors to the new url. We will 
> *not 
> *transfer leo-editor.com domain itself to the new site.
>
> This plan eliminates the need to change the DNS entries for leoeditor.com. 
> Eventually leoeditor.com will "wither away".
>
> Any comments or suggestions?
>
> 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/2625e440-4f98-49bc-887a-15b2b2033fd8n%40googlegroups.com.


Viewrendered3 Can Now Render PlantUml diagrams

2023-01-01 Thread Thomas Passin
If you use asciidoc and the external asciidoctor processor, the 
viewrendered3 plugin can now render PlantUml diagrams.  See the section on 
Asciidoc in the program's docstring to see how to do it.  The docstring 
will be displayed by Leo's *Plugins/viewrendered3/About* menu item.

This enhancement is included in the current changeset of the *devel* branch.

The impetus for this new capability was a request by @wangzhaohe.

-- 
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/5f0b7033-de0f-4bd3-8ea5-d5e4e8c134d9n%40googlegroups.com.


Command To Convert Selection Or Body To Title Case

2023-01-01 Thread Thomas Passin
Leo has commands to capitalize, upcase, and lowercase the body text or 
selections of the body text.  I could not find a command to convert to 
title case (first letter of every word capitalized).  So here is a script 
to do so.

The script does not take into account any tricky edge cases - it just uses 
the Python string.title() method.  The command is undoable.

"""Convert selection or body to title case."""
w = c.frame.body.wrapper
p = c.p
s = p.b
u = c.undoer

start, end = w.getSelectionRange()
use_entire = start == end  # no selection, convert entire body

undoType = 'title-case-body-selection'
undoData = u.beforeChangeNodeContents(p)

if use_entire:
p.b = s.title()
else:
sel = s[start:end]
head, tail = s[:start], s[end:]
p.b = head + sel.title() + tail

c.setChanged()
p.setDirty()
u.afterChangeNodeContents(p, undoType, undoData)
c.redraw()

-- 
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/77c83fa1-e0f6-4cb1-af0a-c8f26c50439dn%40googlegroups.com.


Re: Viewrendered3 Can Now Render PlantUml diagrams

2023-01-02 Thread Thomas Passin
No, it doesn't need a server link.  That's the nice part.  You just install 
the *asciidoctor-diagram* gem, and use the header shown in the docstring.  
Of course you need to have installed Ruby and the *asciidoctor* gem in the 
first place.  The Ruby people found an alternative engine that they include 
with the gem and can run directly without a server.  Using the right 
diagram header gets Ruby to use this alternative.

On Monday, January 2, 2023 at 9:15:49 AM UTC-5 jkn wrote:

> That sounds handy, thanks. Does this need a link to the PlantUML server, 
> or a local one, or...?
>
> Thanks, J^n
>
>
> On Sunday, January 1, 2023 at 1:44:22 PM UTC tbp1...@gmail.com wrote:
>
>> If you use asciidoc and the external asciidoctor processor, the 
>> viewrendered3 plugin can now render PlantUml diagrams.  See the section on 
>> Asciidoc in the program's docstring to see how to do it.  The docstring 
>> will be displayed by Leo's *Plugins/viewrendered3/About* menu item.
>>
>> This enhancement is included in the current changeset of the *devel* 
>> branch.
>>
>> The impetus for this new capability was a request by @wangzhaohe.
>>
>

-- 
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/523effdc-ad8e-4262-acfb-10d6bd67fe3fn%40googlegroups.com.


Re: Command To Convert Selection Or Body To Title Case

2023-01-02 Thread Thomas Passin
Theoretically they can go into scripts.leo, but I always forget about that 
outline and a lot of its scripts are so long unmaintained that they don't 
even work.  That, or they are so specialized that it's hard to even know 
what they do.

I do agree that a collection of small utility scripts would be great for 
people trying to learn how to program for Leo - IF they are well 
documented, and clear and simple.

On Monday, January 2, 2023 at 6:17:38 PM UTC-5 jkn wrote:

> It would be good to have a miscellany of little script examples like this 
> easily
> available, to give people assistance with learning Leo scripting. I know
> a few have been published as Github gists in the past, and there are some 
> clues
> in the Leoeditor.com documentation, but a few dozen snippets on one place,
> with some annotation, would be very useful, I think. I might even have a 
> couple
> of my own to contribute...
>
> J^n
>
>
> On Monday, January 2, 2023 at 5:14:47 AM UTC tbp1...@gmail.com wrote:
>
>> Leo has commands to capitalize, upcase, and lowercase the body text or 
>> selections of the body text.  I could not find a command to convert to 
>> title case (first letter of every word capitalized).  So here is a script 
>> to do so.
>>
>> The script does not take into account any tricky edge cases - it just 
>> uses the Python string.title() method.  The command is undoable.
>>
>> """Convert selection or body to title case."""
>> w = c.frame.body.wrapper
>> p = c.p
>> s = p.b
>> u = c.undoer
>>
>> start, end = w.getSelectionRange()
>> use_entire = start == end  # no selection, convert entire body
>>
>> undoType = 'title-case-body-selection'
>> undoData = u.beforeChangeNodeContents(p)
>>
>> if use_entire:
>> p.b = s.title()
>> else:
>> sel = s[start:end]
>> head, tail = s[:start], s[end:]
>> p.b = head + sel.title() + tail
>>
>> c.setChanged()
>> p.setDirty()
>> u.afterChangeNodeContents(p, undoType, undoData)
>> c.redraw()
>>
>

-- 
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/c44c8244-bfe4-4587-b415-84f835372e85n%40googlegroups.com.


Re: Command To Convert Selection Or Body To Title Case

2023-01-03 Thread Thomas Passin
Where do you think a collection like that should live, bearing in mind that 
it should be easy for a newbie to learn about it?

On Tuesday, January 3, 2023 at 5:23:47 AM UTC-5 jkn wrote:

>
> Yes ... 'many' of the scripts I come across, eg. on this newsgroup, need a 
> bit of tweaking to run with more modern Leo. But I think a collection with 
> some of the concepts 'curated' and commented on would be useful.
>
> Like you, I always forget about scripts.leo; not sure that is the right 
> place.
>
> On Monday, January 2, 2023 at 11:47:36 PM UTC tbp1...@gmail.com wrote:
>
>> Theoretically they can go into scripts.leo, but I always forget about 
>> that outline and a lot of its scripts are so long unmaintained that they 
>> don't even work.  That, or they are so specialized that it's hard to even 
>> know what they do.
>>
>> I do agree that a collection of small utility scripts would be great for 
>> people trying to learn how to program for Leo - IF they are well 
>> documented, and clear and simple.
>>
>> On Monday, January 2, 2023 at 6:17:38 PM UTC-5 jkn wrote:
>>
>>> It would be good to have a miscellany of little script examples like 
>>> this easily
>>> available, to give people assistance with learning Leo scripting. I know
>>> a few have been published as Github gists in the past, and there are 
>>> some clues
>>> in the Leoeditor.com documentation, but a few dozen snippets on one 
>>> place,
>>> with some annotation, would be very useful, I think. I might even have a 
>>> couple
>>> of my own to contribute...
>>>
>>> J^n
>>>
>>>
>>> On Monday, January 2, 2023 at 5:14:47 AM UTC tbp1...@gmail.com wrote:
>>>
 Leo has commands to capitalize, upcase, and lowercase the body text or 
 selections of the body text.  I could not find a command to convert to 
 title case (first letter of every word capitalized).  So here is a script 
 to do so.

 The script does not take into account any tricky edge cases - it just 
 uses the Python string.title() method.  The command is undoable.

 """Convert selection or body to title case."""
 w = c.frame.body.wrapper
 p = c.p
 s = p.b
 u = c.undoer

 start, end = w.getSelectionRange()
 use_entire = start == end  # no selection, convert entire body

 undoType = 'title-case-body-selection'
 undoData = u.beforeChangeNodeContents(p)

 if use_entire:
 p.b = s.title()
 else:
 sel = s[start:end]
 head, tail = s[:start], s[end:]
 p.b = head + sel.title() + tail

 c.setChanged()
 p.setDirty()
 u.afterChangeNodeContents(p, undoType, undoData)
 c.redraw()

>>>

-- 
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/27e95833-efd6-4347-b5af-ceafde56fa46n%40googlegroups.com.


Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread Thomas Passin
Hah! That's what I was trying to remember.  If we forget  about these 
places, how is a newbie going to find them?  Isn't there a link in the 
cheatsheet stuff that Leo puts into the default workbook when it is run for 
the first time?

On Wednesday, January 4, 2023 at 6:28:31 AM UTC-5 jkn wrote:

> It is/was my starting-off place re. scripting; especially when I forget 
> about scripts.leo ...
>
> On Wednesday, January 4, 2023 at 9:06:31 AM UTC Edward K. Ream wrote:
>
>> On Wed, Jan 4, 2023 at 2:56 AM jkn  wrote:
>>
>>> This is the other candidate place, of course:
>>>
>>> https://leoeditor.com/scripting-miscellany.html
>>>
>>
>> Heh. I had forgotten about this. Thanks for the reminder.
>>
>> 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/e28bf9b0-4868-4865-9677-f3f392607634n%40googlegroups.com.


Re: Command To Convert Selection Or Body To Title Case

2023-01-04 Thread Thomas Passin
Let's add the scripting-miscellany link to Leo's Help menu.

On Wednesday, January 4, 2023 at 11:32:09 AM UTC-5 Edward K. Ream wrote:

> On Wednesday, January 4, 2023 at 10:18:53 AM UTC-6 Edward K. Ream wrote:
>
> > I've just added this entry 
> 
>  
> (online and in devel).
>
> And I've just updated this page 
>  in Leo's Reference 
> Guide.
>
> 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/9337e0f8-ab36-44a0-b627-f3b4ed1ed401n%40googlegroups.com.


Re: A curious observation, #2

2023-01-04 Thread Thomas Passin
Yes indeed, and there is a setting to adjust for the misalignment. @int 
gutter-y-adjust = 7 works for my current theme.  I've been known to have to 
go up to 12.  I forget how I learned about this setting, it's been too long.

On Wednesday, January 4, 2023 at 3:18:12 PM UTC-5 jkn wrote:

> This is a pretty tiny scratch, but: does anyone else notice that the line 
> numbers
> in the body pane border are slightly misaligned with the actual lines in 
> the body?
>
> For me, numbers in the border are a little lower than the lines in the 
> body.
>
> I am sure this depends on the fonts set and their metrics; just curious if 
> anyone else has this.
>
> Regards, J^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/bbeb4743-8bd6-4a75-b739-7bac9e71e5acn%40googlegroups.com.


Re: A curious observation, #1

2023-01-04 Thread Thomas Passin
ISTR that (in the code) you can tell a file open dialog to open at a 
specific directory, at least on Windows.  Maybe that's it.  It might not be 
the Most Recently Used list but some other location that's stored, not that 
I know anything specific.

On Wednesday, January 4, 2023 at 3:14:56 PM UTC-5 jkn wrote:

> A curious (to me) observation:
>
> A little while ago, and in Leo, I saved a copy of my 
> ~/.leo/myLeoSettings.py to a
> local network-available location. I wanted to make this centrally 
> available for instances
> of Leo running on other computers.
>
> Today, I wanted to make a change to the ~/.leo/myLeoSettings.py fil on 
> this local machine.
> I did the following (I don't claim this is the most efficient workflow):
>
> - via the menu: File | Open Leo Specific File | myLeoSettings.py
> - edit the file (to add an @command node, as it happens)
> - save the file
> - exit Leo and restart
>
> To my puzzlement the command wasn't working, and 'show-commands' didn't 
> list it.
>
> After a fair bit of investigating I realised the issue. File | Open Leo 
> Specific File | myLeoSettings.py  was not opening the file in ~/.leo, but 
> the network-located file!
>
> This surprises me not a little. Is there some 'Most Recently Used' feature 
> being applied to myLeoSettings.py here?
>
> Cheers, J^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/93b32898-3c47-43fa-89dd-4fb919331fa3n%40googlegroups.com.


Re: A curious observation, #2

2023-01-05 Thread Thomas Passin
I see in LeoPyRef that there is also a setting *gutter-w-adjust*.  A 
comment says its function is to provide extra room for bolding the line 
number of the current line.  Its default value seems to work for me (a good 
thing because I didn't know about it before now).

The line numbers are not applied using CSS styles.  They are directly 
painted into the gutter area.

On Thursday, January 5, 2023 at 3:42:56 AM UTC-5 jkn wrote:

> A gutter-y-adjust value of 2 or 3 seems to work well for my current 
> theme/font settings, thanks!
>
>
> On Thursday, January 5, 2023 at 7:52:03 AM UTC jkn wrote:
>
>> Ah brilliant, thanks. I didn't know about the gutter-y-adjust setting. I 
>> do appreciate that getting it right programatically, for all fonts etc, 
>> would be tricky/impractical...
>>
>> On Wednesday, January 4, 2023 at 11:08:17 PM UTC tbp1...@gmail.com wrote:
>>
>>> Yes indeed, and there is a setting to adjust for the misalignment. @int 
>>> gutter-y-adjust = 7 works for my current theme.  I've been known to 
>>> have to go up to 12.  I forget how I learned about this setting, it's been 
>>> too long.
>>>
>>> On Wednesday, January 4, 2023 at 3:18:12 PM UTC-5 jkn wrote:
>>>
 This is a pretty tiny scratch, but: does anyone else notice that the 
 line numbers
 in the body pane border are slightly misaligned with the actual lines 
 in the body?

 For me, numbers in the border are a little lower than the lines in the 
 body.

 I am sure this depends on the fonts set and their metrics; just curious 
 if anyone else has this.

 Regards, J^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/03cc6cc3-a71a-4d9d-9303-1667283e0e50n%40googlegroups.com.


Re: A curious observation, #2

2023-01-05 Thread Thomas Passin
There is actually some CSS styling possible for the gutter:
A logical setting: @string font-size-gutter = 9pt

and in the theme's stylesheet:

QFrame#gutter {
  font-size: @font-size-gutter;
  background: @dark-base02;
}

On Thursday, January 5, 2023 at 12:38:58 PM UTC-5 jkn wrote:

> Heh, I was thinking of looking for a setting named that, for curiosity's 
> sake if nothing else. Thanks for beating me to it...
>
> On Thursday, January 5, 2023 at 2:54:48 PM UTC tbp1...@gmail.com wrote:
>
>> I see in LeoPyRef that there is also a setting *gutter-w-adjust*.  A 
>> comment says its function is to provide extra room for bolding the line 
>> number of the current line.  Its default value seems to work for me (a good 
>> thing because I didn't know about it before now).
>>
>> The line numbers are not applied using CSS styles.  They are directly 
>> painted into the gutter area.
>>
>> On Thursday, January 5, 2023 at 3:42:56 AM UTC-5 jkn wrote:
>>
>>> A gutter-y-adjust value of 2 or 3 seems to work well for my current 
>>> theme/font settings, thanks!
>>>
>>>
>>> On Thursday, January 5, 2023 at 7:52:03 AM UTC jkn wrote:
>>>
 Ah brilliant, thanks. I didn't know about the gutter-y-adjust setting. 
 I do appreciate that getting it right programatically, for all fonts etc, 
 would be tricky/impractical...

 On Wednesday, January 4, 2023 at 11:08:17 PM UTC tbp1...@gmail.com 
 wrote:

> Yes indeed, and there is a setting to adjust for the misalignment. @int 
> gutter-y-adjust = 7 works for my current theme.  I've been known to 
> have to go up to 12.  I forget how I learned about this setting, it's 
> been 
> too long.
>
> On Wednesday, January 4, 2023 at 3:18:12 PM UTC-5 jkn wrote:
>
>> This is a pretty tiny scratch, but: does anyone else notice that the 
>> line numbers
>> in the body pane border are slightly misaligned with the actual lines 
>> in the body?
>>
>> For me, numbers in the border are a little lower than the lines in 
>> the body.
>>
>> I am sure this depends on the fonts set and their metrics; just 
>> curious if anyone else has this.
>>
>> Regards, J^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/d245d2b6-2951-48b1-9c30-233cd25c79ccn%40googlegroups.com.


Abbreviations For Greek Letters

2023-01-08 Thread Thomas Passin
Sometimes I want to insert a Greek letter into text, often *sigma *or *mu*.  
On Windows, at least, it's always annoying and clumsy.   So I thought I'd 
try out Leo's abbreviations, which I've never used in the past.  It's 
working well, so I've collected them here in case it will save someone else 
some trouble.

When you type one of the abbreviations (like alph;;), Leo replaces what you 
typed with the corresponding text.  That text can be long and complicated, 
but here it's just a single symbol.  The abbreviation definitions must be 
copied into a settings node, best placed in *myLeoSettings.leo*, and the 
node's headline must start with *@data global-abbreviations* 
to make them available in all outlines.  My node has the headline
*@data global-abbreviations - Symbols. * Here is the content of the node's 
body, ready to be copy-pasted:

alph;;=α
beta;;=β
delt;;=δ
gam;;=γ
mu;;=μ
pi;;=π
sig;;=σ

Delt;;=Δ
Sig;;=Σ
pm;;=±

The abbreviations don't have to end with ";;" but that's easy to type and 
unlikely to be typed for any other reason.  That's probably why it's used 
in many of the examples.  

To make abbreviations active you also have to add a new setting
@bool enable-abbreviations = True.

-- 
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/96b52ccf-88af-4ee1-a4f6-4114bdadf8c7n%40googlegroups.com.


Re: Leo's new website is live. Leo 6.7.2 coming soon

2023-01-09 Thread Thomas Passin
Great!  One glitch - Links from the google search box point to the old 
site, not the new one.

On Monday, January 9, 2023 at 1:45:53 PM UTC-5 Edward K. Ream wrote:

> GitHub pages now hosts Leo's new website at:
> https://leo-editor.github.io/leo-editor/
>
> Please test these new pages and report any problems!
>
> There will be a period of transition, as described in #3019 
> . To avoid 
> confusion, the new home page has the title "Leo's New Home Page". The word 
> "New" will disappear once the changeover is complete. 
>
> As you can see, several admin tasks remain, including replacing Leo's 
> existing home page with a page that redirects to the new website. The 
> changeover will happen soon.
>
> Leo 6.7.2  will 
> announce Leo's new home page. This release is now scheduled for Friday, 
> January 27. This date may slip.
>
> 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/f81de8d6-1025-40eb-8f4a-1fccbe96c69bn%40googlegroups.com.


Re: Abbreviations For Greek Letters

2023-01-09 Thread Thomas Passin
Maybe in the section in LeoDocs that mentions abbreviations?  It's very 
short, and these shortcuts could serve as examples, too.  @Edward suggested 
disabled in LeoSettings.leo.  That would be all right too, but how many of 
us troll through there looking for interesting things?

I expect my own list to grow.  I'm trying to avoid too much growth, just 
because if it's large I won't remember them.
On Monday, January 9, 2023 at 2:32:39 PM UTC-5 Rob wrote:

> Thanks for the list! I do much the same thing and have an even longer 
> list; not just Greek letters. Is there a better place to add to the list 
> than here?
>
> Rob...
>
> On Sunday, January 8, 2023 at 2:19:32 PM UTC-5 tbp1...@gmail.com wrote:
>
>> Sometimes I want to insert a Greek letter into text, often *sigma *or 
>> *mu*.  On Windows, at least, it's always annoying and clumsy.   So I 
>> thought I'd try out Leo's abbreviations, which I've never used in the 
>> past.  It's working well, so I've collected them here in case it will save 
>> someone else some trouble.
>>
>> When you type one of the abbreviations (like alph;;), Leo replaces what 
>> you typed with the corresponding text.  That text can be long and 
>> complicated, but here it's just a single symbol.  The abbreviation 
>> definitions must be copied into a settings node, best placed in 
>> *myLeoSettings.leo*, and the node's headline must start with *@data 
>> global-abbreviations* 
>> to make them available in all outlines.  My node has the headline
>> *@data global-abbreviations - Symbols. * Here is the content of the 
>> node's body, ready to be copy-pasted:
>>
>> alph;;=α
>> beta;;=β
>> delt;;=δ
>> gam;;=γ
>> mu;;=μ
>> pi;;=π
>> sig;;=σ
>>
>> Delt;;=Δ
>> Sig;;=Σ
>> pm;;=±
>>
>> The abbreviations don't have to end with ";;" but that's easy to type and 
>> unlikely to be typed for any other reason.  That's probably why it's used 
>> in many of the examples.  
>>
>> To make abbreviations active you also have to add a new setting
>> @bool enable-abbreviations = True.
>>
>

-- 
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/ad6172a2-398c-46dd-9e8d-37ccc7950928n%40googlegroups.com.


Re: Abbreviations For Greek Letters

2023-01-09 Thread Thomas Passin
because;;=∵

That's one I've never heard of before! An inverted "therefore".
On Monday, January 9, 2023 at 5:52:18 PM UTC-5 Edward K. Ream wrote:

> On Mon, Jan 9, 2023 at 4:48 PM Rob  wrote:
>
>> Perhaps also useful:
>>
>> degree;;=°
>> half;;=½
>> quarter;;=¼
>> 3fourths;;=¾
>> divide;;=÷
>> bullet;;=•
>> infinity;;=∞
>> # Ellipsis
>> ...;;=…
>> ergo;;=∴
>> because;;=∵
>>
>> # Currency
>> cent;;=¢
>> euro;;=€
>> pound;;=£
>> yen;;=¥
>>
>
> Thanks. Rev 45b20a7 in devel adds the disabled version of these 
> abbreviations to leoSettings.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/3f159544-d8bf-4bba-afd7-c7f94cb1bf6an%40googlegroups.com.


Re: How to change docker arrow icon size?

2023-01-09 Thread Thomas Passin
The height would probably be set in the CSS rules in the theme's qt 
stylesheet.  I'm not sure just now which selector would cover it.  The 
arrows must be icons somewhere, but you'd probably have to look in the 
plugin's code to find them.

On Monday, January 9, 2023 at 9:02:31 PM UTC-5 wangz...@gmail.com wrote:

> Help!
> Is there a way to change docker hight or arrow size. It seems the arrow is 
> bigger.
>
> [image: iShot_2023-01-10_10.01.02.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/3e9aaf43-6d15-4d76-9cdc-ef40cc193a15n%40googlegroups.com.


Re: How to change docker arrow icon size?

2023-01-09 Thread Thomas Passin
The plugin is *nav_qt.py*.

On Tuesday, January 10, 2023 at 12:11:46 AM UTC-5 Thomas Passin wrote:

> The height would probably be set in the CSS rules in the theme's qt 
> stylesheet.  I'm not sure just now which selector would cover it.  The 
> arrows must be icons somewhere, but you'd probably have to look in the 
> plugin's code to find them.
>
> On Monday, January 9, 2023 at 9:02:31 PM UTC-5 wangz...@gmail.com wrote:
>
>> Help!
>> Is there a way to change docker hight or arrow size. It seems the arrow 
>> is bigger.
>>
>> [image: iShot_2023-01-10_10.01.02.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/954bd114-4461-4309-9093-421f6d60c66cn%40googlegroups.com.


Re: Abbreviations For Greek Letters

2023-01-10 Thread Thomas Passin
I don't think you need that coding line any more.  That was a Python2 
thing.  Python3 uses unicode/utf-8 automatically.  FWIW, I generally 
(before the abbreviations) copied and pasted non-ascii characters from 
various web pages, and it's always worked well.

On Tuesday, January 10, 2023 at 11:53:41 AM UTC-5 jkn wrote:

> Hi Edward
>
> On Tuesday, January 10, 2023 at 4:36:23 PM UTC Edward K. Ream wrote:
> On Tuesday, January 10, 2023 at 10:31:02 AM UTC-6 jkn wrote:
>
> I *do* use Unicode, of course ... just not extensively within my Leo 
> notes, for instance.
>
> :-)
>  
> I am not planning to use non-ASCII glyphs within my Python *code*, either.
>
> It's easy to allow Unicode within .py files.  Just start `@file` nodes 
> with:
>
>   @first # -*- coding: utf-8 -*-
>
> or just:
>
>  # -*- coding: utf-8 -*-
>
> For other kinds of @ nodes.
>
> Edward
>
> Yeah, I appreciate that. I just choose not to have such characters in my 
> Python.
> (I actually don't write much of my Python with Leo, but that's a different 
> matter... ;-/)
>
> Regards, J^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/334e20f3-8d50-4182-84f3-1c8b22958566n%40googlegroups.com.


Re: Command To Convert Selection Or Body To Title Case

2023-01-10 Thread Thomas Passin
Yes, it can be hard to find out how to do things you want in Leo.  The good 
news is that you can do most anything.  Remember to undo/redo operations 
that change a node or the tree - my title-case script shows how to do that 
for node content.

Leo's code base is in the PyLeoRef.leo outline, as I imagine you already 
know.  IMHO, the best way to find code that might be related to what you 
want is the Nav tab, along with tab completion of minibuffer commands.  
When you type (or paste) into the search box in the Nav tab, it shows you 
node headlines that match.  After you hit ENTER, it also shows you body 
matches.

For example, you write that you want to duplicate a line.  So you have to 
select or at least find a line to copy.  I remembered that there is a 
command to move a line up.  I typed "move" into the minibuffer and then TAB 
to get a list of all matching command.  There it was - "move-lines-up".  I 
copied that and pasted it into the search box in the Nav tab.  This showed 
a match for "@cmd('move-lines-up')".  Clicking on that took me to where the 
command is defined.  Right there it shows how to get the selection range, 
and how to get the line from the selection.

The other excellent feature is the ability to CTRL-click on a function or 
method call and (usually) get taken to its definition.

Forgive me if you already know these things. They have been really helpful 
for me.  And, as Edward would advise, judicious use of clones can be very 
helpful.  Also, you might want to check out the Freewin plugin - it opens a 
stand-alone window that shows a single node in a basic editor, which you 
can keep open alongside Leo's window for reference while you navigate to 
some other node.  That's probably new since you were last working with Leo.

On Tuesday, January 10, 2023 at 4:11:17 PM UTC-5 Kevin Henderson wrote:

> This is great timing Thomas, thank you! 
> I've been away from Leo for a while, but making another attempt to get 
> back into it.
>
> I've had a _heck_ of time figuring out how to do what showed, in my case I 
> wanted a 'duplicate-line' command. 
> It really is tremendously difficult to figure out what to do or where to 
> start. 
>
> a couple of observations:
> - what got me the furthest (but not all the way there) is/was the 
> `scripts.leo` file (i.e. the 'Text' section).
> - most of the scripts & guides seem to be around working with nodes (which 
> seems easier) rather than body text. 
> - the body text seems very challenging/manual to work with, perhaps some 
> utility functions would make this easier
>   - e.g. for my duplicate line command, i'll have repeat most of Thomas's 
> code above, there isn't a simple utility function
>   - there are already commands such as 'extend-to-line'/extendToLine, but 
> do I have access to these or do i have to reproduce them?
> - it would be nice to group these docs & content by context, e.g. the 
> guides with the examples
>
> Anyway, it's good to say hello again, glad to see things are still 
> plugging.
>
> Cheers & Happy 2023,
> Kevin
>
>
> On Wednesday, January 4, 2023 at 1:27:17 PM UTC-5 tbp1...@gmail.com wrote:
>
>> Let's add the scripting-miscellany link to Leo's Help menu.
>>
>> On Wednesday, January 4, 2023 at 11:32:09 AM UTC-5 Edward K. Ream wrote:
>>
>>> On Wednesday, January 4, 2023 at 10:18:53 AM UTC-6 Edward K. Ream wrote:
>>>
>>> > I've just added this entry 
>>> 
>>>  
>>> (online and in devel).
>>>
>>> And I've just updated this page 
>>>  in Leo's Reference 
>>> Guide.
>>>
>>> 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/22093325-71e3-49d1-a966-e13eee6d8803n%40googlegroups.com.


Re: Should leoeditor.com Be Moved To GitHub or Somewhere Else?

2023-01-10 Thread Thomas Passin
Don't worry, leoeditor.com is in the Wayback Machine 
 going back to 
2013 -



On Tuesday, January 10, 2023 at 5:48:12 PM UTC-5 Edward K. Ream wrote:

> On Tue, Jan 10, 2023 at 3:10 PM George Zipperlen  
> wrote:
>
>> I don't know how long I would count on whoever in the future owns github 
>> to continue hosting *.github.io when some future beancounter reassesses 
>> their margins.
>>
>
> I don't like to worry about things that *might* happen :-) For sure it's 
> time to move Leo's site away from Speed's server. 
>
> 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/5425a719-8664-4f0e-9d4f-7ef9f791c25bn%40googlegroups.com.


Cannot Start Leo When Enchant Speller Is Missing Libraries

2023-01-10 Thread Thomas Passin
I created a new virtual machine for a Linux distro new to me - Manjaro.  
Although pyenchant is installed, and the system's package manager claims 
that the Enchant libraries are installed, they aren't playing together.

I installed Leo but it won't start because pyenchant isn't working.  I 
don't think the error messages will be helpful, but here are the last few 
lines:

File "/home/tom/.local/lib/python3.10/site-packages/enchant/__init__.py", 
line 287, in _request_dict_data
self._raise_error(e_str % (tag,), DictNotFoundError)

  File "/home/tom/.local/lib/python3.10/site-packages/enchant/__init__.py", 
line 233, in _raise_error
raise eclass(default)

enchant.errors.DictNotFoundError: Dictionary for language 'en_US' could not 
be found
Please check https://pyenchant.github.io/pyenchant/ for details

I don't think that the problem is really that the en_US dictionary can't be 
found, because of other errors when I import pyenchant into a Python REPL 
session.  It imports but then can't actually run various functions.

I looked in the pyenchant web site, and found that it can be tricky to get 
the right version of the pyenchant working with the versions of the enchant 
binaries that  might have been compiled for your machine (especially on 
Windows, and yes, I know this case is Linux).

I can't find a setting to allow Leo to skip loading the spellchecker.  I 
have looked in LeoSettings.leo and myLeoSettings, and searched through 
pyLeoRef without hitting on one.  It seems to me that I remember such a 
setting, but I haven't been able to find it.

If there is not such a setting, I think there should be one.  It doesn't 
make sense for Leo to be unable to run because of a problem with the 
pyenchant system.

Does anyone have some insight here?

-- 
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/1c7d2a65-d8b2-4e04-9e80-cfc0eb155a48n%40googlegroups.com.


Re: Cannot Start Leo When Enchant Speller Is Missing Libraries

2023-01-10 Thread Thomas Passin
Of course, one solution is to uninstall pyenchant.  I did that and now Leo 
can run.  

On Tuesday, January 10, 2023 at 10:53:40 PM UTC-5 Thomas Passin wrote:

> I created a new virtual machine for a Linux distro new to me - Manjaro.  
> Although pyenchant is installed, and the system's package manager claims 
> that the Enchant libraries are installed, they aren't playing together.
>
> I installed Leo but it won't start because pyenchant isn't working.  I 
> don't think the error messages will be helpful, but here are the last few 
> lines:
>
> File "/home/tom/.local/lib/python3.10/site-packages/enchant/__init__.py", 
> line 287, in _request_dict_data
> self._raise_error(e_str % (tag,), DictNotFoundError)
>
>   File 
> "/home/tom/.local/lib/python3.10/site-packages/enchant/__init__.py", line 
> 233, in _raise_error
> raise eclass(default)
>
> enchant.errors.DictNotFoundError: Dictionary for language 'en_US' could 
> not be found
> Please check https://pyenchant.github.io/pyenchant/ for details
>
> I don't think that the problem is really that the en_US dictionary can't 
> be found, because of other errors when I import pyenchant into a Python 
> REPL session.  It imports but then can't actually run various functions.
>
> I looked in the pyenchant web site, and found that it can be tricky to get 
> the right version of the pyenchant working with the versions of the enchant 
> binaries that  might have been compiled for your machine (especially on 
> Windows, and yes, I know this case is Linux).
>
> I can't find a setting to allow Leo to skip loading the spellchecker.  I 
> have looked in LeoSettings.leo and myLeoSettings, and searched through 
> pyLeoRef without hitting on one.  It seems to me that I remember such a 
> setting, but I haven't been able to find it.
>
> If there is not such a setting, I think there should be one.  It doesn't 
> make sense for Leo to be unable to run because of a problem with the 
> pyenchant system.
>
> Does anyone have some insight here?
>

-- 
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/9c129fa3-3516-45e6-8bec-402078e8bba8n%40googlegroups.com.


Re: Cannot Start Leo When Enchant Speller Is Missing Libraries

2023-01-11 Thread Thomas Passin
No, unfortunately it didn't.  There is something else wrong in the 
pyenchant package or the enchant support libraries (both of which which are 
installed by the distro's package manager).

On Wednesday, January 11, 2023 at 4:49:25 AM UTC-5 lewis wrote:

> In leosettings.leo under Spell checking there is a node:
> @string enchant-language = en-US
>
> Does that help?
>
> On Wednesday, January 11, 2023 at 4:18:20 PM UTC+11 tbp1...@gmail.com 
> wrote:
>
>> Of course, one solution is to uninstall pyenchant.  I did that and now 
>> Leo can run.  
>>
>> On Tuesday, January 10, 2023 at 10:53:40 PM UTC-5 Thomas Passin wrote:
>>
>>> I created a new virtual machine for a Linux distro new to me - Manjaro.  
>>> Although pyenchant is installed, and the system's package manager claims 
>>> that the Enchant libraries are installed, they aren't playing together.
>>>
>>> I installed Leo but it won't start because pyenchant isn't working.  I 
>>> don't think the error messages will be helpful, but here are the last few 
>>> lines:
>>>
>>> File 
>>> "/home/tom/.local/lib/python3.10/site-packages/enchant/__init__.py", line 
>>> 287, in _request_dict_data
>>> self._raise_error(e_str % (tag,), DictNotFoundError)
>>>
>>>   File 
>>> "/home/tom/.local/lib/python3.10/site-packages/enchant/__init__.py", line 
>>> 233, in _raise_error
>>> raise eclass(default)
>>>
>>> enchant.errors.DictNotFoundError: Dictionary for language 'en_US' could 
>>> not be found
>>> Please check https://pyenchant.github.io/pyenchant/ for details
>>>
>>> I don't think that the problem is really that the en_US dictionary can't 
>>> be found, because of other errors when I import pyenchant into a Python 
>>> REPL session.  It imports but then can't actually run various functions.
>>>
>>> I looked in the pyenchant web site, and found that it can be tricky to 
>>> get the right version of the pyenchant working with the versions of the 
>>> enchant binaries that  might have been compiled for your machine 
>>> (especially on Windows, and yes, I know this case is Linux).
>>>
>>> I can't find a setting to allow Leo to skip loading the spellchecker.  I 
>>> have looked in LeoSettings.leo and myLeoSettings, and searched through 
>>> pyLeoRef without hitting on one.  It seems to me that I remember such a 
>>> setting, but I haven't been able to find it.
>>>
>>> If there is not such a setting, I think there should be one.  It doesn't 
>>> make sense for Leo to be unable to run because of a problem with the 
>>> pyenchant system.
>>>
>>> Does anyone have some insight here?
>>>
>>

-- 
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/2cd290a1-fe2f-4e47-99e9-1830528b85f0n%40googlegroups.com.


Re: Cannot Start Leo When Enchant Speller Is Missing Libraries

2023-01-11 Thread Thomas Passin
Thanks for the tip.  I'll see if it works out.  Still, I think Leo should 
not fail to load if the spell checker is not functional, and it looks like 
there's now a PR about that.

On Wednesday, January 11, 2023 at 8:55:14 AM UTC-5 gates...@gmail.com wrote:

> Some packagers of PyEnchant do not include any dictionary files.  The 
> PyEnchant documentation explains how to find one and install them: 
> https://pyenchant.github.io/pyenchant/install.html#installing-a-dictionary
>
> Try installing the package 'hunspell-en_US' (or the language of your 
> choice).  That *should* do the trick to get this working on Manjaro, as it 
> did on my Arch installs.
>
> Jake
>
> On Wed, Jan 11, 2023 at 8:47 AM Thomas Passin  wrote:
>
>> No, unfortunately it didn't.  There is something else wrong in the 
>> pyenchant package or the enchant support libraries (both of which which are 
>> installed by the distro's package manager).
>>
>> On Wednesday, January 11, 2023 at 4:49:25 AM UTC-5 lewis wrote:
>>
>>> In leosettings.leo under Spell checking there is a node:
>>> @string enchant-language = en-US
>>>
>>> Does that help?
>>>
>>> On Wednesday, January 11, 2023 at 4:18:20 PM UTC+11 tbp1...@gmail.com 
>>> wrote:
>>>
>>>> Of course, one solution is to uninstall pyenchant.  I did that and now 
>>>> Leo can run.  
>>>>
>>>> On Tuesday, January 10, 2023 at 10:53:40 PM UTC-5 Thomas Passin wrote:
>>>>
>>>>> I created a new virtual machine for a Linux distro new to me - 
>>>>> Manjaro.  Although pyenchant is installed, and the system's package 
>>>>> manager 
>>>>> claims that the Enchant libraries are installed, they aren't playing 
>>>>> together.
>>>>>
>>>>> I installed Leo but it won't start because pyenchant isn't working.  I 
>>>>> don't think the error messages will be helpful, but here are the last few 
>>>>> lines:
>>>>>
>>>>> File 
>>>>> "/home/tom/.local/lib/python3.10/site-packages/enchant/__init__.py", line 
>>>>> 287, in _request_dict_data
>>>>> self._raise_error(e_str % (tag,), DictNotFoundError)
>>>>>
>>>>>   File 
>>>>> "/home/tom/.local/lib/python3.10/site-packages/enchant/__init__.py", line 
>>>>> 233, in _raise_error
>>>>> raise eclass(default)
>>>>>
>>>>> enchant.errors.DictNotFoundError: Dictionary for language 'en_US' 
>>>>> could not be found
>>>>> Please check https://pyenchant.github.io/pyenchant/ for details
>>>>>
>>>>> I don't think that the problem is really that the en_US dictionary 
>>>>> can't be found, because of other errors when I import pyenchant into a 
>>>>> Python REPL session.  It imports but then can't actually run various 
>>>>> functions.
>>>>>
>>>>> I looked in the pyenchant web site, and found that it can be tricky to 
>>>>> get the right version of the pyenchant working with the versions of the 
>>>>> enchant binaries that  might have been compiled for your machine 
>>>>> (especially on Windows, and yes, I know this case is Linux).
>>>>>
>>>>> I can't find a setting to allow Leo to skip loading the spellchecker.  
>>>>> I have looked in LeoSettings.leo and myLeoSettings, and searched through 
>>>>> pyLeoRef without hitting on one.  It seems to me that I remember such a 
>>>>> setting, but I haven't been able to find it.
>>>>>
>>>>> If there is not such a setting, I think there should be one.  It 
>>>>> doesn't make sense for Leo to be unable to run because of a problem with 
>>>>> the pyenchant system.
>>>>>
>>>>> Does anyone have some insight here?
>>>>>
>>>> -- 
>> 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/2cd290a1-fe2f-4e47-99e9-1830528b85f0n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/leo-editor/2cd290a1-fe2f-4e47-99e9-1830528b85f0n%40googlegroups.com?utm_medium=email&utm_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/1d6de462-3da4-450f-8281-263b56d242b4n%40googlegroups.com.


Re: Cannot Start Leo When Enchant Speller Is Missing Libraries

2023-01-11 Thread Thomas Passin
Don't know yet. I don't have a git clone on the VM in question, I just spun 
it up and it needs some more provisioning.  

On Wednesday, January 11, 2023 at 9:54:21 AM UTC-5 Edward K. Ream wrote:

>
>
> On Wed, Jan 11, 2023 at 8:35 AM Thomas Passin  wrote:
>
>> ...it looks like there's now a PR about that.
>>
>
> The PR has been merged into devel. Did the PR help?
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/624a2212-3fc2-4e7d-8f5c-d65a71920c29n%40googlegroups.com.


Re: Please help me edit Leo's wikipedia page

2023-01-11 Thread Thomas Passin
" Well, this is a bizarre new policy."  I don't think it's that new.  
Wikipedia has been trying hard to prevent misrepresentation by interested 
parties who want to make themselves look good, or others to look bad. So 
you often can't fix errors about yourself even if you know for sure they 
are wrong.  We'll be lucky if they accept the changes without a published 
authority somewhere.

On Wednesday, January 11, 2023 at 10:04:42 AM UTC-5 Edward K. Ream wrote:

> On Wed, Jan 11, 2023 at 7:23 AM Jacob Peck  wrote:
>
>> Changed.
>>
>
> Great. Thanks!
>  
>
>> Good luck negotiating with the WikiMedia folks, they have a fairly 
>> hardline stance on things.
>>
>
> I received this response:
>
> QQQ
>  explains why using 
> a VPN is a problem. As an established editor you can request an exemption. <
> https://en.wikipedia.org/wiki/WP:IPBE>
>
> Your email signature reveals that you have a conflict of interest with 
> respect to the article and should not be editing it directly. 
> QQQ
>
> Well, this is a bizarre new policy.
>
> Jacob, would you be willing to make these changes?
>
> - Stable Release: refer readers to Leo's home page rather than mentioning 
> a version number.
>   This will eliminate one to-do item when publishing a new release.
>   And it means I won't ever have to edit Leo's wikipedia page.
>
> - Add a link to leoJS: https://github.com/boltex/leojs
>
> 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/04acf556-b3c6-4c10-8c0d-2de6e6f84b3en%40googlegroups.com.


Re: Cannot Start Leo When Enchant Speller Is Missing Libraries

2023-01-11 Thread Thomas Passin
Yes, the PR did its job and Leo can start.  And I finally solved the 
problem of the missing en_US dictionary.  It turns out that on Manjaro, you 
have to open the Settings applet, then the Manjaro Settings Manager, then 
double-click on Language Packages, and then finally you can install the 
dictionary.  After all that, Leo's spell checker is working.

On Wednesday, January 11, 2023 at 10:22:23 AM UTC-5 Thomas Passin wrote:

> Don't know yet. I don't have a git clone on the VM in question, I just 
> spun it up and it needs some more provisioning.  
>
> On Wednesday, January 11, 2023 at 9:54:21 AM UTC-5 Edward K. Ream wrote:
>
>>
>>
>> On Wed, Jan 11, 2023 at 8:35 AM Thomas Passin  wrote:
>>
>>> ...it looks like there's now a PR about that.
>>>
>>
>> The PR has been merged into devel. Did the PR help?
>>
>> Edward
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ee53a62f-70e2-498a-a574-792fbf36f955n%40googlegroups.com.


Viewrendered3 plugin may not render nodes for some linux distros

2023-01-12 Thread Thomas Passin
I have been spinning up several new Linux virtual machines, and I 
discovered that VR3 isn't rendering visibly.  It's still working, since you 
can export the rendering to the browser, but nothing is painted on the VR3 
panel.

All these VMs use a recent version of Python3 with PyQt5.  The PyQt5 and 
pyqt5-webengine versions agree with earlier VMs where VR3 is rendering 
normally, but I suspect there's something wrong with these binaries anyway.

Where available, I upgraded to pyqt6 and PyQt6-WebEngine-Qt6, and after the 
upgrade VR3 is rendering normally.

-- 
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/e654c666-b060-4d83-9f4e-9f16f9f43c45n%40googlegroups.com.


Re: Viewrendered3 plugin may not render nodes for some linux distros

2023-01-12 Thread Thomas Passin
To be more specific, here's what I've installed that work -

PyQt6 6.4.0
PyQt6-Qt6 6.4.2
PyQt6-sip 13.4.0
PyQt6-WebEngine   6.4.0
PyQt6-WebEngine-Qt6   6.4.2

The packages you need to install are 

PyQt6 6.4.0
PyQt6-WebEngine

And possibly PyQt6-WebEngine-Qt6 if it didn't get installed by the previous 
packages.
On Thursday, January 12, 2023 at 11:27:09 PM UTC-5 Thomas Passin wrote:

> I have been spinning up several new Linux virtual machines, and I 
> discovered that VR3 isn't rendering visibly.  It's still working, since you 
> can export the rendering to the browser, but nothing is painted on the VR3 
> panel.
>
> All these VMs use a recent version of Python3 with PyQt5.  The PyQt5 and 
> pyqt5-webengine versions agree with earlier VMs where VR3 is rendering 
> normally, but I suspect there's something wrong with these binaries anyway.
>
> Where available, I upgraded to pyqt6 and PyQt6-WebEngine-Qt6, and after 
> the upgrade VR3 is rendering normally.
>

-- 
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/7eaec6be-9201-4c24-8585-e79eb4e1eeb3n%40googlegroups.com.


Re: Please help me edit Leo's wikipedia page

2023-01-15 Thread Thomas Passin
Dreamstime has a page on license terms, and it has this section  that seems 
as if it might apply -

"Limited Royalty Free Licenses (RF-LL) for using Media downloaded within 
the Free section of the website

Dreamstime offers a free section, fully searchable and constantly updated. 
Its use may be available to all registered users or to a specific niche of 
members, depending on the agency`s strategy. The Media downloaded from the free 
section  may be used under the 
terms mentioned for the regular Royalty Free license, with additional 
restrictions: the maximum amount of physical copies in any form is limited 
to 10,000 copies and the license granted is valid for 6 (six) months after 
the initial download for unsubscribed members or 6 (six) months after your 
Dreamstime download subscription ends. If you exceed the 10,000 print 
amount and you already purchased credits or a commercial subscription you 
may re-download the Media under the regular RF license."
In the section on the "Regular Royality Free license:

"For Web use, you must not use the Media at a width exceeding 1080 pixels 
unless it is included in your site`s design."

The actual image is labeled "ROYALTY-FREE STOCK PHOTO"  It does include a 
watermark.  However, the terms of use page also says:

"The Royalty-Free license is granted ONLY for the non-watermarked Media you 
buy using the Download button; all the other versions (small watermarked 
and non-watermarked thumbnails which are visible on the public site) are 
entirely copyrighted."

The image in question is a small watermarked version, I can't figure out 
how that fits in.
On Sunday, January 15, 2023 at 7:27:43 PM UTC-5 gates...@gmail.com wrote:

> Searching this group for 'Dreamstime' brings up conversations in 2013 and 
> 2014 about this logo.  "Royalty free" doesn't indicate free use -- it 
> indicates that the image is able to be used without royalties, once a 
> proper license has been purchased.  I imagine that would entail a 
> Dreamstime subscription, or a one-time purchase.
>
> Jake
>
> On Sun, Jan 15, 2023 at 7:24 PM Jacob Peck  wrote:
>
>> It appears the original is from Dreamstime: 
>> https://www.dreamstime.com/royalty-free-stock-photos-tribal-lion-image3490018
>>
>> They've changed their watermark in the interim -- the new watermark has 
>> the spiral still, but smaller.  It also appears the original had red eyes, 
>> which were probably edited out in the current Leo splash screen.
>>
>> IIRC this image used to cost money -- I don't know what the 'Free 
>> Download' entitles one to legally, but this image is clearly under some 
>> sort of license that it's probably wise to look into in some way :)
>>
>> Jake
>>
>>
>> On Sun, Jan 15, 2023 at 7:12 PM Edward K. Ream  wrote:
>>
>>> On Sun, Jan 15, 2023 at 5:08 PM jkn  wrote:
>>>
>>> FWIW, it has always seemed slightly shady to me that the Leo 
 'splashscreen.xxx" graphic,
 both on Leo's startup itself and now on the Wikipedia page, has some 
 sort of watermark on it.

>>>
>>> I never noticed this before, but I do see it.
>>>
 I always thought it was a light grey '(c)' mark, but having looked 
 harder
 I now think it is a coarse spiral.

>>>
>>> I agree. It doesn't seem to be any kind of copyright symbol.
>>>
>>> It seems to me that this mark was intended
 to prevent use elsewhere; I think the copyright of that image, and the 
 license to copy
 and distribute it, should be checked.

>>>
>>> I don't remember where I got this image. I don't think it was 
>>> copyrighted, and I don't think it's worth worrying about.
>>>
>>> Let me know if you discover if it definitely *is* copyrighted :-)
>>>
>>> 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+...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/leo-editor/CAMF8tS326CEe593Lqak63ih1828LOBaYjafVTii-WYLpeMNmPw%40mail.gmail.com
>>>  
>>> 
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/6f6f17cd-dc81-400c-904f-d0b468a36c2dn%40googlegroups.com.


Re: Please help me edit Leo's wikipedia page

2023-01-16 Thread Thomas Passin
If you had, it would have been pixelated to hell and gone. 

On Monday, January 16, 2023 at 6:58:05 PM UTC-5 Edward K. Ream wrote:

> On Mon, Jan 16, 2023 at 4:08 PM jkn wrote:
>
> BTW if it turns out it's a matter of $10 i am happy to pay for it as a 
>> thanks for Leo ;-)
>>
>
> Thanks!
>
> also FWIW: The leonine image seems a whisker off-vertical to me: looking 
>> at the Lion's face it is turned a
>> few degrees anti-(counter-)clockwise. Is this deliberate, I wonder?
>>
>
> I never noticed this before, but I do see the rotation now. I'm sure I 
> didn't rotate the image.
>
> 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/b60cc118-814c-4e96-94c6-f43a7ac2adcan%40googlegroups.com.


Re: Curious to know if any Leonistas tried out ChatGPT?

2023-01-17 Thread Thomas Passin
Now try it again with the beautifier ( PR #3057 
) you just worked on...

On Tuesday, January 17, 2023 at 6:25:11 AM UTC-5 Edward K. Ream wrote:

> On Monday, January 16, 2023 at 1:51:34 AM UTC-6 Edward K. Ream wrote:
>
> I tried the following two queries and got reasonable results:
>
> I used ChatGPT (for real) to update picture_viewer.py.
>
> The query was something like `write a python script to copy a file from 
> one folder to another`.
>
> The result involved `shutil` and was better than I would have written! The 
> comments and examples were excellent.
>
> No wonder google is worried about competition.
>
> 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/dde5b2be-cd77-42ed-9409-b7d47dcf5026n%40googlegroups.com.


Re: Curious to know if any Leonistas tried out ChatGPT?

2023-01-17 Thread Thomas Passin
I haven't been able to open the chatGPT page in two different browsers:

ERR_TOO_MANY_REDIRECTS

How are others managing to do it?  I hope not needing to use AI...

-- 
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/ff3af3d1-3ebd-4eff-9fe9-f996883fb239n%40googlegroups.com.


Re: Please help me edit Leo's wikipedia page

2023-01-18 Thread Thomas Passin
I'd be willing to contribute some funds if need be.

BTW, the Wikipedia entry now reads in part:

" The GUI uses the Qt toolkit; the syntax-aware editor is based on Scintilla
."

In what way is the editor now based on Scintilla?

On Wednesday, January 18, 2023 at 7:20:48 AM UTC-5 Edward K. Ream wrote:

> On Monday, January 16, 2023 at 4:22:59 PM UTC-6 jkn wrote:
> """
> Thank you for contacting us. Please reply to this email string and provide 
> the ID number of the image in question, as well as a detailed description 
> of exactly how the image is used within the app.
> """
> Do you want me to carry on ... ?
>
> What have you done so far? 
>
> In a reply I did say to carry on, but I want to buy the image myself. See 
> this 
> discussion 
> .
>
> 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/be8cbb12-36cc-4fc5-bebb-acd2b024673dn%40googlegroups.com.


New Fast Python Memory Profiler

2023-01-19 Thread Thomas Passin
Maybe of interest to some devs, Scalene, a newish Python memory profiler, 
was mentioned in a message on the *python-list* discussion list.

Scalene 

>From the GitHub readme:

"Scalene is a high-performance CPU, GPU *and* memory profiler for Python 
that does a number of things that other Python profilers do not and cannot 
do. It runs orders of magnitude faster than many other profilers while 
delivering far more detailed information. It is also the first profiler 
ever to incorporate AI-powered proposed optimizations."

-- 
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/aa81c2ee-a1c9-47ec-a830-de704dfdc61fn%40googlegroups.com.


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