Re: newbie stuck

2022-09-01 Thread tbp1...@gmail.com
Sometimes I can get Groups to show the full address, but usually not when I 
really want to.  My gmail address, if Groups doesn't obfuscate it, is

tbp100...@gmail.com

I hardly ever remember to look at it, as it's not the address I want to use 
for most of my correspondence, but I'll be looking now.

As for the OPML plugin, I don't know what the author's concept of 
operations was, but for round-tripping OPML files it has at least two 
problems:

1. It didn't import the second column (body text) from your 2nd example 
file;
2. The write command writes a *Leo* file with an "OPML" extension, *not* an 
OPML file.  This file can't be even be reused by Leo unless the extension 
were changed to ".leo".

Actually there is another thing wrong with it.  It isn't very Leonine.  The 
example OPML file opened with all the top-level nodes at the top level in 
the outline.  That means you could not have more than one OPML file per Leo 
outline.  But to get the most out of Leo, you should be able to have any 
number of OPML files in one outline (probably but not necessarily related.  
The OPML files could be organized into subtrees that make sense to you.  
The typical Leo-like way to do this is to have the OPML file's 
representation in Leo start with a node whose headline starts with *@opml 
path-to-file*.  There would be a command that - when you selected a node in 
that file's subtree - would write the OPML file for that entire file.

Anyway, send me your email address, and we'll go on from there.

On Thursday, September 1, 2022 at 6:44:35 AM UTC-4 chr...@gmail.com wrote:

> OK, but all I can see here is  tbp1...@gmail.com 
>
> On Thursday, September 1, 2022 at 1:33:56 AM UTC+2 tbp1...@gmail.com 
> wrote:
>
>> I've done some Leo development, both plugins and internals.  I'm not very 
>> familiar with most of Leo and not at all with this plugin.  If you can get 
>> an email to me at my gmail address, I'll send you the email I actually want 
>> to use, and maybe we can make some progress.
>>
>> On Wednesday, August 31, 2022 at 5:52:38 PM UTC-4 chr...@gmail.com wrote:
>>
>>> tbp1...@gmail.com <https://groups.google.com/>, I don't know if you are 
>>> a developer or member of the Leo team, so I'm not sure if the info I'm 
>>> sending is useful, please let me know. 
>>>
>>> You may already know about this, but there are two leoOPML.py settings 
>>> that were implemented for the integration of body text into the OPML file:
>>> @bool opml_use_outline_elements = True
>>> @bool opml_write_body_text = True
>>>
>>> and the one about writing  elements (why? I know nothing about vnodes 
>>> etc., but I suppose they're useless outside of Leo, so they have no place 
>>> in OPML)
>>> @bool opml_write_leo_globals_attributes = False
>>>
>>> It seems no XML schema or DTD means anything goes with the names of 
>>> attributes in OPML. One of the outliners I tried offered the possibility of 
>>> changing the name of the first outline attribute  in its .ini file for OPML 
>>> import/export. I found this clever.
>>> OmniOutliner Pro follows the spec 2.0 for the first attribute, calling 
>>> it "text", and then it's the names of columns for further attributes.  
>>> leoOPML currently would uses  for the body text, apparently. I 
>>> suppose accepting anything that comes in for that "body text" second 
>>> attribute during import and keeping it for export would be a good idea. If 
>>> the file is first exported by Leo, then of course  is fine. 
>>> Additional @settings could be used to clarify this, or maybe not. I hope 
>>> I'm not making a fool of myself here...
>>>
>>>
>>> On Wednesday, August 31, 2022 at 5:06:53 PM UTC+2 tbp1...@gmail.com 
>>> wrote:
>>>
>>>> Here is Dave (Winer)'s spec <http://opml.org/spec2.opml>.  I would 
>>>> think that there would be an XML schema (or maybe a DTD would be able to 
>>>> the the joib) somewhere that could be used for validating an OPML file, 
>>>> but 
>>>> I didn't find one in a very hasty search.
>>>>
>>>> Since OPML only includes what Leo calls headline text, I'm wondering if 
>>>> there would ever be any use for text in (Leo) node bodies.  An OPML 
>>>> outline 
>>>> node can contain other information besides the headline text, so maybe 
>>>> that's why the plugin may deal with Leo's user attributes - the info has 
>>>> to 
>>>> go somewhere.  
>>>>
>>>> Is it the case, @chr, that you want to round-trip OPM

Re: Leo 6.6.4 will be the last release that supports python versions less than 3.9

2022-09-01 Thread tbp1...@gmail.com
The mystery is solved and all is well (no error messages).  Turns out I 
accidentally started my main Leo session from the Python install library 
instead of from my git clone.  Then I opened LeoPyRef.leo.  It was open 
when I closed Leo, so the next time I started Leo - from the git clone as 
intended - it re-opened all the previously open outlines.  Except that the 
open LeoPyRef outline was still the one from the Python install tree, not 
the git clone.  But of course, since I had opened the clone, I expected the 
outline to be the one in the clone tree.  Talk about cognitive dissonance!

It took way too long for me to notice that the wrong outline was getting 
opened on every launch.  I could have found out from the title bar of Leo's 
window, but how often do you actually read that?

On Wednesday, August 31, 2022 at 11:47:58 PM UTC-4 tbp1...@gmail.com wrote:

> Funny, I just launched another session and got the branch/changeset 
> numbers.  I still get those wrong file paths, though.  I start Leo with 
> python3 
> -m leo.core.runLeo.
>
> On Wednesday, August 31, 2022 at 11:40:54 PM UTC-4 Edward K. Ream wrote:
>
>> On Wed, Aug 31, 2022 at 10:30 PM tbp1...@gmail.com  
>> wrote:
>>
>>> I'm seeing the following error messages in the console today, after 
>>> updating devel from GitHub:
>>
>>
>> Hmm. Not sure why you are having problems. I just did the following as a 
>> test:
>>
>> git clone https://github.com/leo-editor/leo-editor.git leo-editor-test
>> cd leo-editor-test
>> python launchLeo.py
>>
>> All seems well.  I suggest you reinstall Leo using git clone into a new 
>> leo-editor folder:
>>
>> git clone https://github.com/leo-editor/leo-editor.git 
>>
>> 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/219eb485-cb0f-4a96-9e0d-3b5f61ec2593n%40googlegroups.com.


Re: Leo 6.6.4 will be the last release that supports python versions less than 3.9

2022-08-31 Thread tbp1...@gmail.com
Funny, I just launched another session and got the branch/changeset 
numbers.  I still get those wrong file paths, though.  I start Leo with python3 
-m leo.core.runLeo.

On Wednesday, August 31, 2022 at 11:40:54 PM UTC-4 Edward K. Ream wrote:

> On Wed, Aug 31, 2022 at 10:30 PM tbp1...@gmail.com  
> wrote:
>
>> I'm seeing the following error messages in the console today, after 
>> updating devel from GitHub:
>
>
> Hmm. Not sure why you are having problems. I just did the following as a 
> test:
>
> git clone https://github.com/leo-editor/leo-editor.git leo-editor-test
> cd leo-editor-test
> python launchLeo.py
>
> All seems well.  I suggest you reinstall Leo using git clone into a new 
> leo-editor folder:
>
> git clone https://github.com/leo-editor/leo-editor.git 
>
> 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/3a2f5d5b-27a0-4f3d-be2d-b201cd498cc2n%40googlegroups.com.


Re: Leo 6.6.4 will be the last release that supports python versions less than 3.9

2022-08-31 Thread tbp1...@gmail.com
I'm seeing the following error messages in the console today, after 
updating devel from GitHub:

file not found: 
C:/Users/tom/AppData/Roaming/Python/Python310/site-packages/.mypy.ini
file not found: 
C:/Users/tom/AppData/Roaming/Python/Python310/site-packages/launchLeo.py
can not open 
C:/Users/tom/AppData/Roaming/Python/Python310/site-packages/leo_to_html.xsl
can not open 
C:/Users/tom/AppData/Roaming/Python/Python310/site-packages/run_pytest_tests.py
can not open 
C:/Users/tom/AppData/Roaming/Python/Python310/site-packages/run_travis_unit_tests.py

Those files do not exist in 
*C:/Users/tom/AppData/Roaming/Python/Python310/site-packages/*, and they 
don't seem like the kind of files that ought to be there.  My Leo directory 
tree is actually in *C:\Tom\git\leo-editor*. So Leo is looking in the wrong 
location.

Version info:
Leo 6.6.3
Python 3.10.4, PyQt version 5.15.2
Windows 10 AMD64 (build 10.0.19043) SP0

Also, I notice that the usual branch/build items are not included in the 
version info, which they used to be.
On Tuesday, August 30, 2022 at 11:32:14 AM UTC-4 Edward K. Ream wrote:

> It's time to pull the plugin on ancient Python releases:
>
> - Leo's support for Python 3.6, 3.7, and 3.8 is limited and buggy.
> - Support for Python 3.6 is hindering full annotations. 
> - Earlier Python releases are now security risks.
> - Binary installer exist for Windows, Ubuntu and MacOs.
>   Just now it took me about 5 minutes to install Python 3.10 on Ubuntu.
>
> 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/6c719f7c-e6c4-4392-9167-a7a67b87ab3fn%40googlegroups.com.


Re: newbie stuck

2022-08-31 Thread tbp1...@gmail.com
I've done some Leo development, both plugins and internals.  I'm not very 
familiar with most of Leo and not at all with this plugin.  If you can get 
an email to me at my gmail address, I'll send you the email I actually want 
to use, and maybe we can make some progress.

On Wednesday, August 31, 2022 at 5:52:38 PM UTC-4 chr...@gmail.com wrote:

> tbp1...@gmail.com <https://groups.google.com/>, I don't know if you are a 
> developer or member of the Leo team, so I'm not sure if the info I'm 
> sending is useful, please let me know. 
>
> You may already know about this, but there are two leoOPML.py settings 
> that were implemented for the integration of body text into the OPML file:
> @bool opml_use_outline_elements = True
> @bool opml_write_body_text = True
>
> and the one about writing  elements (why? I know nothing about vnodes 
> etc., but I suppose they're useless outside of Leo, so they have no place 
> in OPML)
> @bool opml_write_leo_globals_attributes = False
>
> It seems no XML schema or DTD means anything goes with the names of 
> attributes in OPML. One of the outliners I tried offered the possibility of 
> changing the name of the first outline attribute  in its .ini file for OPML 
> import/export. I found this clever.
> OmniOutliner Pro follows the spec 2.0 for the first attribute, calling it 
> "text", and then it's the names of columns for further attributes.  leoOPML 
> currently would uses  for the body text, apparently. I suppose 
> accepting anything that comes in for that "body text" second attribute 
> during import and keeping it for export would be a good idea. If the file 
> is first exported by Leo, then of course  is fine. Additional 
> @settings could be used to clarify this, or maybe not. I hope I'm not 
> making a fool of myself here...
>
>
> On Wednesday, August 31, 2022 at 5:06:53 PM UTC+2 tbp1...@gmail.com wrote:
>
>> Here is Dave (Winer)'s spec <http://opml.org/spec2.opml>.  I would think 
>> that there would be an XML schema (or maybe a DTD would be able to the the 
>> joib) somewhere that could be used for validating an OPML file, but I 
>> didn't find one in a very hasty search.
>>
>> Since OPML only includes what Leo calls headline text, I'm wondering if 
>> there would ever be any use for text in (Leo) node bodies.  An OPML outline 
>> node can contain other information besides the headline text, so maybe 
>> that's why the plugin may deal with Leo's user attributes - the info has to 
>> go somewhere.  
>>
>> Is it the case, @chr, that you want to round-trip OPML files with other 
>> applications with full fidelity (except maybe data about an editor's 
>> state)?  Or do you only need to include a subset of information?
>>
>>
>>
>> On Wednesday, August 31, 2022 at 10:13:37 AM UTC-4 chr...@gmail.com 
>> wrote:
>>
>>> I found only one public one at http://validator.opml.org/ (website and 
>>> validator by Dave Winer, the original OPML guy, still at the wheel), but it 
>>> doesn't seem to work so well.
>>> I submitted an issue at 
>>> https://github.com/scripting/opml.org/issues/6#issue-1357384900
>>>
>>>
>>> On Tuesday, August 30, 2022 at 6:18:50 PM UTC+2 tbp1...@gmail.com wrote:
>>>
>>>> Shouldn't be hard to adjust the output format, I would think (not 
>>>> knowing anything about the actual plugin).  Do you know of an OPML 
>>>> validator so potential fixes could be tested?
>>>>
>>>> On Tuesday, August 30, 2022 at 12:11:37 PM UTC-4 chr...@gmail.com 
>>>> wrote:
>>>>
>>>>> That's what I did, and the resulting file was not OPML. Check my 
>>>>> previous message: 
>>>>> https://groups.google.com/g/leo-editor/c/bV98DK9QtPI/m/m7bLQioQCgAJ
>>>>>
>>>>> On Tuesday, August 30, 2022 at 5:07:08 AM UTC+2 tbp1...@gmail.com 
>>>>> wrote:
>>>>>
>>>>>> Without knowing anything about the plugin, it looks like the 
>>>>>> signature of fc.write_leo_file() is currently not the signature the 
>>>>>> plugin thinks it is.  I'd try commenting out the extra params in the 
>>>>>> plugin, and see what what you get:
>>>>>>
>>>>>> ok = self.c.fileCommands.write_Leo_file(
>>>>>> fileName#,
>>>>>> #outlineOnlyFlag=not self.opml_write_derived_files,
>>>>>> #toString=False, toOPML=True
>>>>>> )
>>>>>>  
>>>>>> You would have to restart Le

Re: newbie stuck

2022-08-31 Thread tbp1...@gmail.com
Here is Dave (Winer)'s spec <http://opml.org/spec2.opml>.  I would think 
that there would be an XML schema (or maybe a DTD would be able to the the 
joib) somewhere that could be used for validating an OPML file, but I 
didn't find one in a very hasty search.

Since OPML only includes what Leo calls headline text, I'm wondering if 
there would ever be any use for text in (Leo) node bodies.  An OPML outline 
node can contain other information besides the headline text, so maybe 
that's why the plugin may deal with Leo's user attributes - the info has to 
go somewhere.  

Is it the case, @chr, that you want to round-trip OPML files with other 
applications with full fidelity (except maybe data about an editor's 
state)?  Or do you only need to include a subset of information?



On Wednesday, August 31, 2022 at 10:13:37 AM UTC-4 chr...@gmail.com wrote:

> I found only one public one at http://validator.opml.org/ (website and 
> validator by Dave Winer, the original OPML guy, still at the wheel), but it 
> doesn't seem to work so well.
> I submitted an issue at 
> https://github.com/scripting/opml.org/issues/6#issue-1357384900
>
>
> On Tuesday, August 30, 2022 at 6:18:50 PM UTC+2 tbp1...@gmail.com wrote:
>
>> Shouldn't be hard to adjust the output format, I would think (not knowing 
>> anything about the actual plugin).  Do you know of an OPML validator so 
>> potential fixes could be tested?
>>
>> On Tuesday, August 30, 2022 at 12:11:37 PM UTC-4 chr...@gmail.com wrote:
>>
>>> That's what I did, and the resulting file was not OPML. Check my 
>>> previous message: 
>>> https://groups.google.com/g/leo-editor/c/bV98DK9QtPI/m/m7bLQioQCgAJ
>>>
>>> On Tuesday, August 30, 2022 at 5:07:08 AM UTC+2 tbp1...@gmail.com wrote:
>>>
>>>> Without knowing anything about the plugin, it looks like the signature 
>>>> of fc.write_leo_file() is currently not the signature the plugin 
>>>> thinks it is.  I'd try commenting out the extra params in the plugin, and 
>>>> see what what you get:
>>>>
>>>> ok = self.c.fileCommands.write_Leo_file(
>>>> fileName#,
>>>> #outlineOnlyFlag=not self.opml_write_derived_files,
>>>> #toString=False, toOPML=True
>>>> )
>>>>  
>>>> You would have to restart Leo, or run a new Leo session, to try the 
>>>> changes out.
>>>> On Monday, August 29, 2022 at 6:15:29 PM UTC-4 chr...@gmail.com wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> If you want you can skip to "*Problem*" below.
>>>>>
>>>>> I'm new to Leo  but not to Python, and not to the world. For 30 years, 
>>>>> I've been trying to recapture the magic of MORE (and ThinkTank...) , but 
>>>>> on 
>>>>> Windows (had to switch in 1989, never used a Mac since).  No way. 
>>>>> Recently 
>>>>> got fed up, got a Mac Mini M1, an iPhone and iPad, bought OmniOutliner,  
>>>>> but I now only use it on IOS to exchange OPML files with Windows because 
>>>>> _BREVITYALERT_.  Even though I got to a decent level in Python, I never 
>>>>> tried LEO because  _BREVITYALERT_
>>>>>
>>>>> But THIS IS THE ONE. Wow!
>>>>>
>>>>> *Problem*
>>>>> Of course, my first message is also about a problem. I'm pretty sure I 
>>>>> got the leoOPML.py plugin configuration right (file, tree, directives, 
>>>>> body 
>>>>> panel), but when I type *write-opml-file* in the mini-buffer (and by 
>>>>> the way this procedure seems to be nowhere on leoeditor.com or 
>>>>> davy39.github.io/leo-editor/apidoc/leo.plugins.html. Thanks, Google), 
>>>>> I get this:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *Traceback (most recent call last):  File 
>>>>> "C:\Python310\lib\site-packages\leo\core\leoKeys.py", line 2521, in 
>>>>> callAltXFunctionfunc(event)  File 
>>>>> "C:\Python310\lib\site-packages\leo\plugins\leoOPML.py", line 346, in 
>>>>> writeOpmlCommandc.opmlCommands.writeFile(fileName)  File 
>>>>> "C:\Python310\lib\site-packages\leo\plugins\leoOPML.py", line 319, in 
>>>>> writeFileok = self.c.fileCommands.write_Leo_file(TypeError: 
>>>>> FileCommands.write_Leo_file() got an unexpected keyword argument 
>>>>> 'outlineOnlyFlag'*
>>>>>  everytime, either with my own narrow set of parameter plugins or with 
>>>>> the one in leosettings.leo.
>>>>>
>>>>> I went through the plugin code, tried to remove line 321, but then 
>>>>> *Tostring=False*  became unexpected too. Then I tried to learn about 
>>>>> *c.filecommands*, but I thought it better to join the group and write 
>>>>> this. 
>>>>> ???
>>>>>
>>>>> Thanks in advance for help,
>>>>>
>>>>> Chris
>>>>>
>>>>

-- 
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/290fda64-c086-428c-81a3-309a2aa9b28dn%40googlegroups.com.


Re: newbie stuck

2022-08-30 Thread tbp1...@gmail.com
Shouldn't be hard to adjust the output format, I would think (not knowing 
anything about the actual plugin).  Do you know of an OPML validator so 
potential fixes could be tested?

On Tuesday, August 30, 2022 at 12:11:37 PM UTC-4 chr...@gmail.com wrote:

> That's what I did, and the resulting file was not OPML. Check my previous 
> message: 
> https://groups.google.com/g/leo-editor/c/bV98DK9QtPI/m/m7bLQioQCgAJ
>
> On Tuesday, August 30, 2022 at 5:07:08 AM UTC+2 tbp1...@gmail.com wrote:
>
>> Without knowing anything about the plugin, it looks like the signature of 
>> fc.write_leo_file() is currently not the signature the plugin thinks it 
>> is.  I'd try commenting out the extra params in the plugin, and see what 
>> what you get:
>>
>> ok = self.c.fileCommands.write_Leo_file(
>> fileName#,
>> #outlineOnlyFlag=not self.opml_write_derived_files,
>> #toString=False, toOPML=True
>> )
>>  
>> You would have to restart Leo, or run a new Leo session, to try the 
>> changes out.
>> On Monday, August 29, 2022 at 6:15:29 PM UTC-4 chr...@gmail.com wrote:
>>
>>> Hi,
>>>
>>> If you want you can skip to "*Problem*" below.
>>>
>>> I'm new to Leo  but not to Python, and not to the world. For 30 years, 
>>> I've been trying to recapture the magic of MORE (and ThinkTank...) , but on 
>>> Windows (had to switch in 1989, never used a Mac since).  No way. Recently 
>>> got fed up, got a Mac Mini M1, an iPhone and iPad, bought OmniOutliner,  
>>> but I now only use it on IOS to exchange OPML files with Windows because 
>>> _BREVITYALERT_.  Even though I got to a decent level in Python, I never 
>>> tried LEO because  _BREVITYALERT_
>>>
>>> But THIS IS THE ONE. Wow!
>>>
>>> *Problem*
>>> Of course, my first message is also about a problem. I'm pretty sure I 
>>> got the leoOPML.py plugin configuration right (file, tree, directives, body 
>>> panel), but when I type *write-opml-file* in the mini-buffer (and by 
>>> the way this procedure seems to be nowhere on leoeditor.com or 
>>> davy39.github.io/leo-editor/apidoc/leo.plugins.html. Thanks, Google), 
>>> I get this:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *Traceback (most recent call last):  File 
>>> "C:\Python310\lib\site-packages\leo\core\leoKeys.py", line 2521, in 
>>> callAltXFunctionfunc(event)  File 
>>> "C:\Python310\lib\site-packages\leo\plugins\leoOPML.py", line 346, in 
>>> writeOpmlCommandc.opmlCommands.writeFile(fileName)  File 
>>> "C:\Python310\lib\site-packages\leo\plugins\leoOPML.py", line 319, in 
>>> writeFileok = self.c.fileCommands.write_Leo_file(TypeError: 
>>> FileCommands.write_Leo_file() got an unexpected keyword argument 
>>> 'outlineOnlyFlag'*
>>>  everytime, either with my own narrow set of parameter plugins or with 
>>> the one in leosettings.leo.
>>>
>>> I went through the plugin code, tried to remove line 321, but then 
>>> *Tostring=False*  became unexpected too. Then I tried to learn about 
>>> *c.filecommands*, but I thought it better to join the group and write 
>>> this. 
>>> ???
>>>
>>> Thanks in advance for help,
>>>
>>> Chris
>>>
>>

-- 
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/b0c255f0-b592-4927-9d39-8bb1db7d96b9n%40googlegroups.com.


Re: newbie stuck

2022-08-29 Thread tbp1...@gmail.com
Without knowing anything about the plugin, it looks like the signature of 
fc.write_leo_file() is currently not the signature the plugin thinks it 
is.  I'd try commenting out the extra params in the plugin, and see what 
what you get:

ok = self.c.fileCommands.write_Leo_file(
fileName#,
#outlineOnlyFlag=not self.opml_write_derived_files,
#toString=False, toOPML=True
)
 
You would have to restart Leo, or run a new Leo session, to try the changes 
out.
On Monday, August 29, 2022 at 6:15:29 PM UTC-4 chr...@gmail.com wrote:

> Hi,
>
> If you want you can skip to "*Problem*" below.
>
> I'm new to Leo  but not to Python, and not to the world. For 30 years, 
> I've been trying to recapture the magic of MORE (and ThinkTank...) , but on 
> Windows (had to switch in 1989, never used a Mac since).  No way. Recently 
> got fed up, got a Mac Mini M1, an iPhone and iPad, bought OmniOutliner,  
> but I now only use it on IOS to exchange OPML files with Windows because 
> _BREVITYALERT_.  Even though I got to a decent level in Python, I never 
> tried LEO because  _BREVITYALERT_
>
> But THIS IS THE ONE. Wow!
>
> *Problem*
> Of course, my first message is also about a problem. I'm pretty sure I got 
> the leoOPML.py plugin configuration right (file, tree, directives, body 
> panel), but when I type *write-opml-file* in the mini-buffer (and by the 
> way this procedure seems to be nowhere on leoeditor.com or 
> davy39.github.io/leo-editor/apidoc/leo.plugins.html. Thanks, Google), 
> I get this:
>
>
>
>
>
>
>
>
>
> *Traceback (most recent call last):  File 
> "C:\Python310\lib\site-packages\leo\core\leoKeys.py", line 2521, in 
> callAltXFunctionfunc(event)  File 
> "C:\Python310\lib\site-packages\leo\plugins\leoOPML.py", line 346, in 
> writeOpmlCommandc.opmlCommands.writeFile(fileName)  File 
> "C:\Python310\lib\site-packages\leo\plugins\leoOPML.py", line 319, in 
> writeFileok = self.c.fileCommands.write_Leo_file(TypeError: 
> FileCommands.write_Leo_file() got an unexpected keyword argument 
> 'outlineOnlyFlag'*
>  everytime, either with my own narrow set of parameter plugins or with the 
> one in leosettings.leo.
>
> I went through the plugin code, tried to remove line 321, but then 
> *Tostring=False*  became unexpected too. Then I tried to learn about 
> *c.filecommands*, but I thought it better to join the group and write 
> this. 
> ???
>
> Thanks in advance for help,
>
> Chris
>

-- 
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/f278306e-937e-448a-b7f0-889e649a7647n%40googlegroups.com.


Re: Newbie stuck - new traceback, "OPML" file attached

2022-08-29 Thread tbp1...@gmail.com
Would you explain what you would like to happen?  Do you want to get a Leo 
outline with the nodes named and indented according to the OPML file?  If 
so, that should be pretty easy to write a script for even without a plugin 
(in case it's too hard to get it functioning).

On Monday, August 29, 2022 at 8:29:55 PM UTC-4 chr...@gmail.com wrote:

> Hello Edward,
>
> Well, since my original message has now appeared in the group page, I'll 
> repost only the relevant part, just in case. I also attached here an OPML 
> file done in 5 minutes with OmniOutliner (THE outliner reference, I dare 
> say) on my iPhone and saved as OPML. That's the basic format that will 
> allow Leo to exchange files with any other correctly designed 
> OPML-compatible app/program. It's an old spec, but it now is the way for 
> compatibility of outlines with mobile devices as well.
>
> Other attributes can be added, but since OPML is first and foremost an 
> outline exchange format, Vnodes and Tnodes won't cut it.  You can find the 
> spec at
> http://opml.org/spec2.opml . Jump straight to the paragraph titled 
> "Text Attributes".
>
> You can also look at the source of that webpage and see that between lines 
> 49 and 438, it is indeed pure OPML, which is compatible with Mozilla 
> Firefox and Thunderbird (OPML is used a lot for passing RSS feeds), 
> Microsoft Edge, and most probably Google Chrome too (never used it). The 
> outline on that webpage is two levels deeps, and the divots work in the 
> browser.
>
> Now my original post is made a bit obsolete by the second one -the extra 
> keyword args on lines 321 and 322 of leoOPML.py are not compatible with 
> c.fileCommands.write_Leo_file() - but here it is again:
>
> 
> *Problem*
> I'm pretty sure I got the leoOPML.py plugin configuration right (file, 
> tree, directives, body panel), but when I type *write-opml-file* in the 
> mini-buffer (and by the way this procedure seems to be nowhere on 
> leoeditor.com or davy39.github.io/leo-editor/apidoc/leo.plugins.html. 
> Thanks, Google), 
> I get this:
>
>
>
>
>
>
> *Traceback (most recent call last):  File 
> "C:\Python310\lib\site-packages\leo\core\leoKeys.py", line 2521, in 
> callAltXFunctionfunc(event)  File 
> "C:\Python310\lib\site-packages\leo\plugins\leoOPML.py", line 346, in 
> writeOpmlCommandc.opmlCommands.writeFile(fileName)*
>
>
>
>
>
> *  File "C:\Python310\lib\site-packages\leo\plugins\leoOPML.py", line 319, in 
> writeFileok = self.c.fileCommands.write_Leo_file(*
>
>
> *TypeError: FileCommands.write_Leo_file() got an unexpected keyword argument 
> 'outlineOnlyFlag'*
>  every time, either with my own narrow set of parameter plugins or with 
> the one in leosettings.leo.
>
> I went through the plugin code, tried to remove line 321, but then 
> *Tostring=False*  became unexpected too. Then I tried to learn about 
> *c.filecommands*, but I thought it better to join the group and write 
> this. 
> ???
>
> Thanks in advance for help,
>
> Chris
> See attachment
> On Tuesday, August 30, 2022 at 12:21:26 AM UTC+2 Edward K. Ream wrote:
>
>> On Mon, Aug 29, 2022 at 5:15 PM chr...@gmail.com  
>> wrote:
>>
>>> I haven't seen my first message in the list yet, the forum is probably 
>>> moderated...
>>> Further tests editing the guilty function call:
>>>
>>
>> I approved both messages, but I only see this one.
>>
>> Leo opens leo_test1.opml when I change .opml to .leo.
>>
>> Please resend your original message. 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/2bba33a6-e4ff-45fc-8462-0867518bfd03n%40googlegroups.com.


Re: Hewlett-Packard Calculator Emulators

2022-08-27 Thread tbp1...@gmail.com
There is a very good HP-35s simulator too, but I don't use it because, with 
all the programming and other extra features compared with the early HP 
calculators, it's too complicated to look at and use on a monitor.

The Reverse Polish Notation of my first HP calculator (the HP-45) prepared 
my brain to use FORTH, and that led to the basic design of the first 
ancestor of the GF4 Waveform Calculator.

With Windows 10 (I hope it will work on Windows 11, too), I've been doing 
simple arithmetic and unit conversions using the Start Menu type-in 
facility.  For example, tap the Windows key and type "21 deg c".  It shows 
you 69.8 deg F plus some other conversions.  Another one could be "5 oz in 
gr".  I never remember how big a hectare is, so: "1 acre in hectares" gives 
"1 Acre = 0.4047 Hectares".  "sqrt 640" gives the square root of 640.
It's really handy, and surprisingly flexible in grasping the questions (I 
imagine it's quietly going out to Bing to do the work).  More convenient 
than going through a search page in a browser, although search engines will 
do the same.

On Saturday, August 27, 2022 at 5:31:35 AM UTC-4 jkn wrote:

> I have an HP-35s calculator which I like but use fairly rarely - not 
> enough to fully use the RPN features. It is a shame that battery life is 
> relatively short.
>
> At the age of 13 or so I first saw an HP-65 calculator not long after they 
> came out, in 1974. My mum took me to some sort of education open evening 
> and it was there on open display to play with, magnetic card reader and 
> all. My teenage brain was never the same again...
>
> On Saturday, August 27, 2022 at 4:42:51 AM UTC+1 tbp1...@gmail.com wrote:
>
>> Sometimes there is just no substitute for a good calculator.  Even though 
>> your computer could do a little calculation for you - if it had a decent 
>> calculator program - the applet that came with the OS is hopeless and you 
>> are stuck.  I sometimes use one to calculate parameters for use while I am 
>> working with GF4, and I have occasionally had other needs for a calculator 
>> in the past.
>>
>> I am very fond of HP Reverse Polish Notation (RPN) calculators.  I used 
>> one or another professionally for years before -and sometimes after - the 
>> advent of practical personal computers.  If you aren't used to RPN, it 
>> takes a little getting used to, but it's generally much easier and faster 
>> to use once you have.  Those of you who have used them in the past know 
>> what I mean.
>>
>> There are on-screen emulators for a number of HP calculators, and they 
>> work well (some of them may be for Windows only).  The best ones use the 
>> actual microcode extracted from old calculators.  HP had some engineers who 
>> really knew their stuff about arithmetic calculations and maintaining 
>> precision in difficult cases, and their algorithms were generally 
>> outstanding.
>>
>> A number of these calculators could be programmed, a feature I made good 
>> use of. But the extra functionality makes the keyboard more complicated and 
>> hard to read.  Probably few of us will actually do any programming with 
>> these emulators even though they support it.
>>
>> Some of the calculators that are available include the HP35 (the original 
>> HP pocket calculator), HP45, HP21, HP25, HP41, and HP15c.  I recommend the 
>> HP-45 emulator because it has the best combination of functions, 
>> simplicity, and an easy-to-read onscreen keyboard.  The HP-15c emulator is 
>> very good, but the calculator has a horizontal layout and is somewhat 
>> large, so it may not fit well on the screen with other program windows very 
>> well. It depends on your screen, of course. Here are some links for 
>> emulators -
>>
>> HP 35, 45 <http://www.panamatik.de/html/hp_classic.html>
>> HP21, 25 <http://www.panamatik.de/html/hp_woodstock.html>
>> HP41 <http://www.hp41.org/Emulation.cfm>
>> HP15c <https://hp15c.com>
>>
>> Have fun!
>>
>

-- 
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/4f345764-0035-4f0b-8706-f619268f9af9n%40googlegroups.com.


Hewlett-Packard Calculator Emulators

2022-08-26 Thread tbp1...@gmail.com
Sometimes there is just no substitute for a good calculator.  Even though 
your computer could do a little calculation for you - if it had a decent 
calculator program - the applet that came with the OS is hopeless and you 
are stuck.  I sometimes use one to calculate parameters for use while I am 
working with GF4, and I have occasionally had other needs for a calculator 
in the past.

I am very fond of HP Reverse Polish Notation (RPN) calculators.  I used one 
or another professionally for years before -and sometimes after - the 
advent of practical personal computers.  If you aren't used to RPN, it 
takes a little getting used to, but it's generally much easier and faster 
to use once you have.  Those of you who have used them in the past know 
what I mean.

There are on-screen emulators for a number of HP calculators, and they work 
well (some of them may be for Windows only).  The best ones use the actual 
microcode extracted from old calculators.  HP had some engineers who really 
knew their stuff about arithmetic calculations and maintaining precision in 
difficult cases, and their algorithms were generally outstanding.

A number of these calculators could be programmed, a feature I made good 
use of. But the extra functionality makes the keyboard more complicated and 
hard to read.  Probably few of us will actually do any programming with 
these emulators even though they support it.

Some of the calculators that are available include the HP35 (the original 
HP pocket calculator), HP45, HP21, HP25, HP41, and HP15c.  I recommend the 
HP-45 emulator because it has the best combination of functions, 
simplicity, and an easy-to-read onscreen keyboard.  The HP-15c emulator is 
very good, but the calculator has a horizontal layout and is somewhat 
large, so it may not fit well on the screen with other program windows very 
well. It depends on your screen, of course. Here are some links for 
emulators -

HP 35, 45 
HP21, 25 
HP41 
HP15c 

Have fun!

-- 
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/371ff3a4-10f0-48ec-b245-357c3a5f2f29n%40googlegroups.com.


Re: Leo 6.6.4: status report

2022-08-24 Thread tbp1...@gmail.com

" Leo 6.6.5 as scheduled" probably "6.6.4?"
On Wednesday, August 24, 2022 at 4:19:56 PM UTC-4 Edward K. Ream wrote:

> We are on track to release Leo 6.6.5 as scheduled, on Friday September 2.
>
> Today I pushed several PRs to devel. These PRs contain mass code updates, 
> but they are unlikely to cause problems.
>
> Only one 6.4 issue 
> 
>  
> remains. This issue is minor and self contained. I expect to resolve this 
> issue in a day or two.
>
> I have just marked three issues as Won'tFix 
>  or Can'tFix 
> . These issues 
> will be fixed only if somebody else steps up to fix them.
>
> 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/7d8a2f02-b898-4d36-a766-781796acfccan%40googlegroups.com.


Re: Please upvote Thomas's gf4 project

2022-08-23 Thread tbp1...@gmail.com
I've just done this.  Gulp!

On Sunday, June 5, 2022 at 6:16:28 PM UTC-4 Edward K. Ream wrote:

> On Sun, Jun 5, 2022 at 8:51 AM tbp1...@gmail.com  
> wrote:
>
>> I've added a link and screen shot to GF4 on my home page 
>> <http://tompassin.net>.
>>
>
> A suggestion: Announce gf4 on the python announcements list 
> <https://mail.python.org/mailman3/lists/python-announce-list.python.org/>. 
> I would add links to the gf4 repo and your home page.
>
> 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/c433df59-77dd-4aab-8d8a-cab69bf735den%40googlegroups.com.


Re: PR #2749 has been merged into devel and felix-server4

2022-08-21 Thread tbp1...@gmail.com
Nav panel seems to work as expected now.  Thanks!

On Saturday, August 20, 2022 at 5:07:02 PM UTC-4 Félix wrote:

> Done ! :)
>
> On Saturday, August 20, 2022 at 3:08:00 PM UTC-4 Félix wrote:
>
>> No worries, i'm on it: I've found the small bug that causes the nav 
>> searches to be messed up ;)
>>
>> (The body match method was a temporary copy of the headline match method 
>> that was forgotten unchanged while converting the whole of the search 
>> controller class)
>>
>> I'll push a fix this afternoon :)
>>
>> Félix
>>
>> On Saturday, August 20, 2022 at 12:48:34 PM UTC-4 tbp1...@gmail.com 
>> wrote:
>>
>>> I'm having serious problems with the Nav pane.  At first I thought it 
>>> was working as it used to.  But today, it is failing abysmally.  I don't 
>>> have a small simple test case yet.  But for several searches, it seems to 
>>> return all headlines whether or not they contain the search word, and  
>>> after hitting , actual hit lines in the body are not shown.
>>>
>>> I'll see if I can come up with a small example.
>>>
>>> On Thursday, August 18, 2022 at 10:37:50 PM UTC-4 Edward K. Ream wrote:
>>>
>>>> PR #2749 <https://github.com/leo-editor/leo-editor/pull/2749> contains 
>>>> significant changes to Leo's core:
>>>>
>>>> - Removed g.PosList and leoNodes.PosList classes. This reduces the 
>>>> number of Position slots from 5 to 3, a significant space saving for every 
>>>> position object.
>>>>
>>>> - The PR affects the Nav pane (quicksearch plugin and corresponding 
>>>> code in leoserver.py.) The Nav pane appears to work, but more testing is 
>>>> needed.
>>>>
>>>> We aren't going back. We'll fix any new problems starting from devel. 
>>>> Please report any problems immediately.
>>>>
>>>> Edward
>>>>
>>>> P.S. Félix reports problems with leoInteg (Leo for vscode) that predate 
>>>> PR #2749. I expect Félix will fix leoInteg soon :-)
>>>>
>>>> Edward
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/90e4fe9b-8ca3-49da-b082-dc65feddb7d3n%40googlegroups.com.


Re: PR #2749 has been merged into devel and felix-server4

2022-08-20 Thread tbp1...@gmail.com
I'm having serious problems with the Nav pane.  At first I thought it was 
working as it used to.  But today, it is failing abysmally.  I don't have a 
small simple test case yet.  But for several searches, it seems to return 
all headlines whether or not they contain the search word, and  after 
hitting , actual hit lines in the body are not shown.

I'll see if I can come up with a small example.

On Thursday, August 18, 2022 at 10:37:50 PM UTC-4 Edward K. Ream wrote:

> PR #2749  contains 
> significant changes to Leo's core:
>
> - Removed g.PosList and leoNodes.PosList classes. This reduces the number 
> of Position slots from 5 to 3, a significant space saving for every 
> position object.
>
> - The PR affects the Nav pane (quicksearch plugin and corresponding code 
> in leoserver.py.) The Nav pane appears to work, but more testing is needed.
>
> We aren't going back. We'll fix any new problems starting from devel. 
> Please report any problems immediately.
>
> Edward
>
> P.S. Félix reports problems with leoInteg (Leo for vscode) that predate PR 
> #2749. I expect Félix will fix leoInteg soon :-)
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8961e4c7-de52-4092-8219-475e2d9a8620n%40googlegroups.com.


Re: Excessive Typing Lags

2022-08-17 Thread tbp1...@gmail.com
I found out why I can't install PyQt6 on Linux Mint (my VM is version 
19.3).  It needs a later version of glibc-bin than 2.7.   This library is 
apparently included with ldd.  The version can be checked with ldd --version
.

Ubuntu and Debian (and perhaps a later version of Mint) include a higher 
version, and PyQt6 installs.

On Monday, August 15, 2022 at 10:37:27 PM UTC-4 tbp1...@gmail.com wrote:

> PyQt6 also didn't install on an Ubuntu VM, but I succeeded with the help 
> of pip install PyQt6 producing "No matching distribution..." error 
> <https://stackoverflow.com/questions/70690121/pip-install-pyqt6-producing-no-matching-distribution-error>.
>   
> Too bad that didn't do the job with Mint, too.  No unusual lags in 
> Ubuntu/PyQt6.
>
> On Monday, August 15, 2022 at 10:12:19 PM UTC-4 tbp1...@gmail.com wrote:
>
>> I was able to update to PyQt6 on my Debian VM, and in a quick test did 
>> not suffer from the  or mark/unmark lags.   I don't know why I've got 
>> the update problem on my Mint VM.  If I figure it out, I'll post about it 
>> here.
>>
>> On Monday, August 15, 2022 at 9:53:10 PM UTC-4 tbp1...@gmail.com wrote:
>>
>>> There are also other lags I am experiencing.  Sometimes it takes a long 
>>> time (like a count of 5) for the  and  commands to take 
>>> effect.  But if I have just typed something that does not exhibit a lag, 
>>> then the  works right away (not the un-indent  though).  
>>> Also,  setting or unsetting a mark on a node often takes a count of 3 - 5. 
>>> This is on Windows 10.  My system has had its regular Windows updates and 
>>> patches and it seems to me that these Leo problems have gotten more 
>>> pronounced recently.
>>>
>>> To look into factors that might be related, here's what I tried:
>>>
>>> 1. Update PyQt6 using Pip;
>>> 2. Boot Windows with Safe Boot, no network.
>>> 3. Have only Leo running without any other visible programs.
>>> 4. Changed the battery on my wireless Logitech keyboard.
>>>
>>> None of these made any difference.  Finally I removed PyQt6 and went 
>>> back to PyQt5. These new lags went away.  I restored and removed PyQt6 
>>> again and got the same results.  So for now I'm going to keep running with 
>>> PyQt5 (v5.15.6).  I have not been able to install PyQt6 on my Linux Mint 
>>> VM, so I can't test PyQt6 vs PyQt5 on it.
>>>
>>> BTW, I didn't uninstall PyQt6 using Pip.  Instead, I just renamed the 
>>> PyQt6 directory in Python Lib/site-packages to PyQt6x.  This way I can 
>>> reinstate it without having to re-install.
>>>
>>> On Saturday, July 16, 2022 at 7:57:02 AM UTC-4 Edward K. Ream wrote:
>>>
>>>> On Fri, Jul 15, 2022 at 6:19 PM tbp1...@gmail.com  
>>>> wrote:
>>>>
>>>>> Has anyone noticed annoying lags when typing into a Leo body?  
>>>>
>>>>
>>>> I haven't noticed anything annoying with Leo in a long time :-)  I use 
>>>> Windows 11 primarily.
>>>>
>>>> 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/75039e37-49d8-4c1e-b813-ac1654db7f1cn%40googlegroups.com.


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

2022-08-16 Thread tbp1...@gmail.com
There may be a possibility for round-tripping VR3 "notebooks" with 
Jupyter.  For example, there is Jupytext 
<https://jupytext.readthedocs.io/en/latest/index.html>.  See also 
discussion on Github nbconvert issue 452 
<https://github.com/jupyter/nbconvert/issues/452>.  It might turn out that 
small enhancements to VR3 could support round-tripping between VR3 and 
Jupyter notebooks.

That would be cool - if there is enough interest, I could spend some time 
on it.  Please comment here if you are interested.  No guarantees, though!

On Monday, August 15, 2022 at 4:33:27 PM UTC-4 tbp1...@gmail.com wrote:

> VR3 will still be able to display jupyter notebooks.  It will convert an 
> @jupyter node that has the URL of a jupyter outline to an HTML file and 
> then render the HTML.  VR3 does not use the Leo importer at all.
>
> On Monday, August 15, 2022 at 6:32:32 AM UTC-4 Edward K. Ream wrote:
>
>> On Fri, Aug 12, 2022 at 11:46 PM Félix  wrote:
>>
>>>
>>> oh! I remember now noticing about an older json export functionality, 
>>> and forgot to ask about it... i would go in the same direction as you 
>>> proposed.
>>>
>>> indeed the .leojs file format is somewhat more straightforward and 
>>> complete as a JSON export format in itself. 
>>>
>>> so i support removing the older json exporter (along with the jupyter 
>>> one too: one less for me to mirror in leointeg/leojs ! ) 
>>>
>>
>> Thanks for your comments. Among many other items, PR #2729 
>> <https://github.com/leo-editor/leo-editor/pull/2729> removes these two 
>> importers.
>>
>> 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/6ae17c6d-1f14-4644-853c-88117cc34a5cn%40googlegroups.com.


Re: Excessive Typing Lags

2022-08-15 Thread tbp1...@gmail.com
PyQt6 also didn't install on an Ubuntu VM, but I succeeded with the help of pip 
install PyQt6 producing "No matching distribution..." error 
<https://stackoverflow.com/questions/70690121/pip-install-pyqt6-producing-no-matching-distribution-error>.
  
Too bad that didn't do the job with Mint, too.  No unusual lags in 
Ubuntu/PyQt6.

On Monday, August 15, 2022 at 10:12:19 PM UTC-4 tbp1...@gmail.com wrote:

> I was able to update to PyQt6 on my Debian VM, and in a quick test did not 
> suffer from the  or mark/unmark lags.   I don't know why I've got the 
> update problem on my Mint VM.  If I figure it out, I'll post about it here.
>
> On Monday, August 15, 2022 at 9:53:10 PM UTC-4 tbp1...@gmail.com wrote:
>
>> There are also other lags I am experiencing.  Sometimes it takes a long 
>> time (like a count of 5) for the  and  commands to take 
>> effect.  But if I have just typed something that does not exhibit a lag, 
>> then the  works right away (not the un-indent  though).  
>> Also,  setting or unsetting a mark on a node often takes a count of 3 - 5. 
>> This is on Windows 10.  My system has had its regular Windows updates and 
>> patches and it seems to me that these Leo problems have gotten more 
>> pronounced recently.
>>
>> To look into factors that might be related, here's what I tried:
>>
>> 1. Update PyQt6 using Pip;
>> 2. Boot Windows with Safe Boot, no network.
>> 3. Have only Leo running without any other visible programs.
>> 4. Changed the battery on my wireless Logitech keyboard.
>>
>> None of these made any difference.  Finally I removed PyQt6 and went back 
>> to PyQt5. These new lags went away.  I restored and removed PyQt6 again and 
>> got the same results.  So for now I'm going to keep running with PyQt5 
>> (v5.15.6).  I have not been able to install PyQt6 on my Linux Mint VM, so I 
>> can't test PyQt6 vs PyQt5 on it.
>>
>> BTW, I didn't uninstall PyQt6 using Pip.  Instead, I just renamed the 
>> PyQt6 directory in Python Lib/site-packages to PyQt6x.  This way I can 
>> reinstate it without having to re-install.
>>
>> On Saturday, July 16, 2022 at 7:57:02 AM UTC-4 Edward K. Ream wrote:
>>
>>> On Fri, Jul 15, 2022 at 6:19 PM tbp1...@gmail.com  
>>> wrote:
>>>
>>>> Has anyone noticed annoying lags when typing into a Leo body?  
>>>
>>>
>>> I haven't noticed anything annoying with Leo in a long time :-)  I use 
>>> Windows 11 primarily.
>>>
>>> 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/cfbadf41-1e55-4156-a7a6-cf5c6d238784n%40googlegroups.com.


Re: Excessive Typing Lags

2022-08-15 Thread tbp1...@gmail.com
I was able to update to PyQt6 on my Debian VM, and in a quick test did not 
suffer from the  or mark/unmark lags.   I don't know why I've got the 
update problem on my Mint VM.  If I figure it out, I'll post about it here.

On Monday, August 15, 2022 at 9:53:10 PM UTC-4 tbp1...@gmail.com wrote:

> There are also other lags I am experiencing.  Sometimes it takes a long 
> time (like a count of 5) for the  and  commands to take 
> effect.  But if I have just typed something that does not exhibit a lag, 
> then the  works right away (not the un-indent  though).  
> Also,  setting or unsetting a mark on a node often takes a count of 3 - 5. 
> This is on Windows 10.  My system has had its regular Windows updates and 
> patches and it seems to me that these Leo problems have gotten more 
> pronounced recently.
>
> To look into factors that might be related, here's what I tried:
>
> 1. Update PyQt6 using Pip;
> 2. Boot Windows with Safe Boot, no network.
> 3. Have only Leo running without any other visible programs.
> 4. Changed the battery on my wireless Logitech keyboard.
>
> None of these made any difference.  Finally I removed PyQt6 and went back 
> to PyQt5. These new lags went away.  I restored and removed PyQt6 again and 
> got the same results.  So for now I'm going to keep running with PyQt5 
> (v5.15.6).  I have not been able to install PyQt6 on my Linux Mint VM, so I 
> can't test PyQt6 vs PyQt5 on it.
>
> BTW, I didn't uninstall PyQt6 using Pip.  Instead, I just renamed the 
> PyQt6 directory in Python Lib/site-packages to PyQt6x.  This way I can 
> reinstate it without having to re-install.
>
> On Saturday, July 16, 2022 at 7:57:02 AM UTC-4 Edward K. Ream wrote:
>
>> On Fri, Jul 15, 2022 at 6:19 PM tbp1...@gmail.com  
>> wrote:
>>
>>> Has anyone noticed annoying lags when typing into a Leo body?  
>>
>>
>> I haven't noticed anything annoying with Leo in a long time :-)  I use 
>> Windows 11 primarily.
>>
>> 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/0ca7a0a6-960f-4ee6-9361-59c0844f06ebn%40googlegroups.com.


Re: Excessive Typing Lags

2022-08-15 Thread tbp1...@gmail.com
There are also other lags I am experiencing.  Sometimes it takes a long 
time (like a count of 5) for the  and  commands to take 
effect.  But if I have just typed something that does not exhibit a lag, 
then the  works right away (not the un-indent  though).  
Also,  setting or unsetting a mark on a node often takes a count of 3 - 5. 
This is on Windows 10.  My system has had its regular Windows updates and 
patches and it seems to me that these Leo problems have gotten more 
pronounced recently.

To look into factors that might be related, here's what I tried:

1. Update PyQt6 using Pip;
2. Boot Windows with Safe Boot, no network.
3. Have only Leo running without any other visible programs.
4. Changed the battery on my wireless Logitech keyboard.

None of these made any difference.  Finally I removed PyQt6 and went back 
to PyQt5. These new lags went away.  I restored and removed PyQt6 again and 
got the same results.  So for now I'm going to keep running with PyQt5 
(v5.15.6).  I have not been able to install PyQt6 on my Linux Mint VM, so I 
can't test PyQt6 vs PyQt5 on it.

BTW, I didn't uninstall PyQt6 using Pip.  Instead, I just renamed the PyQt6 
directory in Python Lib/site-packages to PyQt6x.  This way I can reinstate 
it without having to re-install.

On Saturday, July 16, 2022 at 7:57:02 AM UTC-4 Edward K. Ream wrote:

> On Fri, Jul 15, 2022 at 6:19 PM tbp1...@gmail.com  
> wrote:
>
>> Has anyone noticed annoying lags when typing into a Leo body?  
>
>
> I haven't noticed anything annoying with Leo in a long time :-)  I use 
> Windows 11 primarily.
>
> 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/4fc9f413-5805-4330-88f8-605ab2248013n%40googlegroups.com.


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

2022-08-15 Thread tbp1...@gmail.com
VR3 will still be able to display jupyter notebooks.  It will convert an 
@jupyter node that has the URL of a jupyter outline to an HTML file and 
then render the HTML.  VR3 does not use the Leo importer at all.

On Monday, August 15, 2022 at 6:32:32 AM UTC-4 Edward K. Ream wrote:

> On Fri, Aug 12, 2022 at 11:46 PM Félix  wrote:
>
>>
>> oh! I remember now noticing about an older json export functionality, and 
>> forgot to ask about it... i would go in the same direction as you proposed.
>>
>> indeed the .leojs file format is somewhat more straightforward and 
>> complete as a JSON export format in itself. 
>>
>> so i support removing the older json exporter (along with the jupyter one 
>> too: one less for me to mirror in leointeg/leojs ! ) 
>>
>
> Thanks for your comments. Among many other items, PR #2729 
>  removes these two 
> importers.
>
> 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/a7946bbb-e97a-4612-9810-fa64f38dda97n%40googlegroups.com.


Re: The importers are about to get much simpler

2022-08-15 Thread tbp1...@gmail.com
It might be interesting to know if the framework could support brainf*ck 
 (but I won't be the one to try 
to actually write the importer...).

On Monday, August 15, 2022 at 7:43:06 AM UTC-4 Edward K. Ream wrote:

> Vitalije's importer code has primed the psychological pump. The effect on 
> the importers will be a spectacular collapse in complexity.
>
> *Aha 1*: A new method, *i.scan_all_lines*, can calculate all scan states 
> in a single pass.
>
> There is no need to store "helper" values in scan states! Instead, 
> i.scan_all_lines will maintain a few simple state-related vars.
>
> As a result, a single *NewScanState *class will suffice. Eventually, it 
> will become a named tuple with just two fields: context and level. Btw, 
> only i.gen_lines uses scan state classes, so the NewScanState class will 
> "disappear" from the view of all importers.
>
> *Aha 2*: The present scanning dictionaries contain two kinds of data: 
> level-related and token-related. Conceptually, those dictionaries should 
> *specify 
> only* tokenizing-related data. This Aha is moot because...
>
> *Aha 3*: None of the scanning dictionaries are needed!!!
>
> This last Aha arose while writing the first draft of i.scan_all_lines. At 
> present, i.scan_dict returns data telling how to:
>
> - compute the new state,
> - compute the new level,
> - increment the index into the line.
>
> But i.scan_all_lines can calculate all this without help! For any 
> language, i.scan_all_lines only needs to know the following *customizing 
> values*:
>
> - The (list of) characters that begin and end strings.
> - The characters that begin and end all forms of comments.
> - The (optional) characters (typically curly brackets) that increment and 
> decrement logical level.
>
> Subclasses of the Importer class will define these customizing values as 
> needed.
>
> *Summary*
>
> A new method, i.scan_all_lines, will compute all (new) scan states in a 
> prepass. 
>
> New scan states will eventually be named tuples containing only context 
> and level fields. All custom scan state classes will disappear.
>
> As needed, importers will define constant customizing values for 
> i.scan_all_lines.
>
> Importers will no longer need ctors. All overriding data will be constants.
>
> The new code will be *slightly *faster and *much* simpler than the old.
>
> Edward
>
> P.S. I'm not going to apologize for the old code. It got us to our present 
> happy state. 
>
> I could not have braved the coming changes without the new unit tests!
>
> EKR
>

-- 
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/5daace0c-7a24-4de5-86b3-82f5e9e05aafn%40googlegroups.com.


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

2022-08-12 Thread tbp1...@gmail.com
I wouldn't object.  You can usually view HTML versions of Jupyter notebooks 
in VR3 anyway.  Jupyter is so evolved by now that it would be a losing 
battle to try to support all its capabilities, but outside of Jupyter.  You 
can make your own (non-Jupyter but something like) notebooks to some extent 
with VR3, and I have found capability that useful.

On Friday, August 12, 2022 at 8:02:11 AM UTC-4 Edward K. Ream wrote:

> Don't panic: support for .leojs files (see #442 
> ) will remain. 
>
> The present importer for (special-format!) .json files is dangerously 
> incorrect. It must either be rewritten or retired. I much prefer the latter 
> option. Reading (and round-tripping) a *full* file format requires 
> low-level outline operations that could corrupt the original outline. Imo, 
> the risks far outweigh the rewards, which are likely to be nil :-)
>
> At one time, I thought importing jupyter notebooks (.ipynb files) might 
> allow Leo to evolve into an outline-oriented jupyter editor. Nothing ever 
> came of the idea. Testing that round-tripping .ipynb files works seems like 
> a waste of time. Without those tests, the .ipynb writer might corrupt 
> jupyter notebooks!
>
> *Summary*
>
> The .json and .ipynb importers/writers are dangerous. The .json importer 
> might corrupt Leo's outlines; the .ipynb writer might corrupt jupyter 
> notebooks. Imo, it's time to retire them all.
>
> 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/9823e600-0020-4121-91ee-3f3bfc18cf00n%40googlegroups.com.


Re: The new importers: a status report

2022-08-02 Thread tbp1...@gmail.com
At some point in the not-too-distant past, I imported a python file into 
Leo that had many decorators for function defs.  The decorators were put 
into the last line of the preceding node, not the first line of a function 
def node.  This may have worked when the external file was run, but it 
certainly isn't what one wants.

I just made up a little test Python file with decorators for all the 
function defs and imported it.  The decorators were correctly inserted as 
the first line of each function def node.  So in this one respect, at 
least, the new Python importer works more correctly than the old.

On Sunday, July 31, 2022 at 7:20:31 AM UTC-4 Edward K. Ream wrote:

> For the last several days I have been revising *all* of Leo's importers. 
> At present the C, Python and coffeescript importers work properly, but 
> yesterday I realized that Importer.*make_node* must be generalized.
>
> Indeed, Vitalije's version of this method used indentation as a proxy for 
> bracket level. This is valid for python and coffeescript, but not valid for 
> most other languages.
>
> Most unit tests indent brackets consistently. Fortunately one test does 
> not, which revealed the hidden assumption. It's tricky to generalize 
> make_node, but I'm confident that it can be done cleanly. A new 
> *decl_level* field in the block_tuple (the node descriptor tuple) 
> decouples bracket level from indentation.
>
> We aren't going back. The new importer world is way better than the old. 
> Thank you Vitalije!
>
> 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/07c4471e-82df-42e0-80c8-39740129e2f0n%40googlegroups.com.


Re: Vitalije: PR 2720 suggests improving Leo's python importer

2022-07-27 Thread tbp1...@gmail.com
Not all imports come from a git repo.  I would say that the majority of 
mine (historically) have come from previously existing files on my system 
that will never get into a repo.   I think it is unwise to depend on some 
external program to detect Leo-specific errors.

On Wednesday, July 27, 2022 at 10:32:31 AM UTC-4 Edward K. Ream wrote:

> On Monday, July 25, 2022 at 7:28:17 AM UTC-5 Edward K. Ream wrote:
>
> P.S. I may alter Vitalije's importer slightly. At present, Vitalije's 
>> importer carefully adds Leo's escape string for underindented lines. Imo, 
>> it may be better *not *to add those escapes, even if Leo does not import 
>> some (strange!) files properly. Tweaking imported files is to be expected. 
>> Users can always use git to correct import problems.
>>
>
> *Aha: What did I just say?!?* If we are going to rely on git to report 
> importer problems then the Importer class need not do so!! The Importer 
> class suddenly loses a lots of ugly code! Simplified "perfect import" 
> checks can migrate to unit tests.
>
> Furthermore, Vitalije's approach does not require a post-pass. And even if 
> it did, the clumsy post-pass API can go away.  Hurray!
>
> *Summary*
>
> The Importer class is about to collapse in complexity! 
>
> 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/02e7dc4e-3124-49d1-976f-78cd2f4796ffn%40googlegroups.com.


Re: Leo 6.6.3 coming this Friday, July 22

2022-07-20 Thread tbp1...@gmail.com
Tested all 927 tests without skipping on Win10.

On Wednesday, July 20, 2022 at 5:00:35 PM UTC-4 viktor@gmail.com wrote:

> Hello Edward,
>
> Edward K. Ream schrieb am Dienstag, 19. Juli 2022 um 12:57:51 UTC+2:
>
>> Leo 6.6.3 is ready for final testing! Please test devel and report any 
>> problems immediately. 
>>
>
> I've tested the latest version of Leo's devel branch  in a Fedora 35 - as 
> well as - a Debian 11 VM.
>
> The 'test-all' command reported 927 tests as OK 
>
> * w/ 2 skipped tests on Debian &
> * w/o any skipped tests on Fedora.
>
> 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/10a03a52-9b9a-410e-bb82-25b3ca6c3f38n%40googlegroups.com.


Re: minor selection inconsistency with move-lines-up/down

2022-07-19 Thread tbp1...@gmail.com
I think that this is tricky, because what is the "right" way?  For a single 
line, it seems obvious that the line should be moved, whether or not it has 
been selected.  The hard case is when several lines have been selected and 
then the cursor is on another line.  Should only the selected lines move, 
or should the cursor line also be included?  My preference is that the line 
the cursor is on should be included in the move with the selected lines.  
Otherwise sometimes the cursor line moves and other times it does not, and 
I think that is confusing.  

IIUC, @jkn would like the rule to be:

1. If no line is selected, the cursor line gets moved;
2. If some lines are selected, even partially, then *only* the  lines with 
visible selection move, and the cursor line is not moved if its line is not 
selected.**

** A entire line gets moved even if it is only partly selected.

If we are looking at it at this level of detail, then we could also ask if 
a blank line should get moved when the cursor is on it.
On Tuesday, July 19, 2022 at 6:24:56 AM UTC-4 jkn wrote:

> I understand your point (I said "I can see how this occurs"), but IMO
> it would be better (more generally useful) if this was special-cased.
> As I say, the behaviour of Delete/Ctrl-X is different from 'move-lines'.
>
> I am happy if this opens up a discussion as to the benefits of each
> approach.
>
> J^n
>
>
> On Tuesday, July 19, 2022 at 11:00:25 AM UTC+1 spike wrote:
>
>> The KWrite editor works almost exactly the same way, just
>> Ctrl-Shift-Up/Down, and it doesn't insert blank lines if you try to go
>> past the top or bottom of the file.
>>
>> It can be a bit surprising that it works this way, but it's consistent
>> because you highlighted the newline character at the end of the upper
>> line. If you cut, it gets cut, too.
>>
>> Try highlighting between the 'i' and 'n' characters instead of at the
>> end to see why that makes sense.
>>
>> Cheers.
>>
>> On 2022-07-19 03:24, jkn wrote:
>> > Hi all
>> > I have been using the 'move-lines-up' and 'move-lines-down' commands
>> > (Ctrl-up and Ctrl-down) quite a bit recently. They are very handy and I 
>> miss
>> > them in other editors I use ;-)
>> > 
>> > I have seen a small inconsistency though; I flag it here for 
>> consideration
>> > as an enhancement. It's to do with how the lines to move are selected.
>> > 
>> > Lets say I have three lines:
>> > 
>> > line1
>> > line2
>> > line3
>> > 
>> > - if I have my cursor on line 1, then Ctrl-up/down moves just line 1
>> > (fine)
>> > 
>> > - if I have my cursor at the beginning of line 1, then press shift-down,
>> > the whole of line 1 is selected, and my cursor is at the beginning of 
>> > line2
>> > (fine so far)
>> > 
>> > - but if I then press Ctrl-up, both Line 1 *and* line 2 move: not what 
>> I 
>> > expect!
>> > I have to move my cursor 'left' (to be on the end of line 1), for only
>> > line 1 to move.
>> > 
>> > I can see how this occurs, but it is different if, say, having selected
>> > line 1 in the same way, I were to Ctrl-x (cut) it. Only the selected 
>> text
>> > in line 1 would be cut, not line 2 as well.
>> > 
>> > If possible I would request that this behaviour is changed. However
>> > it's pretty low priority, I would agree.
>> > 
>> > Thanks for Leo!
>> > 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/5dc4b37b-e3d4-4cf4-b478-c21442b0d912n%40googlegroups.com.


Re: Icons with relative paths

2022-07-18 Thread tbp1...@gmail.com
You can add a new parameter to the method call, say use_legacy = True.  
Then all existing code will work as always with the default value of 
use_legacy.  You add a new code branch for when use_legacy is False so you 
can get what you want in that case.  Tests for file existence will work 
with relative paths or absolute paths, and you can easily determine which 
you have.  I may be missing something (I often do), but it doesn't sound 
very tricky.

On Monday, July 18, 2022 at 7:16:47 PM UTC-4 spike wrote:

> I can kludge it, but it introduces some subtle but potentially nasty
> bugs. It really needs to be fixed properly in the next major update.
>
>
> I suppose adding a 'pathType' parameter to insertIconFromFile would 
> work. If the parameter is missing then it uses legacy mode and issues a 
> deprecation warning to the log.
>
> Splitting the "insert-icon" command and menu option isn't a problem
> since it isn't meant to be scripted.
>
>
> On the data side, a new attribute is needed for document relative paths,
> 'docRelPath', with absolute paths in the other two attributes to mimic
> the current behaviour when using legacy code.
>
> The problems with this are that the legacy paths are possibly invalid 
> and legacy code directly modifying icon data won't know to update the 
> new path, putting them out of sync. New code can't necessarily fix it 
> because the updated absolute paths may still be invalid. This is 
> especially troublesome when sharing outlines between users with 
> different Leo versions. On the other hand the 'relPath' attribute 
> suffers from the same problems.
>
>
> On 2022-07-18 14:36, tbp1...@gmail.com wrote:
> > I'm all in favor of improving features, but please find a way to make
> > them continue to work with existing code. It seems to me that the
> > easiest way to go about this would be to make the code fall back to a
> > document or outline-relative path if it can't find the icon files in
> > the other standard places it already looks for.
> > 
> > On Monday, July 18, 2022 at 4:23:06 PM UTC-4 spike wrote:
> > 
> >> g.os_path_exists works with relative paths but 
> >> c.editCommands.insertIconFromFile forces relative paths to be
> >> relative to the Leo theme directory. Document relative paths are
> >> rejected.
> >> 
> >> Running the following command from Leo's Python Console tab fails: 
> >> c.editCommands.insertIconFromFile('./icons/xfsm-lock.png', p=p)
> >> 
> >> This works, but only for theme icons: 
> >> c.editCommands.insertIconFromFile('light/checkbox_checked.svg',
> >> p=p)
> >> 
> >> This also works, but forces an absolute path: import os
> >> 
> >> 
> c.editCommands.insertIconFromFile(os.path.abspath('./icons/xfsm-lock.png'),
> >>
> >>
> >> 
> p=p)
> >> 
> >> c.editCommands.insertIconFromFile calls appendImageDictToList,
> >> which then calls g.app.gui.getTreeImage, which requires relative
> >> paths to be relative to the current Leo theme. Document-relative
> >> paths are rejected with an unhelpful "can not load image: None"
> >> message in the log.
> >> 
> >> There are three possible use cases for icons, but the current logic
> >> only supports two of them. 1) Theme relative path. This is used by
> >> the "to-do" plugin, which seems to be why the icon feature exists
> >> in the first place. 2) Document relative path. Useful but
> >> unsupported. 3) System relative path. Supported, limited use, but
> >> not portable.
> >> 
> >> 
> >> As it stands the current implementation is incomplete. If there are
> >> no objections I will work on a fix.
> >> 
> >> TO DO: * The 'relPath' attribute needs to be replaced by an
> >> 'isThemeIcon' flag. Old icon data needs to be automatically updated
> >> to the new format on file load. Theme paths should also respect the
> >> current theme.
> >> 
> >> * I'm debating adding an option to
> >> c.editCommands.insertIconFromFile or making a new
> >> insertThemeIconFromFile function for theme icons.
> >> 
> >> * The insert-icon command should get a companion insert-theme-icon 
> >> command so that the Open dialog starts in the right folder.
> >> 
> >> * The to-do plugin needs to be updated to the new API.
> >> 
> >> * There should also be a visible indicator when an icon file is
> >> missing or unreadable. I'm thinking a red 'x' in a white box, like
> >> web browsers do.
> >> 
> >> * Tes

Re: Icons with relative paths

2022-07-18 Thread tbp1...@gmail.com
I'm all in favor of improving features, but please find a way to make them 
continue to work with existing code.  It seems to me that the easiest way 
to go about this would be to make the code fall back to a document or 
outline-relative path if it can't find the icon files in the other standard 
places it already looks for. 

On Monday, July 18, 2022 at 4:23:06 PM UTC-4 spike wrote:

> g.os_path_exists works with relative paths but 
> c.editCommands.insertIconFromFile forces relative paths to be relative 
> to the Leo theme directory. Document relative paths are rejected.
>
> Running the following command from Leo's Python Console tab fails:
> c.editCommands.insertIconFromFile('./icons/xfsm-lock.png', p=p)
>
> This works, but only for theme icons:
> c.editCommands.insertIconFromFile('light/checkbox_checked.svg', p=p)
>
> This also works, but forces an absolute path:
> import os
>
> c.editCommands.insertIconFromFile(os.path.abspath('./icons/xfsm-lock.png'), 
>
> p=p)
>
> c.editCommands.insertIconFromFile calls appendImageDictToList, which 
> then calls g.app.gui.getTreeImage, which requires relative paths to be 
> relative to the current Leo theme. Document-relative paths are rejected 
> with an unhelpful "can not load image: None" message in the log.
>
> There are three possible use cases for icons, but the current logic only 
> supports two of them.
> 1) Theme relative path. This is used by the "to-do" plugin, which seems 
> to be why the icon feature exists in the first place.
> 2) Document relative path. Useful but unsupported.
> 3) System relative path. Supported, limited use, but not portable.
>
>
> As it stands the current implementation is incomplete. If there are no 
> objections I will work on a fix.
>
> TO DO:
> * The 'relPath' attribute needs to be replaced by an 'isThemeIcon' flag. 
> Old icon data needs to be automatically updated to the new format on 
> file load. Theme paths should also respect the current theme.
>
> * I'm debating adding an option to c.editCommands.insertIconFromFile or 
> making a new insertThemeIconFromFile function for theme icons.
>
> * The insert-icon command should get a companion insert-theme-icon 
> command so that the Open dialog starts in the right folder.
>
> * The to-do plugin needs to be updated to the new API.
>
> * There should also be a visible indicator when an icon file is missing 
> or unreadable. I'm thinking a red 'x' in a white box, like web browsers do.
>
> * Test cases need to be written.
>
> * Then documentation.
>
>
> I'm still new to Leo coding, so I'll probably have questions.
>
> Thank you for your patience.
>
>
> On 2022-07-18 08:04, tbp1...@gmail.com wrote:
> > Typically, either you write code and try different paths depending on
> > whether your file is in one place or another, or a Leo method does the 
> same
> > thing for you, in which case you need to know where Leo is going to look.
> > For example, in the part of the Cheatsheet you mention:
> > 
> > fn = g.os_path_finalize_join(g.app.loadDir,
> > '..', 'Icons', 'Tango', '16x16', 'status', icon)
> > if g.os_path_exists(fn):
> > c.editCommands.insertIconFromFile(path=fn)
> > 
> > g.os_path_exists() works with relative paths as wel as absolute paths.
> > 
> > It would be helpful if you explain just how you are trying to use these
> > icons. If it is via a Leo setting, which settings? If via code you have
> > written, please show the code.
> > On Monday, July 18, 2022 at 5:55:21 AM UTC-4 spike wrote:
> > 
> >> On 2022-07-17 11:29, Félix wrote:
> >>> Thanks for the examples spike, but you replied to me only instead of
> >> reply
> >>> all, so your examples are not showing in the thread.
> >>>
> >>> Here is the example spike provided: (see attachments)
> >>>
> >>> On the other hand, i've looked at the 'unknownattributes' of the nodes,
> >> and
> >>> indeed the paths provided for the icons is not relative to the Leo 
> file,
> >>> but are instead complete paths that will not work anywhere else: such 
> as
> >>> */home/keith/tmp/test/icons/blablabla.png*
> >>>
> >>> instead of *icons/blablabla.png*
> >>>
> >>> Lastly, i tried using / setting / finding out about icons on nodes as I
> >>> was totally unaware that this was a thing... i could not find anything
> >> ...
> >>> Where / how did you get those icons and icon attributes? searching for
> >>> 'icons' in the documentation yields some other unrelated stuff... Like
> >> can
> >>> you t

Re: "Chapters" Dropdown Can Now Be Placed At Left Of IconBar

2022-07-18 Thread tbp1...@gmail.com
And the default was False anyway, but having it in leoSettings.leo at least 
means that someone might notice it there.

On Monday, July 18, 2022 at 12:03:06 PM UTC-4 Edward K. Ream wrote:

> To use the new feature, add a new node to the @settings tree in your 
>> myLeoSettings.leo outline with this text:
>>
>> @bool chapter-dropdown-left = True
>>
>
> Rev 2e1dbd9 adds `@bool chapter-dropdown-left = False` to leoSettings.leo, 
> retaining legacy operation by default.
>
> 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/6949fb04-00ce-4797-b898-9d2a203a3fafn%40googlegroups.com.


Developer's Notebook - Placing The "Chapters" Dropdown On The Left Of The Iconbar

2022-07-18 Thread tbp1...@gmail.com
In this Developer's Notebook, I want to share how I arrived at the new code 
to place the "Chapters" dropdown at the left of the Iconbar instead of the 
usual right.  Mainly there are a couple of tricks that I have found useful 
and would like to pass on to others who haven't come across them.

As background, a user had asked if this could be done.  I have written a 
few Leo plugins and a bit of infrastructure (e.g., the highlighting of the 
current line in the body), so I have some general knowledge about Leo.  But 
I don't know much about most of the details.  One helpful skills for a Leo 
developer is finding a good starting point.  All the Leo code can be found 
in the LeoPyRef outline.

@edward made a comment on the issue discussion page about the Iconbar being 
involved.  I figured that the Iconbar would be attached somehow to c.frame, 
and so I started searching.  I like to search using the Nav bar because it 
gives results that are easy to scan.  I searched for *frame.ic* and found 
this:

Official Ivars
c.frame.iconBar

Here was a starting point.  I explored it in my Workbook outline.  
Searching for *iconbar* I found *QtIconBarClass*, which seemed a likely 
find.

Next I looked for the most characteristic thing I could think of, which is 
the label *Chapters:* for the Chapters dropdown list.  I found this:

tt.createControl (defines class LeoQComboBox)
frame = QtWidgets.QLabel('Chapters: ')

A glance at the code shows that it is here that the label and dropdown are 
created and added to the Iconbar.  They are added with a Qt method: 
addWidget().  Presumably we would like to use something like 
insertWidget(position, 
widget) if there is such a method. So we need to find the Qt class involved 
so we can look up its methods.

In a node in the workbook, I got the class:

f = c.frame
icb = f.iconBar
g.es(type(icb))

Running this with CNTL-b gave as we had surmised earlier . 

This is a Leo class. Searching for its code, we find this in its 
constructor:

self.w = c.frame.top.iconBar  # A QToolBar

We also find a method addWidget(), which calls the same method on the 
*QToolBar.  
*So we look up *QToolbar* on the internet and look through its API page.  
But there is no method like *insertWidget()*. Here is a very useful trick 
for working with Qt classes - they have many more methods than are listed 
on the API page.  All widgets inherit the methods of the generic Qt Widget, 
and sometimes other specialized methods as well.  The page for the API of a 
widget usually has a link to their inherited methods.  It can be somewhat 
overwhelming because there are so many, but in the list we find 

QAction  *QToolBar::insertWidget(
QAction  **before*, QWidget 
 **widget*)

We can insert our widget before something that is a kind of *action*, but 
what is that and how do we find the right one?  It turns out that the 
QToolbar has a method actions().  Presumably the actions[0] item will be 
the left-most one on the IconBar, but it would be good to check.  We can 
get its type by modifying our test code like this:

f = c.frame
icb = f.iconBar
ibw = icb.w
actions = ibw.actions()
g.es(actions[0])

>From this we learn that our actions[0] item is of type *leoIconBarButton*. 
Searching for its constructor in LeoPyRef  discloses that it has a property 
*text*. By changing the *g.es()* line to 

g.es(actions[0].text)

we see that its label is *script-button*, so it is indeed the first item on 
the IconBar.  So we can change instances of addWidget(w) to 
insertWidget(actions[0], 
w).

This turned out to be the solution (with a little more checking and 
structuring).

I hope these notes will be helpful even if they were a little on  the long 
side.

-- 
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/5dda940c-67a6-48a7-b8cf-836e58e13cf6n%40googlegroups.com.


"Chapters" Dropdown Can Now Be Placed At Left Of IconBar

2022-07-18 Thread tbp1...@gmail.com
With the new merge of the devel branch, you can locate the "chapters" 
dropdown at the left of the Iconbar.  This is useful if you use chapters a 
lot, since it prevents the dropdown from being truncated off the end of the 
toolbar when there are many script buttons, or the Leo window is narrow.

To use the new feature, add a new node to the @settings tree in your 
myLeoSettings.leo outline with this text:

@bool chapter-dropdown-left = True

This feature was requested by @jbobian in issue 2722 
.

-- 
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/0c6eab22-c427-4a67-981a-5c07db0e9219n%40googlegroups.com.


Re: Icons with relative paths

2022-07-18 Thread tbp1...@gmail.com
Typically, either you write code and try different paths depending on 
whether your file is in one place or another, or a Leo method does the same 
thing for you, in which case you need to know where Leo is going to look.  
For example, in the part of the Cheatsheet you mention:

fn = g.os_path_finalize_join(g.app.loadDir,
'..', 'Icons', 'Tango', '16x16', 'status', icon)
if g.os_path_exists(fn):
c.editCommands.insertIconFromFile(path=fn)

g.os_path_exists() works with relative paths as wel as absolute paths.  

It would be helpful if you explain just how you are trying to use these 
icons.  If it is via a Leo setting, which settings?  If via code you have 
written, please show the code.
On Monday, July 18, 2022 at 5:55:21 AM UTC-4 spike wrote:

> On 2022-07-17 11:29, Félix wrote:
> > Thanks for the examples spike, but you replied to me only instead of 
> reply
> > all, so your examples are not showing in the thread.
> > 
> > Here is the example spike provided: (see attachments)
> > 
> > On the other hand, i've looked at the 'unknownattributes' of the nodes, 
> and
> > indeed the paths provided for the icons is not relative to the Leo file,
> > but are instead complete paths that will not work anywhere else: such as
> > */home/keith/tmp/test/icons/blablabla.png*
> > 
> > instead of *icons/blablabla.png*
> > 
> > Lastly, i tried using / setting / finding out about icons on nodes as I
> > was totally unaware that this was a thing... i could not find anything 
> ...
> > Where / how did you get those icons and icon attributes? searching for
> > 'icons' in the documentation yields some other unrelated stuff... Like 
> can
> > you take screenshots on how you set those?
> > 
> > (sorry i'm totally ignorant about those 'node icons' that you speak of,
> > although i can see they exists in your screenshots and that the 
> attributes
> > are there in the .leo file.)
> > 
> > Félix
> > 
> > 
> > 
> > On Sunday, July 17, 2022 at 7:46:03 AM UTC-4 Edward K. Ream wrote:
> > 
> >> On Sat, Jul 16, 2022 at 9:50 PM Robert-Felix  
> wrote:
> >>
> >> Leo uses relative paths for most stuff so moving the leo file and your
> >>> 'project' or 'resources' folder to accompany it along should keep
> >>> everything working fine. whatever you had going on...
> >>>
> >>
> >> Leo's path expressions
> >>  should suffice
> >> for any conceivable purpose :-)
> >>
> >> Edward
> >>
> >
> Sorry about the misdirected reply. I'll try to do better in future.
>
> Thanks for reposting test file attachment. I'm posting a shot of the 
> menu option as well as the 'good.png' and 'bad.png' example screenshots.
>
>
> The documentation is sparse and doesn't give much information. Most of 
> what I know about this feature comes from trial-and-error and looking at 
> Leo's source code. I'm still figuring things out.
>
>
> https://leoeditor.com/commands.html#miscellaneous-commands lists four 
> minibuffer commands that do the same things as the menu options.
>
> CheatSheet.leo, available from the "Help" menu, has a short example 
> script under "Learning to be a leo Developer->Code academy->CA: icons"

-- 
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/efba739f-2ce9-419d-aa53-2bbd75b4524an%40googlegroups.com.


Re: Excessive Typing Lags

2022-07-15 Thread tbp1...@gmail.com
I don't think this is it, because my computer only has one drive and that's 
an SSD.  And it has a lot of empty space left.

On Friday, July 15, 2022 at 10:08:07 PM UTC-4 gates...@gmail.com wrote:

> I have noticed similar behavior on Windows 10, but only under extremely 
> specific circumstances that I have been able to figure out.
>
> I have a ‘storage spaces’ disk pool on my system — essentially a RAID 1 
> pool in everything but name.  This is backed by 2x 6TB 7200 RPM a 
> mechanical hard drives.  Windows has a habit of spinning those drives down 
> when the pool is not in use.  When I’m working on a Leo outline that lives 
> on that pool, or referenced a file somewhere on that pool, and the pool has 
> spun down, Leo (and anything else trying to access those disks) can freeze 
> for a solid 20 seconds while Windows spins up the drives.
>
> So… in my case, it’s definitely a Windows thing — specifically it not 
> playing well with mechanical drives in 2022 — so I’m not sure if this will 
> help you at all.  But I do find anecdotally that running the 
> ‘OptimizeDrive’ PowerShell command on the pool does seem to make spin-ups a 
> bit zippier for a week or so.  But that could definitely be 
> placebo/confirmation bias, too.
>
> -Jake
>
> On Jul 15, 2022, at 7:19 PM, tbp1...@gmail.com  wrote:
>
> Has anyone noticed annoying lags when typing into a Leo body?  This is on 
> Windows.  I can't reliably reproduce the behavior, but suddenly I type and 
> nothing will happen for 1/4, 1/2, even 1 second.  Then it will catch up.  
> It seems to be most likely to happen when the focus changes, such as 
> selecting a different node or switching to another window then back to 
> Leo.  But not always.
>
>
> This behavior has been getting more frequent, it seems to me.  I suspect 
> it has something to do with later Windows 10 updates, though I can't be 
> sure.  I also have experienced Windows apparently eating the first 
> keystroke after I change focus - nothing to do with Leo, it even happens 
> sometimes with the command.exe console.
>
> I've tried briefly with a Linux VM and not gotten these lags, but it may 
> be like a watched pot that never boils.
>
> -- 
> 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/e1f2e68f-fefe-48c7-99bd-829f864f7fcbn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/leo-editor/e1f2e68f-fefe-48c7-99bd-829f864f7fcbn%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/e6b667f0-2865-43c2-a80c-25d841f66d1en%40googlegroups.com.


Excessive Typing Lags

2022-07-15 Thread tbp1...@gmail.com
Has anyone noticed annoying lags when typing into a Leo body?  This is on 
Windows.  I can't reliably reproduce the behavior, but suddenly I type and 
nothing will happen for 1/4, 1/2, even 1 second.  Then it will catch up.  
It seems to be most likely to happen when the focus changes, such as 
selecting a different node or switching to another window then back to 
Leo.  But not always.

This behavior has been getting more frequent, it seems to me.  I suspect it 
has something to do with later Windows 10 updates, though I can't be sure.  
I also have experienced Windows apparently eating the first keystroke after 
I change focus - nothing to do with Leo, it even happens sometimes with the 
command.exe console.

I've tried briefly with a Linux VM and not gotten these lags, but it may be 
like a watched pot that never boils.

-- 
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/e1f2e68f-fefe-48c7-99bd-829f864f7fcbn%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-29 Thread tbp1...@gmail.com
Good! Let us know if there are any quirks ... maybe they can be worked 
out.  I've been happy so far myself.

On Wednesday, June 29, 2022 at 4:10:47 PM UTC-4 jkn wrote:

> Just tried it BTW - seems to be working fine, thanks!
>
>
> On Wednesday, June 29, 2022 at 3:13:12 PM UTC+1 tbp1...@gmail.com wrote:
>
>> And thanks for giving us the little nudge we needed to work on it : )
>>
>> On Wednesday, June 29, 2022 at 9:42:51 AM UTC-4 jkn wrote:
>>
>>> Thanks for the work on this little itch!
>>>
>>> Regard, Jon N
>>>
>>>
>>> On Wednesday, June 29, 2022 at 12:37:28 PM UTC+1 tbp1...@gmail.com 
>>> wrote:
>>>
>>>> The new PR has been merged into devel.
>>>>
>>>> On Wednesday, June 29, 2022 at 12:10:57 AM UTC-4 tbp1...@gmail.com 
>>>> wrote:
>>>>
>>>>> OK, a fix is proposed in PR 2700 
>>>>> <https://github.com/leo-editor/leo-editor/pull/2700>.  It wasn't an 
>>>>> off-by-one.  It was a missing bit of logic.  I needed to restrict the 
>>>>> movement to the end of the last line to the case where the cursor was 
>>>>> already on the last line when the Down key is pressed.  I have also 
>>>>> tested 
>>>>> using a wrapped last line and it works correctly in this case, too.
>>>>>
>>>>> On Tuesday, June 28, 2022 at 11:41:19 PM UTC-4 tbp1...@gmail.com 
>>>>> wrote:
>>>>>
>>>>>> Hmm, this is not quite working as I want.  If you place the cursor in 
>>>>>> the left-hand column of a line above the last line, and Shift-Down to 
>>>>>> the 
>>>>>> last line, the cursor jumps to the end of the last line.  It should go 
>>>>>> to 
>>>>>> the start of the last line.  This seems different from what I thought I 
>>>>>> had 
>>>>>> worked out.  I'll look at fixing it - probably an off-by-one error or 
>>>>>> some 
>>>>>> such.
>>>>>>
>>>>>> On Tuesday, June 28, 2022 at 6:34:12 PM UTC-4 tbp1...@gmail.com 
>>>>>> wrote:
>>>>>>
>>>>>>> @Edward has merged the PR.
>>>>>>>
>>>>>>> On Tuesday, June 28, 2022 at 1:12:03 PM UTC-4 Edward K. Ream wrote:
>>>>>>>
>>>>>>>> On Tue, Jun 28, 2022 at 11:33 AM Jacob MacDonald  
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> In the tbp directory, you need to run `git checkout 
>>>>>>>>> tbp-leo-general` and then should see the new code.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks, Jacob.  That worked.
>>>>>>>>
>>>>>>>> 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/859a07ba-711d-4b48-8f80-929fd63449e5n%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-29 Thread tbp1...@gmail.com
And thanks for giving us the little nudge we needed to work on it : )

On Wednesday, June 29, 2022 at 9:42:51 AM UTC-4 jkn wrote:

> Thanks for the work on this little itch!
>
> Regard, Jon N
>
>
> On Wednesday, June 29, 2022 at 12:37:28 PM UTC+1 tbp1...@gmail.com wrote:
>
>> The new PR has been merged into devel.
>>
>> On Wednesday, June 29, 2022 at 12:10:57 AM UTC-4 tbp1...@gmail.com wrote:
>>
>>> OK, a fix is proposed in PR 2700 
>>> <https://github.com/leo-editor/leo-editor/pull/2700>.  It wasn't an 
>>> off-by-one.  It was a missing bit of logic.  I needed to restrict the 
>>> movement to the end of the last line to the case where the cursor was 
>>> already on the last line when the Down key is pressed.  I have also tested 
>>> using a wrapped last line and it works correctly in this case, too.
>>>
>>> On Tuesday, June 28, 2022 at 11:41:19 PM UTC-4 tbp1...@gmail.com wrote:
>>>
>>>> Hmm, this is not quite working as I want.  If you place the cursor in 
>>>> the left-hand column of a line above the last line, and Shift-Down to the 
>>>> last line, the cursor jumps to the end of the last line.  It should go to 
>>>> the start of the last line.  This seems different from what I thought I 
>>>> had 
>>>> worked out.  I'll look at fixing it - probably an off-by-one error or some 
>>>> such.
>>>>
>>>> On Tuesday, June 28, 2022 at 6:34:12 PM UTC-4 tbp1...@gmail.com wrote:
>>>>
>>>>> @Edward has merged the PR.
>>>>>
>>>>> On Tuesday, June 28, 2022 at 1:12:03 PM UTC-4 Edward K. Ream wrote:
>>>>>
>>>>>> On Tue, Jun 28, 2022 at 11:33 AM Jacob MacDonald  
>>>>>> wrote:
>>>>>>
>>>>>> In the tbp directory, you need to run `git checkout tbp-leo-general` 
>>>>>>> and then should see the new code.
>>>>>>>
>>>>>>
>>>>>> Thanks, Jacob.  That worked.
>>>>>>
>>>>>> 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/86b8cbbd-bd8e-4cdb-9138-2c2ee8728d93n%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-29 Thread tbp1...@gmail.com
The new PR has been merged into devel.

On Wednesday, June 29, 2022 at 12:10:57 AM UTC-4 tbp1...@gmail.com wrote:

> OK, a fix is proposed in PR 2700 
> <https://github.com/leo-editor/leo-editor/pull/2700>.  It wasn't an 
> off-by-one.  It was a missing bit of logic.  I needed to restrict the 
> movement to the end of the last line to the case where the cursor was 
> already on the last line when the Down key is pressed.  I have also tested 
> using a wrapped last line and it works correctly in this case, too.
>
> On Tuesday, June 28, 2022 at 11:41:19 PM UTC-4 tbp1...@gmail.com wrote:
>
>> Hmm, this is not quite working as I want.  If you place the cursor in the 
>> left-hand column of a line above the last line, and Shift-Down to the last 
>> line, the cursor jumps to the end of the last line.  It should go to the 
>> start of the last line.  This seems different from what I thought I had 
>> worked out.  I'll look at fixing it - probably an off-by-one error or some 
>> such.
>>
>> On Tuesday, June 28, 2022 at 6:34:12 PM UTC-4 tbp1...@gmail.com wrote:
>>
>>> @Edward has merged the PR.
>>>
>>> On Tuesday, June 28, 2022 at 1:12:03 PM UTC-4 Edward K. Ream wrote:
>>>
>>>> On Tue, Jun 28, 2022 at 11:33 AM Jacob MacDonald  
>>>> wrote:
>>>>
>>>> In the tbp directory, you need to run `git checkout tbp-leo-general` 
>>>>> and then should see the new code.
>>>>>
>>>>
>>>> Thanks, Jacob.  That worked.
>>>>
>>>> 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/7a7b2335-8916-404f-963a-81922eb4fce9n%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-28 Thread tbp1...@gmail.com
OK, a fix is proposed in PR 2700 
<https://github.com/leo-editor/leo-editor/pull/2700>.  It wasn't an 
off-by-one.  It was a missing bit of logic.  I needed to restrict the 
movement to the end of the last line to the case where the cursor was 
already on the last line when the Down key is pressed.  I have also tested 
using a wrapped last line and it works correctly in this case, too.

On Tuesday, June 28, 2022 at 11:41:19 PM UTC-4 tbp1...@gmail.com wrote:

> Hmm, this is not quite working as I want.  If you place the cursor in the 
> left-hand column of a line above the last line, and Shift-Down to the last 
> line, the cursor jumps to the end of the last line.  It should go to the 
> start of the last line.  This seems different from what I thought I had 
> worked out.  I'll look at fixing it - probably an off-by-one error or some 
> such.
>
> On Tuesday, June 28, 2022 at 6:34:12 PM UTC-4 tbp1...@gmail.com wrote:
>
>> @Edward has merged the PR.
>>
>> On Tuesday, June 28, 2022 at 1:12:03 PM UTC-4 Edward K. Ream wrote:
>>
>>> On Tue, Jun 28, 2022 at 11:33 AM Jacob MacDonald  
>>> wrote:
>>>
>>> In the tbp directory, you need to run `git checkout tbp-leo-general` 
>>>> and then should see the new code.
>>>>
>>>
>>> Thanks, Jacob.  That worked.
>>>
>>> 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/a0ec00db-9c3e-4f95-9162-fa5792438dbcn%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-28 Thread tbp1...@gmail.com
Hmm, this is not quite working as I want.  If you place the cursor in the 
left-hand column of a line above the last line, and Shift-Down to the last 
line, the cursor jumps to the end of the last line.  It should go to the 
start of the last line.  This seems different from what I thought I had 
worked out.  I'll look at fixing it - probably an off-by-one error or some 
such.

On Tuesday, June 28, 2022 at 6:34:12 PM UTC-4 tbp1...@gmail.com wrote:

> @Edward has merged the PR.
>
> On Tuesday, June 28, 2022 at 1:12:03 PM UTC-4 Edward K. Ream wrote:
>
>> On Tue, Jun 28, 2022 at 11:33 AM Jacob MacDonald  
>> wrote:
>>
>> In the tbp directory, you need to run `git checkout tbp-leo-general` and 
>>> then should see the new code.
>>>
>>
>> Thanks, Jacob.  That worked.
>>
>> 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/5383868a-082f-4d24-aeca-d9aea192e687n%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-28 Thread tbp1...@gmail.com
@Edward has merged the PR.

On Tuesday, June 28, 2022 at 1:12:03 PM UTC-4 Edward K. Ream wrote:

> On Tue, Jun 28, 2022 at 11:33 AM Jacob MacDonald  
> wrote:
>
> In the tbp directory, you need to run `git checkout tbp-leo-general` and 
>> then should see the new code.
>>
>
> Thanks, Jacob.  That worked.
>
> 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/b9b812e4-f25d-4051-80ed-ff16e03be1d0n%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-28 Thread tbp1...@gmail.com
On Tuesday, June 28, 2022 at 2:11:43 AM UTC-4 Edward K. Ream wrote:

> On Monday, June 27, 2022 at 1:42:26 PM UTC-5 tbp1...@gmail.com wrote:
>
>> PR 2698 <https://github.com/leo-editor/leo-editor/pull/2698> handles 
>> this (when merged).
>>
>
> I'm having trouble testing the code. Maybe I'm not using git correctly. 
> Here's what I did:
>
> - In the PR's main page, I clicked the link that says 
> tbpassin:tbp-leo-general.
>   That takes me to this page: 
> https://github.com/tbpassin/leo-editor/tree/tbp-leo-general
>
> - In that page, I copied the "Code" link, whose contents is:
>   https://github.com/tbpassin/leo-editor.git
>
> - In my Repos directory, I did `git clone 
> https://github.com/tbpassin/leo-editor.git tbp`
>

I navigated to that page.  When you press the "Code" button (as you did),  
you also get an option to download a zip file.  I downloaded it and yes, it 
does have my changes.

-- 
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/c7355581-6ef7-4924-9193-385c859d54b3n%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-28 Thread tbp1...@gmail.com
After I pushed my change to Github, Github recognized that I had made a 
commit and offered to create a PR, which I accepted.  So at that time 
Github knew there had been a commit.  I also see that the changes are in my 
Github leo-editor repo, starting at line 1796 in qt_text.py.

The branch is not devel but tbp-leo-general.

Otherwise, I can't help you with git mysteries.  I always get lost!

On Tuesday, June 28, 2022 at 2:11:43 AM UTC-4 Edward K. Ream wrote:

> On Monday, June 27, 2022 at 1:42:26 PM UTC-5 tbp1...@gmail.com wrote:
>
>> PR 2698 <https://github.com/leo-editor/leo-editor/pull/2698> handles 
>> this (when merged).
>>
>
> I'm having trouble testing the code. Maybe I'm not using git correctly. 
> Here's what I did:
>
> - In the PR's main page, I clicked the link that says 
> tbpassin:tbp-leo-general.
>   That takes me to this page: 
> https://github.com/tbpassin/leo-editor/tree/tbp-leo-general
>
> - In that page, I copied the "Code" link, whose contents is:
>   https://github.com/tbpassin/leo-editor.git
>
> - In my Repos directory, I did `git clone 
> https://github.com/tbpassin/leo-editor.git tbp`
>
> - cd tbp
>
> - I don't see the new code, and gitk doesn't show any commits.
>
> I wonder what I did wrong.
>
> 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/72dd2d12-4b56-4bae-8f56-efdd2905b4bcn%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-27 Thread tbp1...@gmail.com


On Monday, June 27, 2022 at 4:00:10 PM UTC-4 jkn wrote:

> That is how I would explain the desired action, and thank you for working 
> on the PR (and Edward for raising it); I will try it shortly.
>
Wait until the PR is actually accepted and merged ... it's not yet ... 

-- 
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/a3610b02-ea6a-4e6e-81d7-efccea69276an%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-27 Thread tbp1...@gmail.com
I think the new way it works agrees with the principle of minimum 
surprise.  At least, I was always surprised when Shift-Down *didn't* select 
the last line.  And with this change, a down arrow without a Shift puts the 
cursor at the end of the last line, which is also what I seem to expect.

I suppose an alternative would have been to have Shift-Down insert a new 
line at the bottom and select to there, but I didn't favor that because an 
unrequested insert can be a surprise - and when the selected line gets 
deleted, which has to be the most common use case, should the newly 
inserted line be deleted too?  Hmm

I'd rather not make it configurable unless someone complains.  Why 
complicate the code when chances are everyone will like the new way, if 
they even notice?
On Monday, June 27, 2022 at 4:00:10 PM UTC-4 jkn wrote:

> That is how I would explain the desired action, and thank you for working 
> on the PR (and Edward for raising it); I will try it shortly.
>
> I would suggest that it is made a configurable option; as I mention I am 
> sure I have seen something like this as a configurable option
> in A.N.Other editor. I am trying to remember which. It may be that the new 
> action is annoying to some.
>
> It was probably connected with the idea of 'virtual space; whether you can 
> navigate with the cursor beyond the end of text
> in a node. Leo doesn't let you do this. Some editors do; then if you start 
> adding characters, they fill the space between
> the previous end of text in that node, and your current cursor position, 
> with a combination of EOLs and spaces.
>
> I see that Notepad++ has an 'enable scrolling beyond last line' option, 
> which is probably similar. Note that
> (I'm not requesting this feature for Leo...
>
> Thanks, J^n
>
>
> On Monday, June 27, 2022 at 4:02:25 PM UTC+1 tbp1...@gmail.com wrote:
>
>> I understand that the desired action is this:
>>
>>If the cursor is on the last line of the body and SHIFT-DOWN is 
>> pressed, then the selection will be extended to include the entire last 
>> line.
>>The cursor will also move to the end of the last line.
>>
>> Is there anything else that should happen, or any other user action that 
>> should be included?
>>
>>
>>
>> On Monday, June 27, 2022 at 9:28:29 AM UTC-4 Edward K. Ream wrote:
>>
>>> On Monday, June 27, 2022 at 8:23:38 AM UTC-5 Edward K. Ream wrote:
>>>
>>> I agree this can be annoying. Do you want to attempt a fix?
>>>>
>>>
>>> I have just created #2697 
>>> <https://github.com/leo-editor/leo-editor/issues/2697> for this 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/544c211f-bd51-4d1c-8049-7110a64ba615n%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-27 Thread tbp1...@gmail.com
PR 2698 <https://github.com/leo-editor/leo-editor/pull/2698> handles this 
(when merged).

On Monday, June 27, 2022 at 11:02:25 AM UTC-4 tbp1...@gmail.com wrote:

> I understand that the desired action is this:
>
>If the cursor is on the last line of the body and SHIFT-DOWN is 
> pressed, then the selection will be extended to include the entire last 
> line.
>The cursor will also move to the end of the last line.
>
> Is there anything else that should happen, or any other user action that 
> should be included?
>
>
>
> On Monday, June 27, 2022 at 9:28:29 AM UTC-4 Edward K. Ream wrote:
>
>> On Monday, June 27, 2022 at 8:23:38 AM UTC-5 Edward K. Ream wrote:
>>
>> I agree this can be annoying. Do you want to attempt a fix?
>>>
>>
>> I have just created #2697 
>> <https://github.com/leo-editor/leo-editor/issues/2697> for this 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/c54861ef-1dc4-41e4-bae4-d83f98bf1106n%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-27 Thread tbp1...@gmail.com
I understand that the desired action is this:

   If the cursor is on the last line of the body and SHIFT-DOWN is pressed, 
then the selection will be extended to include the entire last line.
   The cursor will also move to the end of the last line.

Is there anything else that should happen, or any other user action that 
should be included?



On Monday, June 27, 2022 at 9:28:29 AM UTC-4 Edward K. Ream wrote:

> On Monday, June 27, 2022 at 8:23:38 AM UTC-5 Edward K. Ream wrote:
>
> I agree this can be annoying. Do you want to attempt a fix?
>>
>
> I have just created #2697 
>  for this 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/c0c0368a-f39c-480e-9e0a-7cf88e145888n%40googlegroups.com.


Re: Another small Q: selecting test and text endings

2022-06-27 Thread tbp1...@gmail.com
I get annoyed by this too.  If you just want to move the line up, a line or 
block of lines can be moved with CNTL-Uparrow and CNTL-Downarrow.  These 
are a useful habit to acquire, even though it doesn't solve the case where 
you actually do want to select the last line.

On Monday, June 27, 2022 at 4:24:58 AM UTC-4 jkn wrote:

> (I am scratching a few small itches at the moment...)
>
> My particular use case is this. If I am on the last line of the body of a 
> node,
> and my cursor is at the beginning of that line, then I cannot select the 
> line by
> . I have to either:
>
> - use  instead (inconsistent)
> - add an EOL to the line and then retry.
>
> I had vaguely thought that there were some Leo settings relating to 
> selection and
> cursor movement around line endings, which might govern this.
> However I can't find them - perhaps I am thinking of a different editor.
>
> Am I missing something?
>
> Thanks, 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/3db1b112-c311-46c6-9071-4345645c5f3dn%40googlegroups.com.


Re: Most of the GlobalConfigManager is gone!

2022-06-24 Thread tbp1...@gmail.com
The Nav tab is my friend : )

On Friday, June 24, 2022 at 10:39:54 PM UTC-4 Edward K. Ream wrote:

> On Fri, Jun 24, 2022 at 4:51 PM tbp1...@gmail.com  
> wrote:
>
>> This actually occurs in two places.
>>
>
> Thanks.  I missed one of the places the first time!
>
> 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/cd8dd4a2-6f6e-4061-8473-4f34957231cfn%40googlegroups.com.


Re: Most of the GlobalConfigManager is gone!

2022-06-24 Thread tbp1...@gmail.com
This actually occurs in two places.

On Friday, June 24, 2022 at 5:29:11 PM UTC-4 Félix wrote:

> oh, just posted under the closed pull request but since i discovered this 
> thread exists on the forum i'll post it here instead: 
>
> in leoGlobals, in the getBaseDirectory method, this should be a getString, 
> not a getBool
>
> *base = c.config.getBool('relative-path-base-directory')*
> Félix
>
> On Friday, June 24, 2022 at 10:17:40 AM UTC-4 Edward K. Ream wrote:
>
>> PR #2692  contains a 
>> grand simplification of Leo's config code! 
>>
>> The GCM no longer sets ivars or specifies defaults. This eliminates a lot 
>> of code and data. More importantly, the GCM is no longer involved in policy 
>> questions. Rather than using g.app.config ivars, code throughout Leo calls 
>> c.config.get* to get settings. 
>>
>> More testings is needed, but I expect the ekr-config branch to be part of 
>> Leo 6.6.3.
>>
>> 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/60eb0b1d-9f2a-41c8-91b6-70411bf997ebn%40googlegroups.com.


Re: A couple of small points re. node expand/contract

2022-06-21 Thread tbp1...@gmail.com
Looks to me like an simple oversight.  In leoSettings.leo (where the base 
key bindings are defined), Alt-[ is mapped to contract-node but only in 
emacs mode.  Alt-] is mapped to expand-node in both regular and emacs 
modes.  I didn't find any other mapping for Alt-[ that would conflict.

I'd just go ahead and put it into your myLeoSettings.leo file if you 
haven't already done so.

On Monday, June 20, 2022 at 8:14:39 AM UTC-4 jkn wrote:

> A couple of minor observations/questions.
>
> 1) Alt+] is mapped to 'expand node' by default. Any reason why Alt+[ is 
> not mapped to 'contract-node' by default?
>
> 2) I would find it useful to have a 'toggle expand node' shortcut, so the 
> same keystroke will toggle the expand state of the current node. I have a 
> feelingthat I wrote such a command a long time ago. I will try to hunt it 
> down, or re-create ... but would this be a good candidate to be a built-in 
> 'primitive' within Leo?
>
> 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/a78dc1c2-ccac-4a48-aa25-83170983490fn%40googlegroups.com.


Re: Pls read: new directions for Leo

2022-06-18 Thread tbp1...@gmail.com
I switched subjects a bit but I see I wasn't clear enough.,  

>
> Personally, I think these capabilities would be very helpful:
>>
>> 1. When a stack trace outputs a line/position in a file (which could be, 
>> say, a Python standard library module, not necessarily your own code), 
>> control-click would open that file for you and navigate to the location;
>>
>
> I wasn't thinking along those lines. When the data are in an outline, we 
> can use clones to filter and reorganize the nodes.
>
> Edward
>

I was talking about when we get a stack trace during execution of some code 
that's in a Leo outline.  The trace shows a number of steps with file names 
and line numbers.  If a step occurs in a file that is in a Leo outline, it 
would be useful to be able to go directly to the particular line in right 
node in the outline.  If the step occurs in a non-Leo file, it would be 
helpful to open that file and go directly to the right line.  I realize 
this isn't quite on-topic, but the subject got me thinking about other ways 
to make study and debugging easier and more effective.

-- 
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/e9b2a666-d6c0-4420-86c5-34d039bfe23dn%40googlegroups.com.


Re: Pls read: new directions for Leo

2022-06-17 Thread tbp1...@gmail.com
Leaving aside a possible customized debugger, is this the concept?

1. Some utility, possibly a debugger, possibly special trace statements, 
outputs information directly into a Leo outline (I would prefer that it not 
be the outline under test);
2. Use clone-xx with predicates on this outline to extract nodes of 
interest that may be related;

Personally, I think these capabilities would be very helpful:

1. When a stack trace outputs a line/position in a file (which could be, 
say, a Python standard library module, not necessarily your own code), 
control-click would open that file for you and navigate to the location;

2. Have the debugger highlight the current line in its actual node in its 
Leo outline, instead of just giving the line number in the generated 
script-file.

3. Having some convenient way to monkey patch a routine to add traces and 
print statements temporarily without actually modifying the original 
outline.  This is less important because one can always use @Edward's 
approach of modifying the code but running another Leo session to test it 
(or, if running it as an external file, you can just run it) so at least 
you don't have to keep closing and reopening Leo each time you make a 
change.

On Friday, June 17, 2022 at 4:45:22 AM UTC-4 Edward K. Ream wrote:

> On Thursday, June 16, 2022 at 9:23:50 AM UTC-5 Edward K. Ream wrote:
>
> - Aha: A special-purpose debugger can collect arbitrary dynamic *python 
> *data. 
>>
>
>
> This supposed Aha looks more like a brain spike :-) I have no idea why I 
> thought a special purpose debugger might help gather data.
>
> The easy way to collect python data is with added python statements in the 
> source code that I'm studying.  In contrast, using a debugger to gather 
> data would be roundabout, slow and obscure.
>
> Perhaps I was thinking that an enhanced g.SherlockTracer class could 
> gather python data, not text traces, but I if so I was almost certainly 
> jumping to conclusions.
>
> 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/7791af6c-035f-4180-8b10-ca1b0e4f4ccbn%40googlegroups.com.


Re: Need help - any backup by default?

2022-06-14 Thread tbp1...@gmail.com
Yes, there's a place for both.  I usually have a lot of files or even 
projects that don't seem to fit a Github repo.  I don't feel inclined to 
echo my whole hard drive to Github, and anyway, I re-organize parts often 
enough that keeping a Github repo up with them would be a real pain.

I do have some of those things in my own on-computer Mercurial repo, though.

On Tuesday, June 14, 2022 at 10:56:06 AM UTC-4 Edward K. Ream wrote:

> On Tue, Jun 14, 2022 at 8:32 AM tbp1...@gmail.com  
> wrote:
>
>> Whew! Glad to hear it.  I have gotten into the habit of saving frequently 
>> (not just with Leo), and backing up my drive frequently, too.
>>
>
> I suggest backing up to a free GitHub repo. It should be safer than 
> physical backups.
>
> 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/982e83e0-ed34-4c2a-9d4b-057445b76aefn%40googlegroups.com.


Re: Need help - any backup by default?

2022-06-14 Thread tbp1...@gmail.com
Whew! Glad to hear it.  I have gotten into the habit of saving frequently 
(not just with Leo), and backing up my drive frequently, too.

On Tuesday, June 14, 2022 at 9:22:08 AM UTC-4 Luka wrote:

> I found a copy of my .leo file in the system tmp directory! Today I am 
> lucky. Actually it was a reminder for me to always make backups of 
> everything. The problem seems to be not in Leo, but in the file system in 
> this case.
>
> вт, 14 июн. 2022 г., 12:56 Luka :
>
>> Please help!
>>
>> Leo did not save my .leo file, so I have zero size file with all data 
>> lost. Does leo make any backup files by default, so that I could restore my 
>> data?
>>
>

-- 
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/ac165899-fe71-4f6b-829a-9cce3960ed29n%40googlegroups.com.


Re: Repairing Windows System Files

2022-06-12 Thread tbp1...@gmail.com
You don't have to do each step separately first, but if you don't give the 
right leadin, you won't even see the help options.  E.g., if you type

dism  /?

then "/cleanup-image" will not be one of the options listed.  "/online" 
will be listed, and you have to know to ask for 

dism /online /?

and then "/cleanup-image" will be be listed.  If you want to discover 
"/checkhealth ", "/scanhealth", or "restorehealth" you have to include 
"/cleanup-image":

dism /online /cleanup-image  /?

On Sunday, June 12, 2022 at 4:08:54 PM UTC-4 David Szent-Györgyi wrote:

> On Sunday, June 12, 2022 at 3:35:17 PM UTC-4 tbp1...@gmail.com wrote:
>
>> You cannot get help on, e.g., "/cleanup-image", or even learn that it 
>> exists, unless you prefix the help command with the "/online" .  It seems 
>> that dism can do so many things that the help system had to become 
>> complicated, too.
>>
>
> You mean that one has to enter the command *dism /?*
>
> then 
> *dism /online /?*
> then 
>
> *dism /online /cleanup-image /?*The same is true of PowerShell's built-in 
> help: one has to drill down, one argument at a time. One must know which 
> argument to give at each step. That would be easier if Microsoft chose more 
> wisely when coining names!
>

-- 
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/dddec83d-e543-4e28-bd9a-64c40c6382f0n%40googlegroups.com.


Re: Repairing Windows System Files

2022-06-12 Thread tbp1...@gmail.com
On Sunday, June 12, 2022 at 3:14:06 PM UTC-4 David Szent-Györgyi wrote:

> On Sunday, June 12, 2022 at 10:03:54 AM UTC-4 tbp1...@gmail.com wrote:
>
>> The help text for dism is mostly unintelligible to ordinary computer 
>> users.  You would have to know a lot of Microsoft-specific OS details to 
>> make sense of most of it.  The only help command likely to be helpful for 
>> most of us is
>>
>> dism /online /cleanup-image /?
>>
>
> I am not in front a WIndows computer, so I cannot see the response to that 
> command. Am I correct that the response is display of the options for 
> performing cleanup or recovery operations on the operating system as 
> installed on the computer that is providing the command line?
>

Yes, that's right.  But there is another wrinkle. You cannot get help on, 
e.g., "/cleanup-image", or even learn that it exists, unless you prefix the 
help command with the "/online" .  It seems that dism can do so many things 
that the help system had to become complicated, too.

-- 
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/36f9cde8-496e-418f-a232-9942905bb43dn%40googlegroups.com.


Re: Repairing Windows System Files

2022-06-12 Thread tbp1...@gmail.com
The help text for dism is mostly unintelligible to ordinary computer 
users.  You would have to know a lot of Microsoft-specific OS details to 
make sense of most of it.  The only help command likely to be helpful for 
most of us is

dism /online /cleanup-image /?


On Sunday, June 12, 2022 at 9:26:35 AM UTC-4 David Szent-Györgyi wrote:

> The terminology used with Microsoft's *dism* gives specific new meanings 
> to terms widely used in broader contexts. Keep in mind these specific 
> meanings: 
>
> WIM file a "Windows image" file, used for deployment of Windows Vista and 
> more recent versions of Windows; extension .wim
> VHD and VHDX files "Virtual hard disk", other types of file containing 
> disk images; extensions .vhd and .vhdx
> /Online targets the installation of Windows that is in use
> /Image targets a specified WIM file , VHD, or VHDX file. 
> store from British usage, a place in which items are routinely kept; 
> distinct from the North American usage for a shop)
>
> Links of interest: 
> Repair a Windows Image 
> ;
>  
> includes dism usage for checking whether an image is repairable, for 
> detecting corruption as well as for making repairs
> Windows Imaging Format 
> , on Wikipedia 
> VHD (file format) , on 
> Wikipedia, covering VHDX as well
> DISM Overview 
> ,
>  
> Microsoft's documentation, not written for the general reader
>

-- 
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/9f5ba602-208f-4f30-ade3-1dddb4e304c3n%40googlegroups.com.


Re: Repairing Windows System Files

2022-06-12 Thread tbp1...@gmail.com
I had one case where I had to run sfc several times before it reported no 
problems.  Then I ran dism and it found (and repaired) more.  That seems to 
be in line with what you wrote.  I haven't studied all the command line 
options for the tool.

On Sunday, June 12, 2022 at 8:13:44 AM UTC-4 David Szent-Györgyi wrote:

> On Saturday, June 4, 2022 at 5:57:21 PM UTC-4 tbp1...@gmail.com wrote:
>
>> I don't know when to prefer one over another.  I run sfc first, perhaps 
>> because it's easier to remember the command line.  If problems are found 
>> and claimed to be fixed, it's probably good to repeat the scan.
>>
>> I mention these utilities even though they are not Leo-specific, because 
>> it's hard to discover them online and I have found them helpful.
>>
>
> If my reading of the explanation below is correct, it is best to use 
> *dism* before using *sfc*. The following is an excerpt from Using the 
> Deployment Image Servicing and Management Tool (DISM) to repair the Windows 
> System Store 
> <https://www.dell.com/support/kbdoc/en-us/000122035/how-to-use-the-deployment-image-servicing-and-management-tool-dism-to-repair-the-windows-system-store:>
> .
>
> *The System File Checker tool can be used to repair corrupted system 
> files. For more information on how to use the tool, refer to the following 
> Microsoft article: Use the System File Checker tool to repair missing or 
> corrupted system files <https://support.microsoft.com/en-us/kb/929833>. The 
> System File Checker tool compares those files against the .wim store that 
> is saved on the system (not to be confused with the Windows Software Store 
> app where you can purchase software for Windows). If this store is 
> corrupted, the repairs may not resolve the problems that the system is 
> having. The DISM tool has some modifiers that can scan and repair the .wim 
> store based on parent copies stored on Microsoft’s update servers, making 
> it useful to run in conjunction with a system file check.*
>

-- 
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/027d868c-c78c-4c32-8486-b8aae627e3dbn%40googlegroups.com.


"Invisible XML"

2022-06-10 Thread tbp1...@gmail.com
"Invisible XML" is a project that is able to take any text document 
parseable by a context-free grammar and turn it into an XML document.  Then 
it could be processed by any XML tools in a processing pipeline and even 
turn the result back into a non-XML document.

The key insight is that a parser for the grammar of the document can output 
an abstract syntax tree, and any AST can be represented by an XML 
document.  From the announcement on xml.com:

"Invisible XML, as explained 
 right here on 
XML.com, is a language for describing the implicit structure of data, and a 
set of technologies for making that structure explicit as XML markup. It 
allows you to write a declarative description of the format of some text 
and then leverage that format to represent the text as structured 
information."

See Invisible XML 1.0 has been released 
, and Invisible XML 
.

-- 
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/b5914a42-915f-434a-ac2f-2a939eb889a5n%40googlegroups.com.


Re: Looking at the "reload-settings" command

2022-06-08 Thread tbp1...@gmail.com
" Thomas seems to think that *not* saving settings files is less 
surprising, but I have some doubts."  No,  I think that settings files 
*should* be saved.  Not other files, though.  I suppose the risk is that 
you changed a setting in some other file and forgot to save it.  Then the 
new local setting won't take effect after reloading settings, which would 
be a surprise.

But wait, I've been assuming that settings could be reloaded from in-memory 
outlines. But that's not the case, is it?  They only get re-read as the 
outline gets opened.  In that case, I should cancel what I said: all files 
except an unnamed one should get saved first after all.   Or the local 
outline settings should get re-read from the outline as it is in memory, 
but that's probably too big a change.

On Wednesday, June 8, 2022 at 2:53:42 PM UTC-4 Edward K. Ream wrote:

> On Wed, Jun 8, 2022 at 12:51 PM jkn  wrote:
>
>> "reload settings" from where? From "settings file(s) from disk", or from 
>> "settings file(s) on disk, perhaps overridden by any held in memory"?
>>
>
> From disk, except for per-installation and per-machine settings as 
> described here .  
> The per-installation and per-machine settings aren't going to change, and 
> in any event they are last-ditch defaults.
>  
>
>> I would think the former.
>>
>
> Yes. The point of reload-settings is to recompute all settings as 
> necessary. There is no concept of (settings held in memory).
>
>> Perhaps saving files is a safety measure; I can see the command changing 
>> things underneath you in a way that might be ... surprising
>>
>
> Big sigh. What, exactly, is the least surprising option? Thomas seems to 
> think that *not* saving settings files is less surprising, but I have 
> some doubts.
>
> I agree that reload-settings should (at most) save only myLeoSettings.leo, 
> leoSettings.leo and the presently-selected (active) .leo file.
>
> I'm starting to think the simplest thing that could possibly work would be 
> to have reload-settings save *no* files. That gives the user the most 
> "control". But dash it all, one could plausibly argue that it would be less 
> surprising to "honor" the settings in all open files.
>
> Imo, this is mostly a tempest in a teapot. I don't care much either way.
>
> 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/7763a88d-c5a6-4235-b878-d15ff113e5dbn%40googlegroups.com.


Re: Looking at the "reload-settings" command

2022-06-08 Thread tbp1...@gmail.com
Since reloading settings will not close Leo, I don't see any reason to save 
any files except for unsaved settings files.  Sometimes people leave 
unsaved files on purpose - in case they want to scrap their changes by 
closing an outline without saving - so let's not surprise those folks by 
saving their file unexpectedly.

On Wednesday, June 8, 2022 at 9:11:37 AM UTC-4 Edward K. Ream wrote:

> On Tue, Jun 7, 2022 at 10:58 PM Félix  wrote:
>
>> I'm looking at the reload-settings command, which has the following doc 
>> string : "*Reload settings for the selected outline, saving it if 
>> necessary."* and i'm wondering why it tries to save all unsaved opened 
>> documents instead of only the currently active one?
>
>
> The unsaved outlines could include myLeoSettings.leo (and even 
> leoSettings.leo), but yes, I suppose the code could just save those two (if 
> changed) and the currently active outline.
>
> I agree that trying to save an unnamed outline is unnecessary.
>
> Please feel free to submit a PR :-)
>
> 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/c4363571-9ba1-4df8-9c75-b04a33752f61n%40googlegroups.com.


Re: Please upvote Thomas's gf4 project

2022-06-07 Thread tbp1...@gmail.com
I sent this to Edward, who asked me to repost it here.  It's about screen 
shots of the old ancestor to GF4, still running in a DOSBOX virtual DOS 
machine.  As a reminder, back then DOS graphics mode had a resolution of 
320 X 200 pixels across the screen.

 "Just for laughs, here is a screen shot of the old version running in 
DOSBOX.  It's called "gstat" here instead of "gf2" because I had two 
versions with a somewhat different but overlapping set of functions in 
each.  Gstat had curve smoothing, gf2 had the FFT routine. By "old" I'm 
talking circa 1990. 

Notice the noisy damped sine wave, just like we created in our Zoom tour of 
gf4.  The gf2 screen shot shows a log-log view of the FFT of the damped 
sine wave, again just as we did in our tour. 

Back then I didn't have the button window.  All functions except the curve 
generators were dispatched from menus, most with keyboard accelerators.  I 
couldn't afford the screen real estate for a button window! - although my 
windows manager would have had no trouble supporting one.  The curve 
generation panel could be disappeared to make more room for the curve. 

As I mentioned during our tour, the upper and lower scale labels on the 
vertical axis were actually calculator boxes if clicked on. Gf4 doesn't 
have that! The label "random noise" was generated by the program and would 
become the file name if the curve were saved.  The label is a clickable 
single-line edit box. 

All graphics elements on the screen except for graphics primitives were 
provided by my windows manager.  The font was an 8 X 8 pixel fixed width 
font provided by the TurboPascal graphics package. 

The half-tone effect in the background was a texture provided by the 
TurboPascal graphics package.  I found I liked it a lot and made it the 
default, though it seems unconventional today (I still like it, though). 

Not gf4, but a recognizable ancestor. "


On Sunday, June 5, 2022 at 6:16:28 PM UTC-4 Edward K. Ream wrote:

> On Sun, Jun 5, 2022 at 8:51 AM tbp1...@gmail.com  
> wrote:
>
>> I've added a link and screen shot to GF4 on my home page 
>> <http://tompassin.net>.
>>
>
> A suggestion: Announce gf4 on the python announcements list 
> <https://mail.python.org/mailman3/lists/python-announce-list.python.org/>. 
> I would add links to the gf4 repo and your home page.
>
> 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/78ed1441-9b44-45f3-a9ca-6857eece712en%40googlegroups.com.


Re: Please upvote Thomas's gf4 project

2022-06-05 Thread tbp1...@gmail.com
I've added a link and screen shot to GF4 on my home page 
<http://tompassin.net>.

On Sunday, June 5, 2022 at 7:07:18 AM UTC-4 Edward K. Ream wrote:

> On Sat, Jun 4, 2022 at 4:42 PM tbp1...@gmail.com  
> wrote:
>
>> Thanks, Edward, for the kind words!
>>
>> BTW, in our zoom meeting I mentioned that the original GUI version, which 
>> I called "GF2" was written in Turbo Pascal as a DOS graphics mode program.  
>> For those who don't remember, DOS graphics mode had a resolution of 320 X 
>> 200, and those few pixels took up the whole screen.  Talk about blocky!  
>> The old binary will still run, even today, in a DOS emulator such as DOSBOX!
>>
>
> :-)
>
> 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/4b49c4e3-3510-473f-97e3-67c4ab65251fn%40googlegroups.com.


Repairing Windows System Files

2022-06-04 Thread tbp1...@gmail.com
Sometimes Windows system files get corrupted.  This may happen because of a 
crash, or who knows why else.  It has happened to me several times.  
Sometimes you won't even know of a problem.  Other times something won't 
work right and you can't see why.

There are a few ways to discover system file corruption and to have Windows 
repair them.  The two I have used are both command line programs to be 
launched from an administrative console.

1. sfc ("system file check").  Run it with this command line:

sfc /scannow

With this parameter, it will start an immediate scan and repair or replace 
damaged system files in place.  It will take some time, but you can keep 
working during the scan.

2. dism ("Deployment Image Servicing and Management tool").  Command line:

dism /online /cleanup-image /restorehealth

Again the scan will take time and you can keep working.  The programs may 
not tell you, but it's probably a good idea to reboot if they have fixed a 
problem.

I don't know when to prefer one over another.  I run sfc first, perhaps 
because it's easier to remember the command line.  If problems are found 
and claimed to be fixed, it's probably good to repeat the scan.

I mention these utilities even though they are not Leo-specific, because 
it's hard to discover them online and I have found them helpful.

-- 
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/1c2a51fc-6f0c-46eb-876a-9e30591b9ea2n%40googlegroups.com.


Re: Please upvote Thomas's gf4 project

2022-06-04 Thread tbp1...@gmail.com
Thanks, Edward, for the kind words!

BTW, in our zoom meeting I mentioned that the original GUI version, which I 
called "GF2" was written in Turbo Pascal as a DOS graphics mode program.  
For those who don't remember, DOS graphics mode had a resolution of 320 X 
200, and those few pixels took up the whole screen.  Talk about blocky!  
The old binary will still run, even today, in a DOS emulator such as DOSBOX!

On Saturday, June 4, 2022 at 9:07:55 AM UTC-4 Edward K. Ream wrote:

> Thomas gave me the grand tour of gf4 yesterday on zoom. It's an amazing 
> project.
>
> gf4  deserves to be widely 
> recognized. If you agree, please click on the "Starred" button in the upper 
> right.
>
> 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/c0e21fe1-fa17-4be0-8cc6-5d2d691bd490n%40googlegroups.com.


Parsing and refactoring FORTRAN code with XML

2022-05-31 Thread tbp1...@gmail.com
Somewhat related and somewhat complementary to @Edward's post about 
displaying JSON in Leo, here is an article on parsing FORTRAN into XML to 
make its structure more apparent and to run transforms on it:

Parsing and refactoring FORTRAN code with XML 


-- 
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/dd35edcd-bc44-4e63-a47c-8a49bfe90e59n%40googlegroups.com.


Re: Updated Leo 6.6.2 released

2022-05-25 Thread tbp1...@gmail.com
It's working with Python 3.6.9 on Linux Mint..

On Wednesday, May 25, 2022 at 6:33:32 AM UTC-4 Edward K. Ream wrote:

> An updated version Leo 6.6.2 is now available on GitHub 
>  and pypi 
> . The updated version runs on Python 
> 3.6. The previous version didn't.
>
> This will be the official 6.6.2 version unless truly serious problems 
> arise. We'll fix minor problems in the 6.6.3 cycle. Nevertheless, I'll wait 
> until Friday to announce 6.6.2 publicly.
>
> Once again, thanks for all your testing.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/0408cb72-3930-43e8-b148-d7c733ff08f1n%40googlegroups.com.


Re: Leo 6.6.2 released

2022-05-24 Thread tbp1...@gmail.com
Apparently we don't support Python 3.6 any more?

Using Python3.6.9:

tom@tom-VirtualBox:~$ python3 -m leo.core.runLeo
module 're' has no attribute 'Pattern'
*** Leo could not be started ***

On Tuesday, May 24, 2022 at 9:46:54 AM UTC-4 Edward K. Ream wrote:

> Leo http://leoeditor.com 6.6.2 is now available on GitHub 
>  and pypi 
> .  Thanks to all those who have 
> contributed to this release.
>
> I'll wait until this Friday, May 27 to announce this release widely. There 
> is still time for last-minute changes.
>
> *The highlights of Leo 6.6.2*
>
>- Add "File Only" option in Leo's Find Pane.
>- Remove pylint-leo.py, pyflakes-leo.py and related code.
>- Add mypy annotations for Leo's most important files.
>- Fixed 9 minor bugs
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/165674e6-71b2-47a6-b89f-fa5d1b390c63n%40googlegroups.com.


Re: Leo 6.6.2b1 released without public announcements

2022-05-24 Thread tbp1...@gmail.com
Actually, there should not be a toggle command because the control is a 
radiobutton.  It should a "set" command. And I already provide a 
*set-find-file-only* command in LeoFind.py:

@cmd('set-find-file-only')
def set_find_scope_file_only(self, event: Event=None) -> None:  # pragma: 
no cover (cmd)
"""Set the 'File Only' radio button in the Find tab."""
self.set_find_scope('file-only')

So I think we're good.
On Monday, May 23, 2022 at 5:56:29 PM UTC-4 tbp1...@gmail.com wrote:

> No, I didn't realize there should be such a command.  I'll take a look at 
> adding it (not for 6.6.2, of course!).
>
> Please don't remove the code from devel even if you remove it from the 
> release branch.  For a PR with the new command, I will have to have a fully 
> merged branch that is otherwise up to date with devel, and if you remove 
> the code from devel, it will wipe out mine.  That will make things much 
> harder for me.
>
> On Monday, May 23, 2022 at 5:35:02 PM UTC-4 Edward K. Ream wrote:
>
>> On Monday, May 23, 2022 at 4:21:38 PM UTC-5 Edward K. Ream wrote:
>>
>> 1. I mistakenly merged PR #2671 
>>> <https://github.com/leo-editor/leo-editor/pull/2671> into the 6.6.2 
>>> branch from devel.  So now we get to test Thomas's new code :-)
>>>
>>
>> Rev d973bb in devel lower cases the 'file only' label, indicating that 
>> there is no Alt-Ctrl shortcut for it the radio button.  
>>
>> Thomas, I don't see a toggle-find-file option in the PR #2665 
>> <https://github.com/leo-editor/leo-editor/pull/2665>. For completeness 
>> it should probably exist, along with the typical Alt-Ctrl shortcuts. But we 
>> should leave all this for 6.6.3.  The more I think about this, the more I 
>> think I should (somehow!) undo the merge of the PR.  I'll try tomorrow when 
>> I have my wits about me :-)
>>
>> 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/a0523be0-b2f0-4852-be16-919a4889c299n%40googlegroups.com.


Re: Leo 6.6.2b1 released without public announcements

2022-05-23 Thread tbp1...@gmail.com
I just installed with pip and got 6.6.1.

On Monday, May 23, 2022 at 5:56:29 PM UTC-4 tbp1...@gmail.com wrote:

> No, I didn't realize there should be such a command.  I'll take a look at 
> adding it (not for 6.6.2, of course!).
>
> Please don't remove the code from devel even if you remove it from the 
> release branch.  For a PR with the new command, I will have to have a fully 
> merged branch that is otherwise up to date with devel, and if you remove 
> the code from devel, it will wipe out mine.  That will make things much 
> harder for me.
>
> On Monday, May 23, 2022 at 5:35:02 PM UTC-4 Edward K. Ream wrote:
>
>> On Monday, May 23, 2022 at 4:21:38 PM UTC-5 Edward K. Ream wrote:
>>
>> 1. I mistakenly merged PR #2671 
>>> <https://github.com/leo-editor/leo-editor/pull/2671> into the 6.6.2 
>>> branch from devel.  So now we get to test Thomas's new code :-)
>>>
>>
>> Rev d973bb in devel lower cases the 'file only' label, indicating that 
>> there is no Alt-Ctrl shortcut for it the radio button.  
>>
>> Thomas, I don't see a toggle-find-file option in the PR #2665 
>> <https://github.com/leo-editor/leo-editor/pull/2665>. For completeness 
>> it should probably exist, along with the typical Alt-Ctrl shortcuts. But we 
>> should leave all this for 6.6.3.  The more I think about this, the more I 
>> think I should (somehow!) undo the merge of the PR.  I'll try tomorrow when 
>> I have my wits about me :-)
>>
>> 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/1de780db-20ec-4f9e-9f54-f4027dc72992n%40googlegroups.com.


Re: Leo 6.6.2b1 released without public announcements

2022-05-23 Thread tbp1...@gmail.com
No, I didn't realize there should be such a command.  I'll take a look at 
adding it (not for 6.6.2, of course!).

Please don't remove the code from devel even if you remove it from the 
release branch.  For a PR with the new command, I will have to have a fully 
merged branch that is otherwise up to date with devel, and if you remove 
the code from devel, it will wipe out mine.  That will make things much 
harder for me.

On Monday, May 23, 2022 at 5:35:02 PM UTC-4 Edward K. Ream wrote:

> On Monday, May 23, 2022 at 4:21:38 PM UTC-5 Edward K. Ream wrote:
>
> 1. I mistakenly merged PR #2671 
>>  into the 6.6.2 
>> branch from devel.  So now we get to test Thomas's new code :-)
>>
>
> Rev d973bb in devel lower cases the 'file only' label, indicating that 
> there is no Alt-Ctrl shortcut for it the radio button.  
>
> Thomas, I don't see a toggle-find-file option in the PR #2665 
> . For completeness it 
> should probably exist, along with the typical Alt-Ctrl shortcuts. But we 
> should leave all this for 6.6.3.  The more I think about this, the more I 
> think I should (somehow!) undo the merge of the PR.  I'll try tomorrow when 
> I have my wits about me :-)
>
> 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/b9f0a131-624c-4c62-9b5e-858d239f2908n%40googlegroups.com.


Re: Different results of 'test-all' cmd

2022-05-22 Thread tbp1...@gmail.com
I have noticed that there have been a number of expressions used to try to 
find Leo's directory, to try to handle or work around problems like this.  
Some of them involve finding the sitepackages directory.  I want to point 
out that most of these efforts make assumptions that are incorrect for many 
linux installations or when a PYTHONPATH is in effect.

IMO, the most reliable way to locate the Leo directory is this (run on 
Linux Mint):

>>> import os.path, leo
>>> print(os.path.dirname(leo.__file__))
/home/tom/git/leo-editor/leo

If I do not set PYTHONPATH to my git clone, the PyPi-installed Leo on the 
same Linux VM is at

/home/tom/.local/lib/python3.6/site-packages/leo

On Sunday, May 22, 2022 at 2:54:36 AM UTC-4 Edward K. Ream wrote:

> On Sun, May 22, 2022 at 1:50 AM Edward K. Ream  wrote:
>
>> On Sun, May 22, 2022 at 1:30 AM Viktor Ransmayr  
>> wrote:
>>
>> >> In short, there is no feasible way to run Leo's test and cover 
>> commands after `pip install leo`.
>>
>>>
>>> I believe, that this difference b/w **Leo-Editor** from GitHub - and - 
>>> **Leo** from PyPI should be documented.
>>>
>>
>> I agree. The place to do so is in the documentation for the test and 
>> cover commands in the Commands Reference.
>>
>
> See #2667. 
>
> 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/2032-503e-4ead-b877-bd116f4802f7n%40googlegroups.com.


Re: OMG: It's easy to copy outlines!

2022-05-19 Thread tbp1...@gmail.com
wouldn't a deep copy of the root position do it?

On Thursday, May 19, 2022 at 12:07:33 PM UTC-4 Edward K. Ream wrote:

> On Thursday, May 19, 2022 at 10:17:59 AM UTC-5 Edward K. Ream wrote:
>
> PR #2655  shows how 
>> to copy an outline iteratively. Just use p.moveToThreadNext as a template! 
>>
>
> Some notes: 
>
> Félix, the upcoming PR will also rewrite server.copy_node. The new code 
> should be about 10x faster. Otoh, most of the real cost is in transmission 
> time...
>
> Don't confuse the new utility with the code that implements the copy-node 
> command. The PR will rename the existing c.copyOutline to c.copyNode to 
> reduce potential confusion.
>
> Several existing methods use vnodes instead of positions. However, the new 
> position-oriented helper should be more flexible.
>
> 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/74f3c7a5-40a3-4c6f-918a-0f5656e414b4n%40googlegroups.com.


Re: ENB: Public undoer methods *never* need a "p" arg!

2022-05-19 Thread tbp1...@gmail.com
For backward compatibility do not change the apis. they are working for 
most of us already.  Instead name  the modified apis with a new name, 
deprecate the old ones, and start  using the new ones going forward.  e.g., 
*u.before*_1*.  the existing apis may not need one or more of the old 
arguments, but there are other methods in Leo that are like that.  The 
docstring explains that an arg is not used any more.



On Thursday, May 19, 2022 at 11:39:33 AM UTC-4 Edward K. Ream wrote:

> PR #2652  fixes 
> ancient bugs in u.undoGroup and u.redoGroup. While working on this issue, I 
> realized that none of the u.before* and u.after* methods need a "p" 
> argument!  Indeed, p must *always* be c.p *at the time of the call.*
>
> The question is, "what to do now?" Here are my thoughts:
>
> - Changing the APIs for the u.before* and u.after* methods would cause 
> some pain for script writers. But not changing the API seems unbearably 
> ugly.
>
> - Félix's leoInteg project will likely not be affected. Otoh, the leojs 
> can remove the p args because there aren't any users yet.
>
> *Summary*
>
> Félix, I recommend changing the undo API in leojs.
>
> I plan to change the undo API for Leo 6.6.3, giving us at least a month of 
> testing.
>
> 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/4755ad25-c274-405a-a0f0-06728687d98fn%40googlegroups.com.


Re: GF4, A Waveform Calculator

2022-05-18 Thread tbp1...@gmail.com
I have created a minimal version that does almost nothing except plot a 
hard-coded data set and allow you to change the axis settings.  It does 
however use the actual gf4 code to handle the data and plotting, just with 
everything else removed.

Put the attached file in the same directory where you have gf4, and run it 
from a console window.  You can change the axes scale type from the "Plot" 
menu.  If log-log still does not display a log-log plot, at least we will 
have something much simpler to work with.

On Tuesday, May 17, 2022 at 10:38:07 PM UTC-4 tbp1...@gmail.com wrote:

> Here is another test you can do.  Enable the Test menu:
>
> in createmenus.py, find "test menu".  Uncomment the last line 
> (mainMenu.add_cascade(...).
>
> Then navigate to @file gf4.pyw-->class 
> PlotManager(AbstractPlotManager)-->Misc-->testMacro.  Add a new last line 
> to the string
> so that it reads
>
> def testMacro(self):
> self.runMacro('''dsin
> copy2buff
> sqr
> plot
> ; comment
> overplotbuf
> # another comment
> loglog
> ''')
>
> This adds the command "loglog" to the macro definition.  Save everything, 
> then re-open gf4.  there should be a new "Test" menu.  select the "Run 
> Macro" item.  It will create a waveform and do things with it, and the last 
> step should switch the axes to log-log.  This command is the same one that 
> is (or should be) sent from the button window when you press the "loglog" 
> key.
>
> You can also verify that the "loglog" button is hooked up to the right 
> command string.  Run the cmdwin.py file as its own program from the command 
> line.  This produces a button window that is exactly what you see when you 
> run gf4, except that when you press a button, its command is printed to the 
> console instead of getting executed.
>
> On Tuesday, May 17, 2022 at 7:57:17 PM UTC-4 tbp1...@gmail.com wrote:
>
>> Strange.  Yes, let's zoom.  email me at the address you have so we can 
>> see what's what.  in the meantime, do the semilogX and semilogY buttons 
>> seem to change the scales as expected?
>>
>> I hope that matplotlib didn't change something.  My version should be 
>> very current since i just installed python 3.10.  also, my python 3.7 
>> version, which is several years old, also works as expected. my versions:
>>
>> Python  matplotlib
>> 3.103.5.2
>> 3.9  3.5.0
>> 3.7  3.5.2   # hmm, must have updated it recently
>> but even back when gf4 ran under Python 2.7, loglog plotting worked as 
>> expected.
>>
>> On Tuesday, May 17, 2022 at 7:20:11 PM UTC-4 Edward K. Ream wrote:
>>
>>> On Tue, May 17, 2022 at 4:05 PM tbp1...@gmail.com  
>>> wrote:
>>>
>>>> yellow, that's good!  now as long as they flash when clicked...
>>>>
>>>
>>> Yes. All buttons flash when clicked.
>>>
>>> Traces show that plot is called, but neither the scales nor the plot 
>>> itself change after clicking LogLog.  Perhaps we could zoom sometime.
>>>
>>> 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/3bfe41e7-134b-466d-bc17-f48b68d65d00n%40googlegroups.com.
#@+leo-ver=5-thin
#@+node:tom.20220518082230.1: * @file gf_min.py
#@@language python
#@@tabwidth -4
#@+others
#@+node:tom.20220518082247.1: ** imports
import os.path
import sys

import tkinter as Tk
import tkinter.font as tkFont
from tkinter import filedialog as fd

import matplotlib
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from matplotlib.backends.backend_tkagg import NavigationToolbar2Tk
from matplotlib.figure import Figure

from entry import TextFade

#from randnum import *
from AbstractPlotMgr import AbstractPlotManager
from AbstractPlotMgr import MAIN, BUFFER, STACKDEPTH, ERRBAND_HI, ERRBAND_LO

from colors import (BLACK, CYAN, GRAY, LIGHTGRAY, DEFAULTGRIDCOLOR,
ColorBgPairs)

from Dataset import Dataset
from Linestyle import (Linestyle, LINETHIN, LINEMED)

matplotlib.use('TkAgg')
#@+node:tom.20220518082506.1: ** Declarations
COMMENTS = (';', '#')

ENCODING = 'utf-8'
#@+node:tom.20220518082700.1: ** class PlotManager(AbstractPlotManager)
class PlotManager(AbstractPlotManager):

# pylint: disable = import-outside-toplevel
# 

Re: GF4, A Waveform Calculator

2022-05-17 Thread tbp1...@gmail.com
Here is another test you can do.  Enable the Test menu:

in createmenus.py, find "test menu".  Uncomment the last line 
(mainMenu.add_cascade(...).

Then navigate to @file gf4.pyw-->class 
PlotManager(AbstractPlotManager)-->Misc-->testMacro.  Add a new last line 
to the string
so that it reads

def testMacro(self):
self.runMacro('''dsin
copy2buff
sqr
plot
; comment
overplotbuf
# another comment
loglog
''')

This adds the command "loglog" to the macro definition.  Save everything, 
then re-open gf4.  there should be a new "Test" menu.  select the "Run 
Macro" item.  It will create a waveform and do things with it, and the last 
step should switch the axes to log-log.  This command is the same one that 
is (or should be) sent from the button window when you press the "loglog" 
key.

You can also verify that the "loglog" button is hooked up to the right 
command string.  Run the cmdwin.py file as its own program from the command 
line.  This produces a button window that is exactly what you see when you 
run gf4, except that when you press a button, its command is printed to the 
console instead of getting executed.

On Tuesday, May 17, 2022 at 7:57:17 PM UTC-4 tbp1...@gmail.com wrote:

> Strange.  Yes, let's zoom.  email me at the address you have so we can see 
> what's what.  in the meantime, do the semilogX and semilogY buttons seem to 
> change the scales as expected?
>
> I hope that matplotlib didn't change something.  My version should be very 
> current since i just installed python 3.10.  also, my python 3.7 version, 
> which is several years old, also works as expected. my versions:
>
> Python  matplotlib
> 3.103.5.2
> 3.9  3.5.0
> 3.7  3.5.2   # hmm, must have updated it recently
> but even back when gf4 ran under Python 2.7, loglog plotting worked as 
> expected.
>
> On Tuesday, May 17, 2022 at 7:20:11 PM UTC-4 Edward K. Ream wrote:
>
>> On Tue, May 17, 2022 at 4:05 PM tbp1...@gmail.com  
>> wrote:
>>
>>> yellow, that's good!  now as long as they flash when clicked...
>>>
>>
>> Yes. All buttons flash when clicked.
>>
>> Traces show that plot is called, but neither the scales nor the plot 
>> itself change after clicking LogLog.  Perhaps we could zoom sometime.
>>
>> 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/9038027c-71ab-464a-a79e-fe2886f87d16n%40googlegroups.com.


Re: GF4, A Waveform Calculator

2022-05-17 Thread tbp1...@gmail.com
Strange.  Yes, let's zoom.  email me at the address you have so we can see 
what's what.  in the meantime, do the semilogX and semilogY buttons seem to 
change the scales as expected?

I hope that matplotlib didn't change something.  My version should be very 
current since i just installed python 3.10.  also, my python 3.7 version, 
which is several years old, also works as expected. my versions:

Python  matplotlib
3.103.5.2
3.9  3.5.0
3.7  3.5.2   # hmm, must have updated it recently
but even back when gf4 ran under Python 2.7, loglog plotting worked as 
expected.

On Tuesday, May 17, 2022 at 7:20:11 PM UTC-4 Edward K. Ream wrote:

> On Tue, May 17, 2022 at 4:05 PM tbp1...@gmail.com  
> wrote:
>
>> yellow, that's good!  now as long as they flash when clicked...
>>
>
> Yes. All buttons flash when clicked.
>
> Traces show that plot is called, but neither the scales nor the plot 
> itself change after clicking LogLog.  Perhaps we could zoom sometime.
>
> 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/38edb64b-f065-45a4-9850-5d4efeeccb7cn%40googlegroups.com.


Re: GF4, A Waveform Calculator

2022-05-17 Thread tbp1...@gmail.com
yellow, that's good!  now as long as they flash when clicked...

On Tuesday, May 17, 2022 at 4:58:03 PM UTC-4 Edward K. Ream wrote:

> On Mon, May 16, 2022 at 8:44 AM tbp1...@gmail.com  
> wrote:
>
>> I just went through it myself, and the log-log plot displayed as shown in 
>> the tutorial.  i can hardly imagine how it wouldn't work for you, knowing 
>> how those buttons are hooked up internally.
>
>
> Not to worry. I'll figure out what is happening on my end. It's been a 
> busy couple of days.
>
> BTW, the command buttons are turning yellow :-)
>
> 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/8281400b-217b-4746-925d-2d6e9181a3e0n%40googlegroups.com.


Re: Can not import leo.plugins.importers.ipynb

2022-05-17 Thread tbp1...@gmail.com
You are seeing an error in the "traitlets" package, not really a Leo 
error.  I just did  a fresh install on Windows, and the code in the 
traitlets _version.py file is a little different from what your error 
message shows.  Perhaps you could try updating traitlets to the latest 
version (5.2.0 on my system).  

This error would only matter if you want to use Jupyter notebooks.  
Otherwise Leo should work correctly, even though it is annoying to get the 
long error message every time you start up.

On Tuesday, May 17, 2022 at 6:50:25 AM UTC-4 robo...@gmail.com wrote:

> Hello!
> I've just installed Leo Editor on Debian 11 64bit,
> i think  that alll dependencies are respected but on
> launch i got this error on Log window (the same on terminal
> when launch Leo Editor from there)
> i don't understant what is wrong...
> (sorry for poor english...)
> Thank's for any answer.
>
> Leo Log Window
> Leo 6.6.2-devel, devel branch, build 960f01c311
> 2022-05-13 15:06:33 -0500
> Python 3.9.2, PyQt version 5.15.2
> linux
> can not import leo.plugins.importers.ipynb
> can not import leo.plugins.importers.ipynb
> setting leoID from os.getenv('USER'): 'kako'
>   home: /home/kako
> leo-editor: /home/kako/leo-editor
>   load: /home/kako/leo-editor/leo/core
> config: /home/kako/leo-editor/leo/config
> reading settings in /home/kako/leo-editor/leo/config/leoSettings.leo
> reading settings in /home/kako/.leo/myLeoSettings.leo
> Traceback (most recent call last):
>   File "/home/kako/leo-editor/leo/core/leoPlugins.py", line 515, in 
> loadOnePluginHelper
> __import__(moduleName)
>   File "/home/kako/leo-editor/leo/plugins/viewrendered.py", line 272, in 
> 
> import nbformat
>   File 
> "/home/kako/.local/lib/python3.9/site-packages/nbformat/__init__.py", line 
> 9, in 
> from traitlets.log import get_logger
>   File 
> "/home/kako/.local/lib/python3.9/site-packages/traitlets/__init__.py", line 
> 5, in 
> from ._version import __version__, version_info
>   File 
> "/home/kako/.local/lib/python3.9/site-packages/traitlets/_version.py", line 
> 7, in 
> assert __version__ == (
> AssertionError
> reading settings in /home/kako/.leo/myLeoSettings.leo
> Traceback (most recent call last):
>   File "/home/kako/leo-editor/leo/core/leoPlugins.py", line 515, in 
> loadOnePluginHelper
> __import__(moduleName)
>   File "/home/kako/leo-editor/leo/plugins/viewrendered.py", line 272, in 
> 
> import nbformat
>   File 
> "/home/kako/.local/lib/python3.9/site-packages/nbformat/__init__.py", line 
> 9, in 
> from traitlets.log import get_logger
>   File 
> "/home/kako/.local/lib/python3.9/site-packages/traitlets/__init__.py", line 
> 5, in 
> from ._version import __version__, version_info
>   File 
> "/home/kako/.local/lib/python3.9/site-packages/traitlets/_version.py", line 
> 7, in 
> assert __version__ == (
> AssertionError
> read outline in 0.06 seconds

-- 
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/f2f227c7-b516-43da-8342-7cabdb91950an%40googlegroups.com.


Re: Why specs matter (On The Two Types Of Developers)

2022-05-16 Thread tbp1...@gmail.com
Nifty idea!  Without wanting to get political here, I think the Preamble to 
the US Constitution contains the essential user requirements:

" We the People of the United States, in Order to form a more perfect 
Union, establish Justice, insure domestic Tranquility, provide for the 
common defence, promote the general Welfare, and secure the Blessings of 
Liberty to ourselves and our Posterity, do ordain and establish this 
Constitution for the United States of America."


On Monday, May 16, 2022 at 11:28:04 PM UTC-4 David Szent-Györgyi wrote:

> Rereading that "Dive into Mark" posting again after many years, with my US 
> State's primary election coming tomorrow, my thoughts go in another 
> direction: I think of parallels with respect to the law. 
>
> For "a**holes" read "lawyers". For "morons" read "legislators". 
>
> Reading Tom's distinction between "requirements" and "specifications", I 
> think that those who believe the US Constitution to be a living document 
> focus on requirements, while the Originalists focus on specifications. 
>
> *sigh*
>
>>

-- 
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/a9af0abc-b465-4b7f-8dd7-920cc16eaf3en%40googlegroups.com.


Re: GF4, A Waveform Calculator

2022-05-16 Thread tbp1...@gmail.com
I just went through it myself, and the log-log plot displayed as shown in 
the tutorial.  i can hardly imagine how it wouldn't work for you, knowing 
how those buttons are hooked up internally.  one thing that happens to me, 
not just with this program, is if i jerk the mouse too much when i click. 
then the click doesn't take effect.

could you check one thing for me? when any of those command buttons is 
clicked, it should flash a couple of times to let you know it activated.  
when you click on the loglog button, does it flash?  it should have changed 
color to yellow when you hovered the mouse and then flashed when you 
clicked.

Also, try it with another data set.  click on the "Gaussian Noise" button 
and accept the defaults.  click on the "Linear" button to make sure that's 
where you are starting from.  then take the fft and the switch to the 
log-log view.  see if both axes are now logarithmic (axis tick marks not 
evenly spaced).  If not, try the "Semilog X" and "Semilog Y" buttons and 
see if they seem to work as expected.  then let me know the outcome.

Otherwise you might try updating the program to the latest changeset in the 
master branch.  that would be worth doing anyway if you checked out an 
earlier version.  not that i changed anything in this part of the code, but 
worth trying anyway.

On Monday, May 16, 2022 at 9:15:39 AM UTC-4 Edward K. Ream wrote:

> On Sun, May 15, 2022 at 11:13 PM tbp1...@gmail.com  
> wrote:
>
>> Part 2 <http://tompassin.net/gf4/blogsite/blog/FFTparttwo/> of the 
>> series on FFTs is now on the GF4 blog.
>>
>
> Thanks, Thomas. This is a great tutorial.
>
> Somehow I missed part 1.  Following through on it, everything worked until 
> I hit the LogLog button.  Nothing happened.
>
> Any suggestions?
>
> Edward
>
>>
>> On Friday, May 13, 2022 at 3:40:08 PM UTC-4 Edward K. Ream wrote:
>>
>>> On Fri, May 13, 2022 at 1:22 PM tbp1...@gmail.com  
>>> wrote:
>>>
>>>> It will display as a feed in a feed reader, such as Feedbro (which is 
>>>> what I use).  
>>>
>>>
>>> I see. Maybe it would be best to explain on your site :-)
>>>
>>> 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/0445649a-ae88-4b1b-bd03-e31d2e9a98d4n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/leo-editor/0445649a-ae88-4b1b-bd03-e31d2e9a98d4n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>
>
> -- 
> -
> Edward K. Ream: edre...@gmail.com
> An old man, crazy about computer programming.
> Leo Editor: http://leoeditor.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/585644a9-ed7c-4113-8741-6000f94d944an%40googlegroups.com.


Re: GF4, A Waveform Calculator

2022-05-15 Thread tbp1...@gmail.com
Part 2 <http://tompassin.net/gf4/blogsite/blog/FFTparttwo/> of the series 
on FFTs is now on the GF4 blog.

On Friday, May 13, 2022 at 3:40:08 PM UTC-4 Edward K. Ream wrote:

> On Fri, May 13, 2022 at 1:22 PM tbp1...@gmail.com  
> wrote:
>
>> It will display as a feed in a feed reader, such as Feedbro (which is 
>> what I use).  
>
>
> I see. Maybe it would be best to explain on your site :-)
>
> 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/0445649a-ae88-4b1b-bd03-e31d2e9a98d4n%40googlegroups.com.


Re: About #2647: pylint changes

2022-05-15 Thread tbp1...@gmail.com
Please make it a new command!  i don't want to get output for a whole 
directory when all i need to do is to check one file.  In fact, i have 
never wanted to check more than one file at a time.  just create a new 
command already and leave *pylint* to work as it always has.

On Sunday, May 15, 2022 at 12:23:43 PM UTC-4 Edward K. Ream wrote:

> #2647  will revise 
> how Leo invokes pylint, and will likely result in new commands. I expect 
> this work to take a few days.
>
> Leo's existing pylint-leo.py invokes pylint in the worst possible way! 
> Indeed, pylint caches ast trees, but this caching is virtually useless if 
> pylint is invoked one file at a time:
>
> python pylint-leo -a takes than 20 minutes.
> python -m pylint leo takes less than 2 minutes.
>
> As a result, I no longer have any plans to attempt to improve pylint's 
> performance.  Hurray!
>
> 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/d6ab049b-3286-4dff-a646-f833f936346bn%40googlegroups.com.


Re: Open Outline Oddness

2022-05-14 Thread tbp1...@gmail.com
Ah!  removing the directory .leo/db/g_app_db did the trick.  
.leo/db/global_data did not.

On Saturday, May 14, 2022 at 8:41:33 AM UTC-4 Edward K. Ream wrote:

> On Sat, May 14, 2022 at 7:21 AM tbp1...@gmail.com  
> wrote:
>
>> I have one outline that if it is open when i close Leo, on the next 
>> restart Leo gives a message that the outline may be open in another copy of 
>> Leo.  Only that one outline provokes this behavior.
>>
>> Any ideas about what is going on and how to stop it?
>>
>
> Try clearing the cache.
>
> 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/8aac04eb-13a9-440f-b39d-2ebf70458f6fn%40googlegroups.com.


Open Outline Oddness

2022-05-14 Thread tbp1...@gmail.com
I have one outline that if it is open when i close Leo, on the next restart 
Leo gives a message that the outline may be open in another copy of Leo.  
Only that one outline provokes this behavior.

If i close it before shutting Leo down - so Leo won't open it at startup, 
of course i don't get the message.  if i then open the outline and 
close/restart Leo, then i get the message again.

It's not harmful as best as i can see, but it's annoying.

Any ideas about what is going on and how to stop it?

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/5226b8b9-b7e7-42d5-a886-56503ea89924n%40googlegroups.com.


Re: Line Highlight Color Improvement

2022-05-14 Thread tbp1...@gmail.com
I have thought about this.  It's certainly a possibility.  One reason I 
didn't put effort into it is that, if you open a theme outline while Leo is 
already open, its colors take over even for outlines that are already 
open.  But the name of the theme that Leo reports back to a program does 
not change to match.  So the only way to be sure of choosing a reasonable 
highlight color for the theme in effect is to take the actual colors from 
the body pane, and compute the color based on them.

I could look into it further, though.

On Saturday, May 14, 2022 at 6:54:32 AM UTC-4 jkn wrote:

> Would it be a good idea to have the highlight colour as an (overridable) 
> setting within themes?
>
>
> On Monday, May 9, 2022 at 8:12:07 PM UTC+1 tbp1...@gmail.com wrote:
>
>> : )
>>
>> On Monday, May 9, 2022 at 3:09:41 PM UTC-4 jkn wrote:
>>
>>> ... and I have just come across this and will find it useful - thanks!
>>>
>>> J^n
>>>
>>>
>>> On Friday, March 4, 2022 at 3:09:53 PM UTC tbp1...@gmail.com wrote:
>>>
>>>> Leo can highlight the current cursor line in the body.  If you haven't 
>>>> tried this out yet, there is an item in the *Help/Open Help Topics* 
>>>> menu that tells you what settings to use.
>>>>
>>>> The code tries to compute a reasonable highlight color based on the 
>>>> theme in use.  You can override this color with your own choice using a 
>>>> setting.  But previously, if you opened a theme's outline, say if you 
>>>> wanted to edit it, that theme's color would become used by all open 
>>>> outlines but the highlight code would not change to match.  This could 
>>>> produce unreadable text if you were unlucky.
>>>>
>>>> With today's devel branch, the highlighting code notices the change in 
>>>> colors and recomputes the highlight color.  The new highlight color will 
>>>> be 
>>>> applied the next time you move the cursor.
>>>>
>>>

-- 
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/6015ae7c-825d-4d32-b37d-03eba1e6b7d3n%40googlegroups.com.


Re: Why specs matter (On The Two Types Of Developers)

2022-05-13 Thread tbp1...@gmail.com
People often mix up requirements and specifications.  Requirements are for 
setting out what will be required of the system, preferably in terms of the 
user or builder - for example, "transport a family of four with luggage at 
least 450 miles in a day without refuelling".  Note that this may or may 
not be measurable per se. 

Requirements can apply to GUI interfaces too.  For example, in my GF4 
project i have a strong (though as yet unwritten) requirement that error 
messages must not need user action to be dispatched (so, for example, no 
modal error boxes that have to be clicked on).  I implement this 
requirement by having error messages display in a message strip, flash 
gently to get one's attention, and then fade away over a period of some 
seconds.

Specifications detail measurable (or observable) things about the system 
that act to fulfil the requirements.  For the requirement above, some 
assumptions or ground rules need to be spelled out somewhere:

The volume needed for the luggage;
the total weight of the passengers;
the volume of the passenger required for the trip;
etc

Now there can be (part of) a specification:

"The vehicle shall be able to drive on an interstate highway for at least 
475 miles at a minimum speed of 55 mph in no more than 8 hours on a full 
tank (containing 21 gallons) of 86-octane gasoline while carrying the the 
reference number of passengers and amount of luggage".

Note that this specification can be tested, unlike the requirement.

Requirements and specifications are communication devices, needed more and 
more as more and more people become involved in designing a system.  Though 
not needed for a personal project - the person, after all, knows more or 
less what they have in mind - it can be helpful to have at least a 
rudimentary set of requirements even in that case - in effect, one 
communicates with one's past or future self.


On Friday, May 13, 2022 at 3:44:17 PM UTC-4 Edward K. Ream wrote:

> On Fri, May 13, 2022 at 2:09 PM tbp1...@gmail.com  
> wrote:
>
>> Why specs matter  
>> <https://web.archive.org/web/20051016203842/http://diveintomark.org/archives/2004/08/16/specs>
>>  
>>
>
> Hmm. Crude, but interesting.
>
> I've never used specs myself. Imo, what matters is the quality of the 
> conversations surrounding a project. Leo has always been informal and 
> experimental. My next project, which I'll discuss here in a day or so, will 
> have informal goals, but the final product will likely be more formal.
>
> 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/ad67bdb7-4b10-445c-ad1a-1530791c2d4bn%40googlegroups.com.


Very Fast Pattern Matching For Events

2022-05-13 Thread tbp1...@gmail.com
This post may be interesting to some folks here:

https://www.tbray.org/ongoing/When/202x/2022/05/12/Quamina

-- 
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/692e5461-17b5-4e49-8328-bc4c51072595n%40googlegroups.com.


Why specs matter (On The Two Types Of Developers)

2022-05-13 Thread tbp1...@gmail.com
Why specs matter  

 

-- 
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/a7c277ef-7f0d-4c65-b005-d1892ab70607n%40googlegroups.com.


Re: GF4, A Waveform Calculator

2022-05-13 Thread tbp1...@gmail.com
It will display as a feed in a feed reader, such as Feedbro (which is what 
I use).  Also, the blog site has the right element to allow a feed reader 
to subscribe right from the main blog page.  All "news readers" that 
produce Atom format (or RSS 2.0) produce xml files.  It is up the the feed 
reader to render them.

If you look at the news feed from, say, the Washington Post, you will see 
that it is an rss-formatted xml file too 
(e.g., http://www.washingtonpost.com/wp-dyn/rss/metro/index.xml).

I might be able to whip up a css stylesheet that would do a rough and ready 
rendering (did you know that you can style xml pages with css?), but 
whether i could get the stylesheet-referencing element for it into the 
automatically-generated feed xml i don't know.

There was a time when browsers attempted to render feeds, but they have all 
given it up as far as i know. There may still be some feed reader add-ons 
around; i'm not up on that except for Feedbro which does a great job.

On Friday, May 13, 2022 at 1:38:31 PM UTC-4 Edward K. Ream wrote:

> On Fri, May 13, 2022 at 7:58 AM tbp1...@gmail.com  
> wrote:
>
>> There is now a blog with an Atom feed 
>> <http://tompassin.net/gf4/blogsite/blog/atom.xml>.
>>
>
> When I click the link I get a representation of html, with a top-level 
>  element.
>
> 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/f017d3b8-7123-4a9d-b3d3-e89aca4cf108n%40googlegroups.com.


Re: GF4, A Waveform Calculator

2022-05-13 Thread tbp1...@gmail.com
There is now a blog with an Atom feed 
<http://tompassin.net/gf4/blogsite/blog/atom.xml>.

On Monday, May 9, 2022 at 4:35:26 PM UTC-4 Edward K. Ream wrote:

>
>
> On Mon, May 9, 2022 at 2:40 PM tbp1...@gmail.com  
> wrote:
>
>> Screenshot has been added.
>>
>
> Excellent. These pictures are worth multiple hundreds of words :-)
>
> 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/dad2487b-eb05-4231-8311-6632315945b2n%40googlegroups.com.


Outline-local Menus?

2022-05-12 Thread tbp1...@gmail.com
Is there a way to have a custom menu that appears only on one outline?  I 
know how to set up a custom menu in myLeoSettings.leo.  But if I try the 
same method in an outline, either the menu appears on all 
subsequently-opened outlines, or it does not appear at all, depending on 
whether it was defined in an @settings tree or not.

So far I've been making do with @button nodes, which are fine, but 
sometimes there get to be too many buttons and I'd like to get all the 
commands into a menu instead.  Some of these commands only make sense in 
the context of a specific outline or two.

-- 
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/b2ba16f8-c871-4343-bfb0-7bb0432a573en%40googlegroups.com.


Re: going from output file line no. to location within Leo?

2022-05-09 Thread tbp1...@gmail.com
There are a lot of commands and settings, that's for sure!  One thing that 
i do is to have a set of buttons on every outline that execute scripts of 
mine that do actions that i find i do frequently: 

- show current directory
- command window here(meaning open at the directory in effect for the 
selected node).
- current directory to clipboard
- execute external file   (this means @file and @clean trees)

i can hardly imagine getting along without them.  I'm fairly sure I shared 
the first three in the past but now i can't find where  : (.

i also have added my own menus to the menubar with items that kick off 
mostly existing commands. adding your own menus to launch existing commands 
is fairly easy, as it turns out.  Just ask if you want help with this, or 
if you'd like any of these scripts.

On Monday, May 9, 2022 at 4:34:19 PM UTC-4 Edward K. Ream wrote:

> On Mon, May 9, 2022 at 1:47 PM jkn  wrote:
>
>> Hi Edward
>> oh, that is great, thanks! 
>>
>
> You're welcome. Nobody, including me, knows or remembers everything that 
> Leo can do :-)
>
> 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/71e23e47-04e9-4f55-9510-eee92ac9d8bcn%40googlegroups.com.


Re: GF4, A Waveform Calculator

2022-05-09 Thread tbp1...@gmail.com
Screenshot has been added.

On Monday, May 9, 2022 at 2:10:21 PM UTC-4 Edward K. Ream wrote:

> On Mon, May 9, 2022 at 12:48 PM tbp1...@gmail.com  
> wrote:
>
> Edward asked me to announce this here, even though the program is not 
>> Leo-related aside from being managed in Leo.  He also encouraged me to make 
>> the project publicly available on Github. 
>
>
> Thanks, Thomas, for sharing this great software with us.  I encourage all 
> Leonistas to investigate GF4. Thomas described GF4 this way in a private 
> email:
>
> "I've been thinking about your talking about moving beyond Leo, and what a 
> magnificent achievement it is. And how you've been plugging away on it for 
> some 25 years.  It puts me in mind of my own flagship program - well, 
> flagship except that I'm the only one who knows about it."
>
> The URL to the Github repo  is at The GF4 Project 
>> <https://github.com/tbpassin/gf4-project>.
>>
>
> Please add a screenshot to the readme.md file. That way people can get an 
> initial picture of what the calculator is.
>
> Edward
>
> P.S. If you too are hiding your life's work, please, for goodness sake, 
> hide it no longer! Have the courage to put it forward! If that seems too 
> risky, try John McFee's trick. Write as if writing to your mother, and then 
> send the description to someone sympathetic. I'll volunteer :-)
>
> EKR
>

-- 
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/64c9bc39-2c76-45c6-8fd5-5f9ae6c717e6n%40googlegroups.com.


Re: Line Highlight Color Improvement

2022-05-09 Thread tbp1...@gmail.com
: )

On Monday, May 9, 2022 at 3:09:41 PM UTC-4 jkn wrote:

> ... and I have just come across this and will find it useful - thanks!
>
> J^n
>
>
> On Friday, March 4, 2022 at 3:09:53 PM UTC tbp1...@gmail.com wrote:
>
>> Leo can highlight the current cursor line in the body.  If you haven't 
>> tried this out yet, there is an item in the *Help/Open Help Topics* menu 
>> that tells you what settings to use.
>>
>> The code tries to compute a reasonable highlight color based on the theme 
>> in use.  You can override this color with your own choice using a setting.  
>> But previously, if you opened a theme's outline, say if you wanted to edit 
>> it, that theme's color would become used by all open outlines but the 
>> highlight code would not change to match.  This could produce unreadable 
>> text if you were unlucky.
>>
>> With today's devel branch, the highlighting code notices the change in 
>> colors and recomputes the highlight color.  The new highlight color will be 
>> applied the next time you move the cursor.
>>
>

-- 
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/8dcc1a32-67cf-40c4-a634-9bd55e70c564n%40googlegroups.com.


Leo + Sphinx + Ablog = A Blog

2022-05-09 Thread tbp1...@gmail.com
If you already know how to produce Sphinx documentation  with Leo, it's a 
small step to creating a blog.  "ablog" is a Sphinx extension that turns 
the Sphinx-generated files into a blog, with just a little more 
configuration.  I came across it recently as I was searching for simple 
blogging software for my GF4 project.

Here are some links:

- ABlog for Sphinx 
- Part 1: Creating a Blog on Sphinx - errbufferoverfl.me 

- Part 2: Advanced Configuration of Sphinx 


There is a minor typo in Part 1 that prevents posts from getting posted.  
Each post has to include a date, but the correct date format is like "5 
May, 2022".  In the post, the comma is in the wrong place.  The date parser 
can tolerate omission of the comma but not, it seems, having it in the 
wrong place.

-- 
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/884b633d-48d5-4b72-96a3-87027b4db3d8n%40googlegroups.com.


GF4, A Waveform Calculator

2022-05-09 Thread tbp1...@gmail.com
Edward asked me to announce this here, even though the program is not 
Leo-related aside from being managed in Leo.  He also encouraged me to make 
the project publicly available on Github.  Here's what I wrote him -

"My program, which I call GF4, is a program for viewing and processing 2-D 
waveforms.  I've done a lot of that over my career, and this program helps 
with that.  Its interface is modeled after my old HP reverse-polish 
calculator, except that it maintains a stack of waveforms in place of 
numbers.  Thus, you can push, pop, or rotate the waveform stack.  You can 
do numeric operations between the two bottom stack positions (in an HP 
calculator, you would for instance push 2, push 4, then add to give 6 in 
the bottom stack position.  You can do various operations on the stack 
bottom, like smoothing, low pass filtering, or a Fast Fourier Transform.  
You can do curve fitting, correlation between waveforms, etc., etc.  All 
with a calculator like interface, which turns out to be much handier than 
menus.

 There is a macro facility to repeat command sequences.  There are waveform 
generators.  You can fit a gaussian distribution to a data set.
...
It's only about 1/20 the size of Leo in terms of LOC, but it's fabulously 
useful for the one thing it specializes in.  And it has a 37-year lineage, 
going back to 1985 on a 64-k CP/M machine. Back then it was written in 
FORTH.  Today it is written in Python with a tcl/tk GUI. Implementation has 
gone from FORTH through Turbopascal through Turbopascal + my own DOS 
graphics mode window manager, through Delphi for Windows, and now Python 
and tcl/tk.   Back then I wrote all my own math routines, including the FFT 
which was not limited to powers of two but would work for any arbitrary 
data length. Now I use Numpy and Scypi for some things, but many of my old 
routines are still in there, like the LOWESS smoothing implementation. "

>From the README in the Github repository:
"GF4 - "GF" being short for "Graphics Framework" - is a Python program to 
display two-dimensional data, such as time series data, and to perform 
mathematical operations on the data or between two related data sets. The 
program aims to make data exploration easy and enjoyable."

GF4 is licensed under the MIT license, the same as Leo.  There is a User's 
Guide and a blog site, both linked on the Github README file.  The files 
and Sphinx documentation are contained in gf4.leo.

The URL to the Github repo  is at The GF4 Project 
.

If you have any interest in visualizing and exploring 2D data sets, please 
give GF4 a try.  I use it all the time.

-- 
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/a54d3c3e-7906-402f-b566-44338ebc3811n%40googlegroups.com.


Re: Non-ASCII characters in a node body make edit operations produce unintended results

2022-05-06 Thread tbp1...@gmail.com
I'm in the dark too, but when i encountered the same problem several leo 
versions ago, i raised the issue and then after a few more merges the 
problem was gone.  actually, that time it was more serious because every 
use of the ctrl key (iirc) inserted those symbols.  it's always been those 
exact strange symbols, so there must be some very specific thing going on.  
the symbols involved do not change with the font, so it's not a matter of 
missing or wrong glyphs getting drawn.  it might be something like utf8 
decoding getting shifted by a bit or a nibble, or getting an extra byte 
inserted spuriously into the decoded stream.  if so, it would probably be 
an issue with the decoding library that qt uses.

i never knew what had changed - i assumed that @edward had done something 
to fix it - but if someone can find my report - maybe 2 years ago by now?  
- and has some skill with tracking changes through git - something might 
come too light.  sorry, i'm not in a position to do it myself right now.

On Friday, May 6, 2022 at 10:15:40 AM UTC-4 Edward K. Ream wrote:

> On Thu, May 5, 2022 at 9:27 AM Arjan  wrote:
>
>> It's not a new problem: 
>> https://github.com/leo-editor/leo-editor/issues/1368
>
>
> Yes. I have no idea how it could be fixed.  Anyone have any 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/52951c93-76ef-4caf-a616-d662707c62bcn%40googlegroups.com.


Should execute-general-script Run On A Thread?

2022-05-04 Thread tbp1...@gmail.com
the *execute-general-script* command runs scripts, including @file and 
@clean external files, outside of the leo environment.  the command has 
some bells and whistles, including the ability to receive the program's 
output and display clickable links in the log pane.  in this regard, it is 
much like the *pylint* and *mypy* commands.

however, unlike them the command blocks leo.  leo is frozen until the 
launched program returns.  we fixed that with the *pylint* and *mypy* 
commands by running them with threads.  any number of instances of those 
commands can be launched, and they queue up and wait their turn without 
blocking leo.

i have my own program-launching script that doesn't block (and has fewer 
bells and whistles).  it does not block leo, though it also does not 
communicate anything back to leo. since i usually use it to run 
long-running or gui programs, this works well.  you don't want a server you 
are developing to block leo, for example, and you are not looking to get 
any output.  and you want to see any error messages as they happen.

here i want to open a discussion of whether the execute-general-script 
should be made to be non-blocking.  if yes, there are some complications, 
such as where the output should go when several instances of the command 
are running at the same time, and whether several instances should even be 
allowed to run at the same time.  maybe. for example, the command should 
queue itself up with the background process manager.

or maybe the command should remain unchanged and a new, similar one be 
added. 

i am inclined to think that such a command should open a new tab in the log 
frame and write to it.   one difficulty of the present approach to 
communication between the launched program and leo is that leo receives no 
data until the launched program returns.  there is a technical problem with 
reliably getting data as it comes in - at least on windows - but presumably 
this could be overcome in some way.

thoughts and suggestions about this command welcome.

-- 
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/10b24c9b-71b1-4bf3-8c52-2b5464ffab55n%40googlegroups.com.


  1   2   3   4   5   6   7   8   9   >