leoInteg Follow up

2020-03-26 Thread FĂ©lix
What a crazy world we live in! 

Ok, so, the windows side of thing has been broken for a while. My apologies 
to anyone who tried under windows. 

There was a difference in the way these OSes handle the custom filesystem 
behavior that I did not see at all. (so saving before renaming to block 
redos when a node selection changes was broken specifically under windows. 
This breaks leo node editing)

I did not see that because I was mostly working in linux 99% of the time, 
where everything ran smoothly.

Because of these windows related bugs, and of work-at-home constraints, I'm 
now working specifically under windows for a while, so that will garanty 
the next release will run smoothly under windows. 

I've added leo file derivation, and refreshing from disk, and mostly all 
basic functionality except for color syntaxing and matching line numbers. 
So i'm eager to finish this debuging/rewrite so that the next release will 
be a 'totally usable' version. hopefully. 

Thanks to all who are interested in this project and keep yourself Healthy !

-- 
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/0ad1fa3d-3e84-41de-a20a-7f206d651527%40googlegroups.com.


Re: What's next, continued

2020-03-26 Thread Thomas Passin
All right, I've added the XHML DOCTYPE, the namespace declarations to the 
html element, and enclosed the body in  tags.  I also added a 
closing  tag.  These tags weren't really needed for HTML - an HTML 
processor is required to infer them if missing - but for XHTML, you should 
be complete.

And yes, this version does work with the short form version of an  
element.

These changes to viewrendered3.py are available in the VR3 branch of my 
repo at

https://github.com/tbpassin/leo-editor

On Thursday, March 26, 2020 at 4:26:53 PM UTC-4, Thomas Passin wrote:

>
> [Later] According to 
> https://github.com/Python-Markdown/markdown/issues/492, Python MD produces 
> XHTML fragments.  I should add an XHTML DOCTYPE to the document header, 
> then.  I'll do that.
>

-- 
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/a5c0ce17-a121-4838-828b-db09ab1d2e77%40googlegroups.com.


Re: What's next, continued

2020-03-26 Thread Thomas Passin
On Thursday, March 26, 2020 at 12:31:52 PM UTC-4, Edward K. Ream wrote:
>
> On Tuesday, March 24, 2020 at 6:20:15 PM UTC-5, Thomas Passin wrote:
>
> You can also embed an interactive Bokeh plot in a Markdown document using 
>> an iframe.  The second attached screen capture file shows an example.
>>
>
> A nit: You can replace `>` with just `/>`. Like this:
>
>  src="lines.html" frameborder="0" allowfullscreen />
>

As an old XML hand (going back to 1998), I do know that.  But I am under 
the impression that there are some non-XHTML situations where the processor 
still wants to use the long form.  I think that the script element used to 
be one of them (maybe the only one), and strictly speaking, the short form 
isn't legal HTML (though the processors out there are awfully tolerant).  
So I tend to use the long form just to be on the safe side, even though it 
bugs me to see the long form for an empty element.  It's probably not 
needed these days.

Hmm, I should look and see if Docutils and MD are putting out HTML or 
XHTML.,,,[checks] Docutils is putting out XHTML, MD isn't specifying.  That 
would mean the it's effectively HTML, though I'm not sure if the browser is 
calling it HTML 5 or not.

I suppose I should check and see if MD can be persuaded to be more definite 
about 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/faffe09b-9016-4675-808a-99d60f82fb82%40googlegroups.com.


Re: What's next, continued

2020-03-26 Thread Edward K. Ream
On Tuesday, March 24, 2020 at 6:20:15 PM UTC-5, Thomas Passin wrote:

You can also embed an interactive Bokeh plot in a Markdown document using 
> an iframe.  The second attached screen capture file shows an example.
>

A nit: You can replace `>` with just `/>`. Like this:



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/ec44bf63-dd00-48c3-aa24-525fdd3c7a21%40googlegroups.com.


Re: Partially solved: installing holoviews

2020-03-26 Thread Thomas Passin


On Thursday, March 26, 2020 at 10:09:37 AM UTC-4, Edward K. Ream wrote:
>
> [snip]
> *Summary*
>
> Using pip to install matplotlib, bokeh and holoviews works on a Python 3.7 
> conda environment.
>
> Still to do: allow holoviews to use matplotlib.
>
> I still don't understand how to use conda to create Python 3.6 or 3.8 
> environments, but I don't care much at present :-)
>

This all makes me glad I've never worked with Anaconda.  OTOH, it seems 
that a lot of scientific computing is being done with Anaconda installs, so 
it's working for *some* folks. Maybe it's just all too complicated for its 
own good. 

-- 
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/97e4b145-30c1-47d5-a3fe-21ac0b99796a%40googlegroups.com.


Partially solved: installing holoviews

2020-03-26 Thread Edward K. Ream
As far as conda environments go, I don't want to be the clueless newbie who 
disses something I barely understand.  Suffice it to say that I haven't 
been able to create conda environments for Python 3.6 or 3.8 that work with 
Qt.  It's likely a setting somewhere, perhaps a setting that should have 
been deleted, and wasn't...

For now, I'm happy to use just Python 3.7.  That being so, I did the 
following:

1. Create py37, based on my base env: `conda create --name py37 --clone 
base`

2. Create holo37, based on py37: `conda create --name holo37 --clone py37`

Both of these envs run Leo properly.

3. Within the holo37 env, I used pip to install packages, in the order that 
Thomas used (without installing Leo):

- matplotlib
- bokeh
- holoviews

Note: matplotlib and bokeh had already been installed. My guess is that 
these two packages are part of the full Anaconda distro, but maybe I had 
installed them somehow previously.

Finally, I pip installed holoviews. Success. This *uninstalled* and then 
*reinstalled 
*bokeh, and also holoviews.

*Still to do*

The following still crashes:

import holoviews as hv
hv.extension('matplotlib')

Presumably I need to install something else.

*Summary*

Using pip to install matplotlib, bokeh and holoviews works on a Python 3.7 
conda environment.

Still to do: allow holoviews to use matplotlib.

I still don't understand how to use conda to create Python 3.6 or 3.8 
environments, but I don't care much at present :-)

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/c0ead85e-d40f-465d-8259-ae5646a1a6d7%40googlegroups.com.


Re: Proposed change to setup.py

2020-03-26 Thread Thomas Passin
I still don't understand what "--editable" accomplishes, so I've never used 
it.

What I do, when I want to run from a git clone, is to set PYTHONPATH to the 
top directory of the clone.  Then Python will use, say, the Leo clone but 
it find all its other packages from the regular installed site-packages 
directory.  If I'm working on code for Leo, I keep the working code in a 
separate development directory, and bind a hot key to a little script that 
copies that file or files to the git clone.

This way, if the clone gets trashed somehow, I haven't lost any work.  I 
can just copy it to a new clone.

This approach is also compatible with using a virtual environment.

On Thursday, March 26, 2020 at 2:00:41 AM UTC-4, tfer wrote:
>
> I've been making a mistake in setting up Leo and using it for years!
>
> I've always run Leo from my local git clone of it, (usually the develop 
> branch), never realizing I should have been using setup.py to make sure the 
> python it is running under is fully ready to support it.  I just used 
> launchleo.py to start it, adding any packages that it complained about as 
> "missing" and carrying on.
>
> I was using the very "fat" anaconda as my system python and not using any 
> virtual environments.  Now that their conda utility program has been made 
> to work under powershell, (it only worked "cmd", before), --note use 
> "/conda init" to integrate it into powershell, I realiize 
> this wasn't the way to go.
>
> I got rid of Anaconda, (not easy, uninstall and getting rid of 
> directories...), then just went with Miniconda.  I now can create conda 
> env(s), leobase, leobase1, leobase2, and so on.  This is were I finally 
> tumbled on what setup.py was for!  
>
> My first naive approach was to run the script directly with the leobase 
> enviroment active, but it does not run completely this way, (it does a 
> bunch of stuff, then exits with a failed import).  I found (and Matt 
> pointed out to me), that I should be using pip, specifically: "pip install 
> --editable ." --while in the git directory of leo.
>
> Anyway, I expanded the docstring of setup.py and put in a guard to prevent 
> anyone from using it naively like I did.   I've attached below.
>

-- 
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/0116e10a-0448-442e-a009-73ca5874eb1b%40googlegroups.com.


Re: Dark theme

2020-03-26 Thread Edward K. Ream
On Thu, Mar 26, 2020 at 6:44 AM Ville M. Vainio  wrote:

> Thanks, this is what I needed :)
>

You're welcome.

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


Re: Dark theme

2020-03-26 Thread Ville M. Vainio
Thanks, this is what I needed :)

On Thu, Mar 26, 2020 at 12:45 PM Edward K. Ream  wrote:

> On Thu, Mar 26, 2020 at 1:58 AM Ville M. Vainio 
> wrote:
>
>> It requires contextual knowledge like "what is a theme file". The
>> question promises to answer the question about dark theme in particular, so
>> could add that to the example?
>>
>
> Good point. I have generalized the question and the answer:
> http://leoeditor.com/FAQ.html#how-do-i-enable-a-theme-leo-file
>
> 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/CAMF8tS1LL-Z0JuLPW1VfMcmWcZVD-qiu9aUde18gYTAg6X2jjQ%40mail.gmail.com
> 
> .
>

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


Conda environment problems

2020-03-26 Thread Edward K. Ream
I'm starting a new thread for this. The problems have nothing to do with 
holoviews.

I created two new conda environments, py26 and py28:

conda create -n py36 python=3.6
conda create -n py38 python=3.8

In each of these envs, when I tried to start Leo I got:

leoQt.py: can not fully import PyQt5.
Traceback (most recent call last):

  File "c:\leo.repo\leo-editor\leo\core\leoQt.py", line 52, in 
from PyQt5 import QtCore

ImportError: Module use of python37.dll conflicts with this version of 
Python.

Traceback (most recent call last):
  File "c:\leo.repo\leo-editor\launchLeo.py", line 7, in 
import leo.core.runLeo
  File "c:\leo.repo\leo-editor\leo\core\runLeo.py", line 25, in 
g.app = leoApp.LeoApp()
  File "c:\leo.repo\leo-editor\leo\core\leoApp.py", line 338, in __init__
import leo.core.leoFrame as leoFrame
  File "c:\leo.repo\leo-editor\leo\core\leoFrame.py", line 13, in 
import leo.core.leoColorizer as leoColorizer
  File "c:\leo.repo\leo-editor\leo\core\leoColorizer.py", line 18, in 

from leo.core.leoQt import Qsci, QtGui, QtWidgets
  File "c:\leo.repo\leo-editor\leo\core\leoQt.py", line 82, in 
qt_version = QtCore.QT_VERSION_STR
NameError: name 'QtCore' is not defined

I think this can be called good news :-) Note that my base env uses Python 
3.7.6. 

It seems strange that conda isn't upgrading qt! Somehow I must upgrade qt 
in the each env so that qt uses a compatible dll.

Any comments or suggestions?

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/34654914-16b6-4821-8921-b60e2f0de6ce%40googlegroups.com.


Re: Dark theme

2020-03-26 Thread Edward K. Ream
On Thu, Mar 26, 2020 at 1:58 AM Ville M. Vainio  wrote:

> It requires contextual knowledge like "what is a theme file". The question
> promises to answer the question about dark theme in particular, so could
> add that to the example?
>

Good point. I have generalized the question and the answer:
http://leoeditor.com/FAQ.html#how-do-i-enable-a-theme-leo-file

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/CAMF8tS1LL-Z0JuLPW1VfMcmWcZVD-qiu9aUde18gYTAg6X2jjQ%40mail.gmail.com.


Re: Proposed change to setup.py

2020-03-26 Thread Edward K. Ream
On Thu, Mar 26, 2020 at 1:00 AM 'tfer' via leo-editor <
leo-editor@googlegroups.com> wrote:

> I've been making a mistake in setting up Leo and using it for years!
>

Yeah, setup.py has confused a lot of people.

Anyway, I expanded the docstring of setup.py and put in a guard to prevent
> anyone from using it naively like I did.   I've attached below.
>

Looks good to me. Matt, any comments?

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


Re: What's next, continued

2020-03-26 Thread Edward K. Ream
On Wed, Mar 25, 2020 at 6:12 PM Thomas Passin  wrote:

> I installed Holoviews with pip on my Python 3.6 installation on a Linux
> Mint VM.  After installation, the code above worked, and so did the bokeh
> example.  Python was not upgraded to 3.8.  So that must be an Anaconda
> thing.
>

Thanks. You have suggested several ways forward. I'll be working on this
today.

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/CAMF8tS3PL%2BVkZ%3D88rZFSsbmaK8LtAhkMGRVMh6_595qNp2YeKw%40mail.gmail.com.