Re: toggle brackets command

2023-05-02 Thread Rob
Yes, that's it. I didn't see it when I used tab to complete the command 
'cuz it was at the top of the list; my bad! Thanks!

Rob...

On Tuesday, May 2, 2023 at 4:40:58 PM UTC-4 tbp1...@gmail.com wrote:

> There's a *toggle-angle-brackets* command.  Is that it?  The F11 help 
> message reads "Add or remove double angle brackets from the headline of the 
> selected node".
> On Tuesday, May 2, 2023 at 2:40:12 PM UTC-4 Rob wrote:
>
>> I remember there was a command to toggle headline brackets, thought it 
>> was `toggle-brackets`. I can't find it anymore, perhaps I mis-remembered 
>> the name of the command. Also, I seem to recall it was in the Edit Headline 
>> menu, but there's nothing there either.
>>
>> Did it go away at some point or is the command name something else?
>>
>> Rob...
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/4d8d8058-4f88-461a-9bb5-d7229bf43ad1n%40googlegroups.com.


Re: toggle brackets command

2023-05-02 Thread Thomas Passin
There's a *toggle-angle-brackets* command.  Is that it?  The F11 help 
message reads "Add or remove double angle brackets from the headline of the 
selected node".
On Tuesday, May 2, 2023 at 2:40:12 PM UTC-4 Rob wrote:

> I remember there was a command to toggle headline brackets, thought it was 
> `toggle-brackets`. I can't find it anymore, perhaps I mis-remembered the 
> name of the command. Also, I seem to recall it was in the Edit Headline 
> menu, but there's nothing there either.
>
> Did it go away at some point or is the command name something else?
>
> Rob...
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/610d5128-775d-4d61-9128-e176c98f1924n%40googlegroups.com.


toggle brackets command

2023-05-02 Thread Rob
I remember there was a command to toggle headline brackets, thought it was 
`toggle-brackets`. I can't find it anymore, perhaps I mis-remembered the 
name of the command. Also, I seem to recall it was in the Edit Headline 
menu, but there's nothing there either.

Did it go away at some point or is the command name something else?

Rob...

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/0d23c4d1-6927-4cdd-865c-401a19c00348n%40googlegroups.com.


Re: Pyspread - a spreadsheet where each cell can be a Python expression

2023-05-02 Thread David Szent-Györgyi
On Tuesday, May 2, 2023 at 1:04:27 PM UTC-4 jkn wrote:

There was a much older 'python in a spreadsheet' program, created by 
Resolver Systems. I followed it with interest, they tried to create a 
commercial product out of it but failed.


That product used IronPython - an alternate implementation of Python 
implemented on the Dynamic Language Runtime for .NET 
. Resolver Systems is long gone, but IronPython is 
still out there, though development by its tiny team is slow - the current 
release added Python3 features, and was released early in 2023; it is 
closest to CPython 3.4. 

Unlike CPython, IronPython has no Global Interpreter Lock ("GIL"), and it 
used unicode for strings long before that was sorted out in CPython. 
Differences between IronPython and CPython make IronPython a dialect, but  
one well-suited to multi-threaded projects. It is an excellent "glue 
language" as it is an interpreter with a JIT compiler; it has full access 
to .NET  as well as to Win32; it also has access to libraries accessible 
through CTypes. In my day job, I write complex macros in IronPython for an 
application that controls exotic hardware; I prefer the IronPython 
read-eval-print-loop to compiling code through a heavyweight IDE and 
compiler that Get In My Way. 

Michael Foord and Christian Muirhead, who were with Resolver Systems, wrote an 
excellent book on IronPython 
. While its content has 
not been updated to address the current release, its exploration of .NET 
specifics makes it worth reading for the newcomer to IronPython. 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/68157a41-abfa-4983-bda5-1ddd0edc8b6dn%40googlegroups.com.


Re: Pyspread - a spreadsheet where each cell can be a Python expression

2023-05-02 Thread jkn
There was a much older 'python in a spreadsheet' program, created by 
Resolver Systems. I followed it with interest, they tried to create a 
commercial product out of it but failed.

IIRC pyspread is much less ambitious than Resolver, but it might be that it 
is more successful because of that. I still with the beta version or 
whatever of the Resolver Systems one was available though.

On Tuesday, May 2, 2023 at 10:46:16 AM UTC+1 Edward K. Ream wrote:

> On Mon, May 1, 2023 at 5:51 PM Thomas Passin  wrote:
>
>> I just learned about Pyspread , which is a 
>> spreadsheet program where cells contain Python expressions or code.  They 
>> can also contain images, which makes it interesting to see how the image 
>> data is stored and used.  It's a PyQt program, so there might be some good 
>> lessons to learn.
>
>
> I agree.
>
> 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/34bc49c8-efe1-46c3-88a0-c87c9bf8f3afn%40googlegroups.com.


PR #3308 moves two scripts from leo/plugins to leo/scripts

2023-05-02 Thread Edward K. Ream
PR #3306 , added calls 
to  g.assertUi('qt') to *picture_viewer.py* and 
*remove_duplicate_pictures.py*. But that's a blunder: g.assertUi('qt') 
assumes g.app.gui exists. Oops: these files are stand-alone scripts that do 
not create g.app.gui. 

PR #3308  fixes these 
mistakes by:

- Moving picture_viewer.py and remove_duplicate_pictures.py to the 
leo/scripts folder.
- Removing the calls to g.assertUi('qt').
- Improving messages when imports fail.

*Summary*

Please change any references to these two files.

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/695bc127-1c8f-4a3a-9dbd-a4dc4e792369n%40googlegroups.com.


Re: @language modes

2023-05-02 Thread Jacob Peck
Anecdotally, I had '@language python' act the same way for me once a few
weeks back, but it sorted itself out somehow and I couldn't replicate it.

On Tue, May 2, 2023 at 8:12 AM Rob  wrote:

> That's what I see as well. It's colored green until I enter a new line,
> then reverts to black. Other valid @language directives seem to work as
> expected (tex, rest, html, etc.)
>
> On Tuesday, May 2, 2023 at 7:58:04 AM UTC-4 tbp1...@gmail.com wrote:
>
> It's trick.  I just found that when I type *@language md* into a new
> node, the line colors when I complete the "md".  But when I press ENTER the
> highlight goes away.  After that, adding the directive line again, or to
> any other new node, the line does not highlight although VR3 still
> understands that the node is a Markdown node.  This behavior is on a
> per-outline basis.
>
> This is the second odd behavior that shows up the first time used on a
> per-outline basis.  The other one was reported in Issue 3305
> .
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/63831cd8-6192-4f88-8918-95950a3646a7n%40googlegroups.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/CAJ1i%2BSbZ6v%3DiNpUfMb_9M1urMQpq9pO94d9meXD9jd3r68_UdA%40mail.gmail.com.


Re: @language modes

2023-05-02 Thread Rob
That's what I see as well. It's colored green until I enter a new line, 
then reverts to black. Other valid @language directives seem to work as 
expected (tex, rest, html, etc.)

On Tuesday, May 2, 2023 at 7:58:04 AM UTC-4 tbp1...@gmail.com wrote:

It's trick.  I just found that when I type *@language md* into a new node, 
the line colors when I complete the "md".  But when I press ENTER the 
highlight goes away.  After that, adding the directive line again, or to 
any other new node, the line does not highlight although VR3 still 
understands that the node is a Markdown node.  This behavior is on a 
per-outline basis.

This is the second odd behavior that shows up the first time used on a 
per-outline basis.  The other one was reported in Issue 3305 
.


-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/63831cd8-6192-4f88-8918-95950a3646a7n%40googlegroups.com.


Re: @language modes

2023-05-02 Thread Thomas Passin
It's trick.  I just found that when I type *@language md* into a new node, 
the line colors when I complete the "md".  But when I press ENTER the 
highlight goes away.  After that, adding the directive line again, or to 
any other new node, the line does not highlight although VR3 still 
understands that the node is a Markdown node.  This behavior is on a 
per-outline basis.

This is the second odd behavior that shows up the first time used on a 
per-outline basis.  The other one was reported in Issue 3305 
.

On Tuesday, May 2, 2023 at 5:56:09 AM UTC-4 Edward K. Ream wrote:

> On Mon, May 1, 2023 at 8:37 PM Rob  wrote:
>
>>
>>1. Recently I noticed that all of my @language md nodes don't seem to 
>>recognize the directive (the line isn't colored green as before). 
>>
>>
> @language md works for me in devel. I have just reviewed all recent 
> changes to leo/modes/md.py. None of those changes should have any effect on 
> coloring for Leo's directives.
>
> 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/0ab31497-099e-463e-a41e-db65b80476f9n%40googlegroups.com.


Re: An RPN Calculator For Leo

2023-05-02 Thread Edward K. Ream
On Tue, May 2, 2023 at 4:35 AM jkn  wrote:

> s/write/right/, of course ;-o
>

Hehe.  I remember *screaming* in frustration while using some nerdy
sed-like text editor while working at IBM 50+ years ago. My work on editors
began with those screams.

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/CAMF8tS1SnXgM2aO8o03boUcrWAQ2hFCEJrGsQ%3DP4iFKv0k%40mail.gmail.com.


Re: @language modes

2023-05-02 Thread Edward K. Ream
On Mon, May 1, 2023 at 8:37 PM Rob  wrote:

>
>1. Recently I noticed that all of my @language md nodes don't seem to
>recognize the directive (the line isn't colored green as before).
>
>
@language md works for me in devel. I have just reviewed all recent changes
to leo/modes/md.py. None of those changes should have any effect on
coloring for Leo's directives.

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/CAMF8tS236Z-weZUHoKsOWhnbt4vXkj1pwpMxm9X4R_j9wYcUcA%40mail.gmail.com.


Re: Pyspread - a spreadsheet where each cell can be a Python expression

2023-05-02 Thread Edward K. Ream
On Mon, May 1, 2023 at 5:51 PM Thomas Passin  wrote:

> I just learned about Pyspread , which is a
> spreadsheet program where cells contain Python expressions or code.  They
> can also contain images, which makes it interesting to see how the image
> data is stored and used.  It's a PyQt program, so there might be some good
> lessons to learn.


I agree.

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/CAMF8tS1Ac4n-J9n8iyhbzbVjuJYZJkScakyZ5zXg8i-5Qf8Lag%40mail.gmail.com.


Re: An RPN Calculator For Leo

2023-05-02 Thread jkn
s/write/right/, of course ;-o

On Tuesday, May 2, 2023 at 9:50:53 AM UTC+1 jkn wrote:

> FWIW I sometime use the underscore character in a 'down' sense. So R_ , 
> perhaps.
>
> I used to write a fair bit in (La)TeX, and that uses caret ^ for 
> superscript, and underscore _ for subscript, so it 'feels' write to me...
>
> J^n
>
> On Monday, May 1, 2023 at 8:18:33 PM UTC+1 tbp1...@gmail.com wrote:
>
>> Much better!  I'll change it soon.  BTW, I'm sorry about *R>* for "Roll 
>> Down".  The original code used *R<* and *R>*, apparently because we 
>> don't have up and down arrows on a normal keyboard (well, speaking for US 
>> English keyboards, anyway).  I changed the one to a caret (*R^*) but 
>> there's no similar down symbol one can type.  I could have used a unicode 
>> arrow but it can't be typed conveniently.  The way the code works, if you 
>> type the string on a button (some of them, anyway) it activates the same 
>> command as if you had clicked on its button.
>>
>> On Monday, May 1, 2023 at 2:22:05 PM UTC-4 jkn wrote:
>>
>>> Shurely that should be called >CLIP  ? ;-)
>>>
>>> On Monday, May 1, 2023 at 5:46:45 PM UTC+1 tbp1...@gmail.com wrote:
>>>
 Devel now contains one more change.  I've changed the *EXIT* key 
 (which isn't needed in the Leo tab version of the calculator) to 
 *TOCLIP*. It copies the "X" register - the calculation result - to the 
 system clipboard.

 On Monday, May 1, 2023 at 9:31:00 AM UTC-4 Thomas Passin wrote:

> When I was using TurboPascal and doing a lot of numerical 2-D 
> integrations with complex numbers, I actually wrote a little library 
> module 
> to calculate with complex numbers as if I was using an RPN calculator.  
> So 
> you could push a complex number on the stack, pop it off, multiply or add 
> the two numbers on the stack bottom, etc.  At that time TurboPascal did 
> not 
> have complex numbers of its own, IIRC.  If N1 and N2 were two complex 
> numbers you could write, for example (based on hazy memories from long 
> ago):
>
> push(N1)
> push(N2)
> CMul()
> { and so forth, pun intended }
>
> I enjoyed using the library because it was so easy for me to write and 
> debug calculations.  I just pictured how I would do the calculation on my 
> HP calculator and walked through the steps.  I timed it once, and the 
> extra 
> overhead of using the stack library compared with a hand-crafted sequence 
> of operations was about 25% (I'm sure my implementation could have been 
> improved, it was pretty brute-force).  But the ease of writing the 
> calculation and debugging it - the RPN library won hands down.
>
> On Monday, May 1, 2023 at 9:02:49 AM UTC-4 jkn wrote:
>
>> I got to play with a then- just out Hewlett Packard HP-67 RPN 
>> calculator at the age of around 14. It blew my mind ... and may well 
>> have 
>> directly led to me doing what I do to this day.
>>
>> J^n
>>
>> On Sunday, April 30, 2023 at 5:59:34 PM UTC+1 tbp1...@gmail.com 
>> wrote:
>>
>>> RPCalc is a recent discovery for me. As originally written, it runs 
>>> as a standalone program, and requires Qt5.  You don't need to use the 
>>> installer package for Windows.  Just download the Linux tarball, 
>>> decompress 
>>> it, and navigate to the "source" directory.  The file to run is - 
>>> surprise! 
>>> - rpcalc.py.  It seems to do everything I want from an RPN calculator, 
>>> except that copying the stack bottom is awkward.
>>>
>>> To adapt it for Leo, one change was to combine all the source files 
>>> into one Leo @file tree.  Another was to change the imports to use 
>>> leoQt, 
>>> which makes it easier to adapt to Qt5 vs Qt6, and anyway is essential 
>>> if 
>>> the program is to run in a Leo frame.  I'm still finding little things 
>>> that 
>>> aren't working for both Qt5 and Qt6 - mostly enums and flags - but I'm 
>>> making progress. But overall, most of the functionality works and the 
>>> thing 
>>> is usable as it stands.  I'll post an updated outline soon, and after 
>>> some 
>>> more work it should be ready to appear in the Leo repo.
>>>
>>> On Sunday, April 30, 2023 at 11:55:06 AM UTC-4 jkn wrote:
>>>
>>> I have wondered about suggesting something like this for a while, so 
>>> thank you Thomas. My 'main' editor has a simple HP calculator built 
>>> into it 
>>> and it was an easy step to consider one for Leo.
>>>
>>> I didn't know about RPNCalc (I have some Android RPN apps on my 
>>> phone, as well as a real HP-35s), but it sounds like a good choice.
>>>
>>>
>>>  I've used HP RPN calculators since way back in HP-45 days.  I 
>>> liked the HP-25C even better, and finally ended up using an HP-15C.  
>>> Mine 
>>> still works though it's slightly 

Re: An RPN Calculator For Leo

2023-05-02 Thread jkn
FWIW I sometime use the underscore character in a 'down' sense. So R_ , 
perhaps.

I used to write a fair bit in (La)TeX, and that uses caret ^ for 
superscript, and underscore _ for subscript, so it 'feels' write to me...

J^n

On Monday, May 1, 2023 at 8:18:33 PM UTC+1 tbp1...@gmail.com wrote:

> Much better!  I'll change it soon.  BTW, I'm sorry about *R>* for "Roll 
> Down".  The original code used *R<* and *R>*, apparently because we don't 
> have up and down arrows on a normal keyboard (well, speaking for US English 
> keyboards, anyway).  I changed the one to a caret (*R^*) but there's no 
> similar down symbol one can type.  I could have used a unicode arrow but it 
> can't be typed conveniently.  The way the code works, if you type the 
> string on a button (some of them, anyway) it activates the same command as 
> if you had clicked on its button.
>
> On Monday, May 1, 2023 at 2:22:05 PM UTC-4 jkn wrote:
>
>> Shurely that should be called >CLIP  ? ;-)
>>
>> On Monday, May 1, 2023 at 5:46:45 PM UTC+1 tbp1...@gmail.com wrote:
>>
>>> Devel now contains one more change.  I've changed the *EXIT* key (which 
>>> isn't needed in the Leo tab version of the calculator) to *TOCLIP*. It 
>>> copies the "X" register - the calculation result - to the system clipboard.
>>>
>>> On Monday, May 1, 2023 at 9:31:00 AM UTC-4 Thomas Passin wrote:
>>>
 When I was using TurboPascal and doing a lot of numerical 2-D 
 integrations with complex numbers, I actually wrote a little library 
 module 
 to calculate with complex numbers as if I was using an RPN calculator.  So 
 you could push a complex number on the stack, pop it off, multiply or add 
 the two numbers on the stack bottom, etc.  At that time TurboPascal did 
 not 
 have complex numbers of its own, IIRC.  If N1 and N2 were two complex 
 numbers you could write, for example (based on hazy memories from long 
 ago):

 push(N1)
 push(N2)
 CMul()
 { and so forth, pun intended }

 I enjoyed using the library because it was so easy for me to write and 
 debug calculations.  I just pictured how I would do the calculation on my 
 HP calculator and walked through the steps.  I timed it once, and the 
 extra 
 overhead of using the stack library compared with a hand-crafted sequence 
 of operations was about 25% (I'm sure my implementation could have been 
 improved, it was pretty brute-force).  But the ease of writing the 
 calculation and debugging it - the RPN library won hands down.

 On Monday, May 1, 2023 at 9:02:49 AM UTC-4 jkn wrote:

> I got to play with a then- just out Hewlett Packard HP-67 RPN 
> calculator at the age of around 14. It blew my mind ... and may well have 
> directly led to me doing what I do to this day.
>
> J^n
>
> On Sunday, April 30, 2023 at 5:59:34 PM UTC+1 tbp1...@gmail.com wrote:
>
>> RPCalc is a recent discovery for me. As originally written, it runs 
>> as a standalone program, and requires Qt5.  You don't need to use the 
>> installer package for Windows.  Just download the Linux tarball, 
>> decompress 
>> it, and navigate to the "source" directory.  The file to run is - 
>> surprise! 
>> - rpcalc.py.  It seems to do everything I want from an RPN calculator, 
>> except that copying the stack bottom is awkward.
>>
>> To adapt it for Leo, one change was to combine all the source files 
>> into one Leo @file tree.  Another was to change the imports to use 
>> leoQt, 
>> which makes it easier to adapt to Qt5 vs Qt6, and anyway is essential if 
>> the program is to run in a Leo frame.  I'm still finding little things 
>> that 
>> aren't working for both Qt5 and Qt6 - mostly enums and flags - but I'm 
>> making progress. But overall, most of the functionality works and the 
>> thing 
>> is usable as it stands.  I'll post an updated outline soon, and after 
>> some 
>> more work it should be ready to appear in the Leo repo.
>>
>> On Sunday, April 30, 2023 at 11:55:06 AM UTC-4 jkn wrote:
>>
>> I have wondered about suggesting something like this for a while, so 
>> thank you Thomas. My 'main' editor has a simple HP calculator built into 
>> it 
>> and it was an easy step to consider one for Leo.
>>
>> I didn't know about RPNCalc (I have some Android RPN apps on my 
>> phone, as well as a real HP-35s), but it sounds like a good choice.
>>
>>
>>  I've used HP RPN calculators since way back in HP-45 days.  I 
>> liked the HP-25C even better, and finally ended up using an HP-15C.  
>> Mine 
>> still works though it's slightly misplaced just now.  On my computer 
>> I've 
>> been using Free42, which seems to me to be a good balance between 
>> readability, complexity, and capability.  Now it looks like RPCalc will 
>> be 
>> taking over