Re: ENB: Syntax coloring in leoInteg

2020-06-29 Thread 'tfer' via leo-editor
Another possibility on the vscode side would be to create a syntax file 
that is the union of the leosyntax and the language in effect for the node.

On Sunday, June 28, 2020 at 12:23:27 PM UTC-4, Edward K. Ream wrote:
>
> On Sun, Jun 28, 2020 at 8:11 AM Edward K. Ream wrote:
>
> >  leoInteg's colorizing code will likely use an LSP. The LSP can be 
> written in python, which means a repackaging of Leo's existing colorizing 
> code may be possible.
>
> Yes, Leo's LSP *could* be written in python, but that may not be the 
> easiest way. Leo's LSP will likely delegate most coloring to vs-code's 
> default colorizers for the @language in effect. This would likely be 
> easiest to do in ts. 
>
> Leo's LSP would (sometimes!) break body text into chunks consisting of a 
> range of lines to be colored by the same language, with only *Leonine 
> lines* (lines containing Leo directives and section references) being 
> colored using syntaxes/leoBody.tmLanguage.json.
>
> *It should be possible to avoid re-calculating chunks on every keystroke*. 
> After all, existing vs-code colorizers almost certainly do not re-tokenize 
> the entire file on every keystroke. Figuring how to avoid this 
> recalculation is next on my study list.
>
> 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/e9e0db33-333c-4d38-91fb-d2188d06e6b0o%40googlegroups.com.


Re: Body pane's color syntax highlighting

2020-06-13 Thread 'tfer' via leo-editor


On Saturday, June 13, 2020 at 4:02:26 AM UTC-4, Félix wrote:
>
> Thanks that is good input.  I'm considering this. There's also the 
> 'injectable' aspect of grammars in vscode that i'm thinking of using for 
> coloring the directives specific to leo. 
>
That's something I hadn't considered, good point.
 

> I'm currently learning the 'textmate' grammar definition that's used in 
> vscode. Still not 100% sure of the final approach i'll use but i got some 
> good ideas now. 
>
> gonna continue reading and trying out more stuff with this tomorrow
>

Would you explain a bit of the vscode/leo back and forth over the 
websocket? You implemented a gnx based "filesystem" for body text and a 
vscode "file browser" to serve as the outline tree, (if I'm understanding 
things correctly).  Do you use the websocket and leobridge to update the 
internal state of the associated commander, (e.g. its vnodes), on a 
transaction by transaction basis?  Does leo handle the weaving/saving?

I ask because I'm thinking of hooking leo to neovim.

Tom

-- 
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/4b18f3e7-0a7e-4c45-a8f0-62a739eb5d7co%40googlegroups.com.


Re: Body pane's color syntax highlighting

2020-06-13 Thread 'tfer' via leo-editor
As far as getting syntax coloring of body text in vscode, just have leo 
give you what language it considers the body to be and have your extension 
change it to that language.  That should be possible as you can click on 
the "applied" language in thy status bar at the bottom of vscode and change 
to another language from the list that pops up.

Tom

On Friday, June 12, 2020 at 9:55:48 PM UTC-4, Félix wrote:
>
> The second option 
>
> >  Follow the example of the pygments code, and alter the js coloring code 
> to handle Leo directives and section references.
>
> Is what I'm going for to get some coloring started in leoInteg. It's 
> something that may get revisited later as the feature grows in maturity... 
>
> I'm going to define the same languages dependant highlighting as leo, 
> along with the syntax highlighting for @xxx directives and <>  
> references by converting to the formats required by vscode :) 
>
> I'll start with the directives and references to get the generic 'Leo' 
> feel of an opened body pane.
>
> thanks again for the tips :) 
>
>
> On Friday, June 5, 2020 at 6:08:42 PM UTC-4, Edward K. Ream wrote:
>>
>>
>>
>> On Thu, Jun 4, 2020 at 4:02 PM Félix  wrote:
>>
>>> Thanks! 
>>>
>>
>> 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/fbd5c4b8-b780-40ca-8509-bdda7a6ee9b1o%40googlegroups.com.


Re: iLeo not working

2020-05-20 Thread 'tfer' via leo-editor
Thanks Lewis, I'll give it a try

On Wednesday, May 20, 2020 at 4:40:04 AM UTC-4, lewis wrote:
>
> launchleo.py --ipython
> is working again with ipython version 7.14.0, and QtConsole version 4.7.4
>
>
>
>
>
> *Leo Log WindowLeo 6.3-devel, devel branch, build e7f2e02cc62020-05-18 
> 06:55:35 -0500Python 3.8.2, PyQt version 5.14.2Windows 10 AMD64 (build 
> 10.0.18362) SP0*
>
> Regards
> Lewis
>

-- 
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/86081090-3345-409e-a55d-d32c50634888%40googlegroups.com.


Re: ENB: rethinking Model/View/Controller split in Leo

2020-05-07 Thread 'tfer' via leo-editor
Thanks Matt and Thomas, I'll look into that.  It's not that I want to avoid 
Zoom so much, I want to demonstrate some work flow stuff, (Windows 10, some 
Powershell stuff, and It's virtual workspace), so that's why I need to show 
what's on my screen.
If anyone is interested, and it's okay with Edward more people could jump on 
the call .
 
>>> A 'live' reference to an object that will change in real-time...
  -- I like that a lot, I'll probably add it in my rework of the documentation, 
thanks Felix

-- 
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/d9867f12-ef72-4487-8b9b-e4f507f220ab%40googlegroups.com.


Re: ENB: rethinking Model/View/Controller split in Leo

2020-05-06 Thread 'tfer' via leo-editor
>>> I've never had a problem with the term as used in Leo.  To me, it conveys 
>>> 1) that a (clone) node looks different from another because it appears in a 
>>> different place, but 2) if you look closer, it's exactly the same inside. 

I'm not saying that the term that the term should be abandoned, just that it 
should have the points that you see, mentioned more explicitly in the 
documentation.  Personally, my understanding of cloning from biology lead me 
astray.

"Clone" is as term of art, it's just that it's meaning in Leo is more 
specialized than it is in general usage.

I've had trouble in the past trying to get my point across to Edward, I suspect 
that in part, this is due to different thinking styles, I tend to see thinks 
visually, coming up with a mental model, and elaborating on that so it has all 
the behavior of the system I'm modeling.

Leo sucks me in every time I come back for a visit, (it's a pleasant side trip 
each time), currently, I've been pulled towards a review of the documentation. 
Going round and round with Sphinx trying to get a PDF rendering as I find that 
easiest to review.

In a week or so, I'd like to do some teleconferencing with Edward, (not Zoom, 
but something with the ability to share computer screens), so I can do a show 
and tell on some of the stuff in Leo I'm working on.
Tom

-- 
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/0ad2cdcd-a9a2-490c-a625-1977b52dc935%40googlegroups.com.


Re: ENB: rethinking Model/View/Controller split in Leo

2020-05-06 Thread 'tfer' via leo-editor
I've expressed before that I feel that the use of the word "clone", does 
not really capture what we are doing here, in fact, due to its use in 
biology, it leads to some incorrect thinking about what is going on.  In 
biology, a clone is a separate entity with its own life-cycle, they have 
the same DNA, but can have entirely different lives.  In Leo, a clone is 
the same entity, what you do to it in one place, (or to its descendants), 
gets passed on to the clones in all the other places, not because of some 
code running in the background updating all the copies, there are no 
copies, there is only one node, but it is reachable from multiple places.

In the talk on Leo I gave at PyOhio, (to which there is a link Leo  
documentation), I tried to convey this by making an analogy to the computer 
game "Portal", if you have some room you want to get to, you can create 
multiple ways to get to it with your portal gun. There is only one room, 
but now you have made several different ways to get to it.

In a recent thread, Edward said that a clone is a node with multiple 
parents.  That was revelatory to me, I'm still thinking over the 
implications of that.  To me it shifts what "being a clone" means from the 
node to the path to the node.  Visually, it means that when walking down 
the corridor to our node, there are now side corridors that join into it 
from anywhere we want in own outline.  

On Monday, May 4, 2020 at 12:23:08 AM UTC-4, Thomas Passin wrote:
>
> I'm always in favor of good separation of interests.  It can be hard to 
> achieve in practice, and it's always helpful to be diligent about keeping 
> one's eye on the ball.  What I'm reading here sounds pretty interesting.
>
> About clones, we always talk about cloning nodes, but it seems to me that 
> what actually gets cloned is an entire subtree - that is, the clone 
> includes (clones of) a node's descendants.  Perhaps a change in the 
> conceptual model of clones from nodes to subtrees would make it easier to 
> work out how to handle them.
>
> I'm not sure how a subtree is currently modeled in Leo.  Since a tree can 
> be built out of nodes that have child and parent nodes,  one can be 
> constructed without an explicit model for a (sub)tree.  But since many 
> operations we want to do are really on (sub)trees and not nodes, maybe an 
> explicit tree concept in addition to a node concept would be useful(if 
> there isn't one already).
>
> On Sunday, May 3, 2020 at 6:12:04 PM UTC-4, SegundoBob wrote:
>>
>> I've been thinking about implementing a directed graph editor for a long 
>> time.  Of course, most of my thinking is based on my use of Leo-Editor and 
>> my limited understanding of its internals.  I've done only a little 
>> implementation of my ideas.  I have not produced anything of use to me or 
>> of interest to anyone else.
>>
>> But several months ago, I concluded that Leo-Editor positions are a very 
>> bad idea and that using  GNX's instead would be much simpler and much more 
>> robust.  I also concluded that in a directed graph, I don't need clones 
>> because multiple parents is no big deal in a directed graph.  Consequently, 
>> I stopped worrying about clones.  So I don't know if clones make GNX's 
>> inadequate as pointers, requiring that v-nodes be used as pointers instead 
>> of just GNX's.
>>
>> For the little it is worth, in so far as I understand Vitalije, and I 
>> don't completely understand him, I think he is right.
>>
>> Respectfully,
>> SegundoBob
>>
>

-- 
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/9d69b6f1-179c-48aa-9f24-1979ed5a8b02%40googlegroups.com.


Re: Pyzo as a live Leo explorer

2020-04-19 Thread 'tfer' via leo-editor
Yeah, It been a few years since I've played with it too, but it should be 
useful for exploring the running instance of Leo, and put it though its 
paces.

On Sunday, April 19, 2020 at 9:35:18 PM UTC-4, Thomas Passin wrote:
>
>
> On Sunday, April 19, 2020 at 7:59:58 PM UTC-4, tfer wrote:
>>
>>
>> On Sunday, April 19, 2020 at 6:16:54 PM UTC-4, Thomas Passin wrote:
>>>
>>> No, not IPython.
>>>
>>
>> As text has no vocal inflection, I don't now what you mean by this, do 
>> you mean:
>> No, not IPython! --> as in "I don't like/use it", or something else?
>>
>
> Well, literally I meant only that I didn't set up the Pyzo shell to use 
> it. A little deeper, and I haven't fired up an IPython shell for years, and 
> I wouldn't know how to take advantage of it in our current context.  So I 
> didn't go futzing around with it before posting my response, since I 
> couldn't have added anything useful.
>

-- 
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/983d8930-376a-4409-a1bb-03ae0c504669%40googlegroups.com.


Re: Pyzo as a live Leo explorer

2020-04-19 Thread 'tfer' via leo-editor


On Sunday, April 19, 2020 at 6:24:28 PM UTC-4, Thomas Passin wrote:
>
>
> When I run command [4] in the Python console tab inside Leo (not the Pyzo 
> shell), I get this:
>
Not sure how to get, where is a 'consoletab', It must only appear with some 
start up option.  Nothing in the doc, though I have seen once.
 

> >>> g.commander_command('new') 
>
> 
>
> And also in the console tab:
>
 

> >>> import leo
>
> >>> help(leo.commands.commanderFileCommands.new)
>
> Help on function new in module leo.commands.commanderFileCommands:
>
>
> new(self, event=None, gui=None)
>
> Create a new Leo window.
>
>
> I'm not sure what object is needed for self...
>
>
>
>

-- 
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/249021fa-31f3-4a95-9f61-439261db6cbf%40googlegroups.com.


Re: Pyzo as a live Leo explorer

2020-04-19 Thread 'tfer' via leo-editor


On Sunday, April 19, 2020 at 6:16:54 PM UTC-4, Thomas Passin wrote:
>
> No, not IPython.
>

As text has no vocal inflection, I don't now what you mean by this, do you 
mean:
No, not IPython! --> as in "I don't like/use it", or something else?

Tom 

-- 
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/ec0c79f1-a812-40a5-8347-927b26de1a6f%40googlegroups.com.


Re: Is there any user-friendly installer for Leo?

2020-04-19 Thread 'tfer' via leo-editor
Since you're using powershell, setting up the git repository to use scoop 
might be the simplest solution to this.  Of course that needs to be done by 
us so it would support scoop installs.

Tom

-- 
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/e7e6e634-03e0-425f-9d01-43c1868f1e48%40googlegroups.com.


Re: Pyzo as a live Leo explorer

2020-04-19 Thread 'tfer' via leo-editor
Okay, I've made some progress.  Turns out, I was erroneously assumed I was 
in an IPython shell because it had 'magics', but it was just the idle 
interpreter, (never spent much time in Idle).  All it took was creating a 
new shell config, and ticking the IPython box.

I'm going paste in some of the shell interaction with comments interspersed 
and a question.

Python 3.7.7 (default, Apr 15 2020, 05:09:04) on Windows (64 bits).

This is the Pyzo interpreter with integrated event loop for PYQT5.



Using IPython 7.13.0 -- An enhanced Interactive Python.

? -> Introduction and overview of IPython's features.

%quickref -> Quick reference.

help  -> Python's own help system.

object?   -> Details about 'object', use 'object??' for extra details.



In [1]: whos  #this is before I started "launchLeo.py" with F5

Interactive namespace is empty.



In [2]: (executing file "launchLeo.py")

Qt WebEngine seems to be initialized from a plugin. Please set 
Qt::AA_ShareOpenGLContexts 
using QCoreApplication::setAttribute before constructing QGuiApplication.



Leo 6.3-devel, devel branch, build cbb73524c3

2020-04-15 04:24:37 -0500

Note on using QApplication.exec_():

The GUI event loop is already running in the pyzo kernel, and exec_()

does not block. In most cases your app should run fine without the need

for modifications. For clarity, this is what the pyzo kernel does:

- Prevent deletion of objects in the local scope of functions leading to 
exec_()

- Prevent system exit right after the exec_() call


In [3]: whos #note our workspace is now populated with stuff from Leo!

Variable Type  Data/Info



leo  moduleditor\\leo\\__init__.py'>

load_locals  dict  n=6

runMainLoop_locals   dict  n=1

run_locals   dict  n=4


In [4]: g.commander_command('new') # naive attempt open a new file in Leo

---

NameError Traceback (most recent call last)

 in 

> 1 g.commander_command('new')


NameError: name 'g' is not defined

/*
Hmm, 'g' is not availible, let's try a fully qualified name, reaching down 
from the 'leo' we saw from In [3]: whos : 
*/

In [5]: leo.commands.commanderFileCommands.new() # so here is my 
question,what should I use for my argument?

---

TypeError Traceback (most recent call last)

 in 

> 1 leo.commands.commanderFileCommands.new()


TypeError: new() missing 1 required positional argument: 'self'


In [6]:

The question is at In [5] above, I guess it would be 'g.app', but 'g' isn't 
available, any suggestions?

Doing things like this is the reason I first started looking at IPython, to 
provide a way to explore Leo code.

Tom


-- 
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/28f56ca2-3181-4595-8fb3-a9b567bdb8e5%40googlegroups.com.


Re: Pyzo as a live Leo explorer

2020-04-18 Thread 'tfer' via leo-editor
Got another warning after Leo starts:

Leo 6.3-devel, devel branch, build cbb73524c3

2020-04-15 04:24:37 -0500

Note on using QApplication.exec_():

The GUI event loop is already running in the pyzo kernel, and exec_()

does not block. In most cases your app should run fine without the need

for modifications. For clarity, this is what the pyzo kernel does:

- Prevent deletion of objects in the local scope of functions leading to 
exec_()

- Prevent system exit right after the exec_() call


Tom 

-- 
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/82eb552e-2a7b-492c-95b1-1c114c0976b2%40googlegroups.com.


Re: Pyzo as a live Leo explorer

2020-04-18 Thread 'tfer' via leo-editor
Though I'm using a conda env, pip is not conda related.  From what I've 
seen, they must not have a complete requirement clause in their setup.py as 
the pip install, if done before the pip install -e . for leo, doesn't load 
in any pytq stuff so it won't run until leo does that for you.

I'm curious, is your shell in IPython instance, (try? to see if it has 
magics)?  I did not get that until I change Leo's requirement to "notebook".

Having Ipython running adds a lot of inspection stuff.

On Saturday, April 18, 2020 at 6:41:37 PM UTC-4, Thomas Passin wrote:
>
>
>
> On Saturday, April 18, 2020 at 4:58:58 PM UTC-4, tfer wrote:
>>
>> Okay, I'm playing with this, getting interesting results:
>>
>  [snip]
>
>> pip install pyzo
>>
>
> I installed Pyzo using the standalone installer.  I don't know if that 
> would make any difference in what you are doing or not.  But at least it 
> doesn't depend  directly on Conda. 
>

-- 
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/ca175c59-44ad-4074-9e95-1885974d7918%40googlegroups.com.


Re: Pyzo as a live Leo explorer

2020-04-18 Thread 'tfer' via leo-editor
Okay, I'm playing with this, getting interesting results.

   - Working on Windows 10
   - Using Miniconda
   - Using powershell instance(s) in Conemu
  1. setup posh-git to integrate git into powershell
 - easiest installed with scoop from the extras bucket
  2. setup conda to integrate it into powershell
 - involves running: conda init
  - Making a conda env and then customizing:
   

   1. conda create --name lpik_3.7 python=3.7 ipykernel
  1. initials indicating:
1. l - leo
2. p - pyzo
3. i - IPython
4. k - kernel, (an ipykernel, registered to run Juypter 
Notebooks)
 2. pip install -e .
  1. run inside the repository directory, this set up the env so Leo 
 will have the packages it needs
 2. Note: in setup.py, I've commented out the 'nbformat' and 
 replaced it with 'notebook'
1. This gives the env the packages to run IPython, and Jupyter 
Notebooks
 3. pip install pyzo
  4. Now when you follow Matt's instructions, and open the shell, it 
  will have IPython interpreter running in it
  5. Pressing F5, Leo will start
 1. Once you close any blocking dialog boxes, (like Tips, or This 
 file may already Open ...), you'll get the IPython prompt back in the 
pyzo 
 shell.
  - back there, you can use the magic command - 'notebook' to start a 
  Juypter Notebook
 - even though I've registered this env with step 1. above, it is 
 not showing in the kernel options, so the notebook is not what we want 
yet
  
Note: I get this warning in the shell when starting Leo:

>>> (executing file "launchLeo.py")

Qt WebEngine seems to be initialized from a plugin. Please set 
Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before 
constructing QGuiApplication.


Not sure how to do what it is asking.


Tom

-- 
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/59d76826-408f-4fea-8e44-19c0ef5930ac%40googlegroups.com.


Re: iLeo not working

2020-04-06 Thread 'tfer' via leo-editor
Much as I find things.  The console indicates that a kernel has been been 
started, but the qt compatible event loop did not start, no qt-console with 
IPython appears, Leo remains in a hang state.

The problem is probably in the IPython code, they're changing everything to 
use Juypter Notebooks, warning that all the options are being depreciated, 
I think they already messed them up.

I was messing with this because I had come across code that let you hook a 
IPython's kernel into a Juypter notebook, but things are in such flux, 
perhaps it's best to wait for the next release of Jupyter, and make a 
JuypterBridge.

On Monday, April 6, 2020 at 6:10:00 PM UTC-4, Matt Wilkie wrote:
>
>
> *Summary:* `pip install notebook matplotlib` is enough to get Leo iself 
> working with python 3.6 (windows) but I'm not sure if the ipython 
> connection is working/usable.
>
> -matt
>
>

-- 
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/d7876411-0186-4cd1-8964-81f32dce7559%40googlegroups.com.


Re: iLeo not working

2020-04-06 Thread 'tfer' via leo-editor
Not sure if the above trace is capturing the problem, running with trace 
enable changes how thing go, without tracing Leo hangs with its main widow 
open but no panes populating it, with the above, it did draw the pane then 
closed.

Tried another run with:

(lb-3.7) C:\VC\git\leo-editor [devel ≡ +3 ~3 -0 !]> python -m trace --trace 
launchLeo.py --ipython


and then froze with (not responding) in the title bar. Trace froze also, 
tail is:

 --- modulename: py3compat, funcname: encode
py3compat.py(20): encoding = encoding or DEFAULT_ENCODING
py3compat.py(21): return u.encode(encoding, "replace")
iostream.py(296): self.parent_header = {}
iostream.py(297): self._master_pid = os.getpid()
iostream.py(298): self._flush_pending = False
iostream.py(299): self._io_loop = pub_thread.io_loop
iostream.py(300): self._new_buffer()
 --- modulename: iostream, funcname: _new_buffer
iostream.py(436): self._buffer = StringIO()
iostream.py(301): self.echo = None
iostream.py(303): if echo:

-- 
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/62d6c5c8-f2d2-46ee-bb0e-57e3c93da576%40googlegroups.com.


Re: iLeo not working

2020-04-05 Thread 'tfer' via leo-editor
Running:

python -m trace --trace  .\launchLeo.py --ipython

A long trace, the app loaded the last session, then closed with this being 
the tail of the output:

(104): (105): 
(106): (108): 
(109): (110): 
(111): (112):  
--- modulename: _bootstrap, funcname: cb
Traceback (most recent call last):
  File "C:\ProgramData\Miniconda3\envs\lb-3.7\lib\runpy.py", line 193, in 
_run_module_as_main
"__main__", mod_spec)
  File "C:\ProgramData\Miniconda3\envs\lb-3.7\lib\runpy.py", line 85, in 
_run_code
exec(code, run_globals)
  File "C:\ProgramData\Miniconda3\envs\lb-3.7\lib\trace.py", line 736, in 

main()
  File "C:\ProgramData\Miniconda3\envs\lb-3.7\lib\trace.py", line 724, in 
main
t.runctx(code, globs, globs)
  File "C:\ProgramData\Miniconda3\envs\lb-3.7\lib\trace.py", line 450, in 
runctx
exec(cmd, globals, locals)
  File ".\launchLeo.py", line 8, in 
leo.core.runLeo.run()
  File ".\leo\core\runLeo.py", line 68, in run
  File ".\leo\core\leoApp.py", line 2647, in load
  File ".\leo\plugins\qt_gui.py", line 1326, in runMainLoop
  File ".\leo\plugins\qt_gui.py", line 1424, in show_tips
ModuleNotFoundError: No module named 'leo.core.leoTips'
(177): (178): 
(182): (183): 
(185):

Not sure if this is telling me anything.

-- 
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/54b19404-dc60-4dcb-bc97-bf59d3041de7%40googlegroups.com.


Re: iLeo not working

2020-04-03 Thread 'tfer' via leo-editor
created a fresh 3.7 virtual env, changed requrement in setup.py from 
nbformat to notebook, ran pip install -e ., then launched:

(lb-3.7) C:\VC\git\leo-editor [devel ≡ +3 ~2 -0 !]> python .\launchLeo.py 
--ipython  

 
Leo 6.3-devel, devel branch, build 269d953c87  
  
2020-04-03 10:51:14 +0200  
  
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
 

 
To exit, you will have to explicitly quit this process, by either sending  
  
"quit" from a client, or using Ctrl-\ in UNIX-like environments.
 

 
To read more about this, see 
https://github.com/ipython/ipython/issues/2049  

 

 
To connect another client to this kernel, use:  
 
--existing kernel-3352.json
  
[IPKernelApp] WARNING | Eventloop or matplotlib integration failed. Is 
matplotlib installed? 
new_qt_console   
 


Leo hung with a mostly blank window 

On Friday, April 3, 2020 at 10:33:31 AM UTC-4, Thomas Passin wrote:
>
> It's not going to work with Python 3.8 either.  There's been some change 
> to the asnyc API that Tornado hasn't adjusted to.  I believe there is a 
> workaround, but I don't have the reference handy.
>
> [Later - found reference:  
> https://github.com/tornadoweb/tornado/issues/2608]
>
> py38 -m leo.core.runLeo --ipython
>
> ...
>   File 
> "C:\Users\tom\AppData\Local\Programs\Python\Python38\lib\site-packages\tornado\platform\asyncio.py",
>  
> line 99, in add_handler
> self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
>
>   File 
> "C:\Users\tom\AppData\Local\Programs\Python\Python38\lib\asyncio\events.py", 
> line 501, in add_reader
> raise NotImplementedError
>
> On Friday, April 3, 2020 at 9:18:38 AM UTC-4, Edward K. Ream wrote:
>>
>> On Fri, Apr 3, 2020 at 4:23 AM 'tfer' via leo-editor <
>> leo-e...@googlegroups.com> wrote:
>>
>> Trying to start the iPython Bridge:
>>>
>>
>> I don't see the ipython console either. Python 3.7.6. matplotlib 
>> installed.
>>
>> I've just created #1561 
>> <https://github.com/leo-editor/leo-editor/issues/1561> for 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/e3ff43e6-edfb-41cb-9e56-930b6c9655df%40googlegroups.com.


Re: iLeo not working

2020-04-03 Thread 'tfer' via leo-editor

pip installed matplotlib, no change

-- 
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/891ce68a-4d11-4fa4-a618-ddb5b5a84b72%40googlegroups.com.


Re: iLeo not working

2020-04-03 Thread 'tfer' via leo-editor
Progress, but not there yet.  DLL problem seems to be a Python 3.8 problem, 
related to a security restriction in the search path for dll's.  Temp fix 
was to copy them into c:/Windows/System32.  Now Leo starts but:

(leobase2) C:\VC\git\leo-editor [devel ≡ +3 ~2 -0 !]> python .\launchLeo.py 
--ipython

Leo 6.3-devel, devel branch, build 269d953c87
2020-04-03 10:51:14 +0200
NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049


To connect another client to this kernel, use:
--existing kernel-18488.json
[IPKernelApp] WARNING | Eventloop or matplotlib integration failed. Is 
matplotlib installed?
new_qt_console 

No iPython qt-console opens

-- 
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/ec27d636-1f5c-4de3-b74c-636f76c896ec%40googlegroups.com.


Re: iLeo not working

2020-04-03 Thread 'tfer' via leo-editor
Create a new env, leobase2, ran:

 pip install --editable .

with setuo,py modified so the nbformat requirement was commented out, (to 
do nothing with juypter/iPython).  Then I ran:

pip install notebook

to get all the Juypter/iPython stuff.  Ran:

python .\launchLeo.py --ipython

Got this:
Leo 6.3-devel, devel branch, build 269d953c87
2020-04-03 10:51:14 +0200
kernelApp.initialize failed!
Traceback (most recent call last):

  File "C:\VC\git\leo-editor\leo\plugins\qt_gui.py", line 1345, in 
runWithIpythonKernel
g.app.ipk = leoIPython.InternalIPKernel()

  File "C:\VC\git\leo-editor\leo\core\leoIPython.py", line 98, in __init__
kernelApp = self.pylab_kernel(backend)

  File "C:\VC\git\leo-editor\leo\core\leoIPython.py", line 220, in 
pylab_kernel
kernelApp.initialize(args)

  File "", line 2, in initialize

  File 
"C:\ProgramData\Miniconda3\envs\leobase2\lib\site-packages\traitlets\config\application.py",
 
line 87, in catch_config_error
return method(app, *args, **kwargs)

  File 
"C:\ProgramData\Miniconda3\envs\leobase2\lib\site-packages\ipykernel\kernelapp.py",
 
line 550, in initialize
self.write_connection_file()

  File 
"C:\ProgramData\Miniconda3\envs\leobase2\lib\site-packages\ipykernel\kernelapp.py",
 
line 225, in write_connection_file
write_connection_file(cf, ip=self.ip, key=self.session.key, 
transport=self.transport,

  File 
"C:\ProgramData\Miniconda3\envs\leobase2\lib\site-packages\jupyter_client\connect.py",
 
line 138, in write_connection_file
with secure_write(fname) as f:

  File "C:\ProgramData\Miniconda3\envs\leobase2\lib\contextlib.py", line 
113, in __enter__
return next(self.gen)

  File 
"C:\ProgramData\Miniconda3\envs\leobase2\lib\site-packages\jupyter_core\paths.py",
 
line 435, in secure_write
win32_restrict_file_to_user(fname)

  File 
"C:\ProgramData\Miniconda3\envs\leobase2\lib\site-packages\jupyter_core\paths.py",
 
line 361, in win32_restrict_file_to_user
import win32api

ImportError: DLL load failed while importing win32api: The specified module 
could not be found.

can not init leo.core.leoIPython.py 

 

 

-- 
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/a62de129-fbb5-4d35-b876-f35cc6d1fcec%40googlegroups.com.


Re: iLeo not working

2020-04-03 Thread 'tfer' via leo-editor
should have check here first, google lead me back to:

IPython tweaks and questions 


I'll try suggestions there.

On Friday, April 3, 2020 at 5:23:43 AM UTC-4, tfer wrote:
>
> Trying to start the iPython Bridge:
>
> (leobase) C:\VC\git\leo-editor [devel ≡ +3 ~1 -0 !]> python .\launchLeo.py 
> --ipython
>
>
> I got this in the console:
>
> leoIpython.py: can not import connect_qtconsole
> leoIpython.py: can not import IPKernelApp
> Leo 6.3-devel, devel branch, build 269d953c87
>
>

-- 
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/20751614-a1d2-4cdc-b5b9-eeebb8d33b32%40googlegroups.com.


iLeo not working

2020-04-03 Thread 'tfer' via leo-editor
Trying to start the iPython Bridge:

(leobase) C:\VC\git\leo-editor [devel ≡ +3 ~1 -0 !]> python .\launchLeo.py 
--ipython


I got this in the console:

leoIpython.py: can not import connect_qtconsole
leoIpython.py: can not import IPKernelApp
Leo 6.3-devel, devel branch, build 269d953c87

-- 
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/f0e3c746-07a3-4525-b029-fdff4d95cd88%40googlegroups.com.


Re: About zoom vs leo-editor

2020-03-31 Thread 'tfer' via leo-editor
Just like the outliner "More" provided inspiration for Leo, Leo provides me 
with inspiration for various thinking, capturing, organizing tools.  I've 
mentioned my idea for a presentation plugin for reveal.js, here's another.

Now that solid state memory has freed us from from the micro-cassettes of 
yore, I'm amazed of how little innovation there has been in voice recorder 
apps.  Something that allows for more than labeling a big block of 
narration is needed.

Imagine Leo turned to this task, headlines would label snippets of audio 
captured in their body.  To give a visual representation of the ongoing 
capture, generate a sequence of dashes to represent words, (not exact, more 
to hint and show duration).  You could add to this by adding punctuation 
via the keyboard while dictating.  Headlines can typed in and the snippets 
rearranged/split/combined.  Speech to text can be applied, (more to sharpen 
the visual representation then to provide text, STT is still pretty iffy -- 
but it could do a better job at providing dashes for words, maybe add an 
initial an final letter to some.  The text would be available in another 
pane, a "pacer" would follow along with playback.

The biggest thing this all provides is a way to capture 
thoughts/conversations and a way to access them in a non-linear way.

Tom

-- 
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/d78a1050-8d25-4590-88f2-873a6cf15509%40googlegroups.com.


Re: Leo and Jupyter

2020-03-31 Thread 'tfer' via leo-editor
There is another option we could consider, rather than full juypter stuff, 
just add an Ipython console tab to the log pane.  Though not as sexy as 
Juypter, it has most of its guts, is embed-able, and has a qt-console 
version.

-- 
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/ed579ae6-bba4-4d8a-bdd7-a7d0b10f7c30%40googlegroups.com.


Proposed change to setup.py

2020-03-26 Thread 'tfer' via leo-editor
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/d3d56934-0699-4f7a-abfa-d2c1a35b1bc4%40googlegroups.com.
# -*- coding: utf-8 -*-
#@+leo-ver=5-thin
#@+node:maphew.20180224170853.1: * @file C:/VC/git/leo-editr/setup.py
#@@first
"""setup.py for leo

As the top level setup script in a package, library, or application -- as here, for the leo-editor Application, it is meant to make the package installable in a 'ready to use' state.  If you 'pip install leo-editor' this script will be run.

Note: if you are running Leo out of you own local git copy of leo-editor, you'll need to run the command:
pip install --editable  
   or
pip install --editable .
   if you are in the repository.
"""
#@+others
#@+node:trf.20200325085135.1: ** guard to prevent running at top-level
# This file is only meant to be run by pip, not by itself.
# Below is a guard to prevent that and offer advice.

if __name__ == "__main__" :
print('"setup.py" is only meant to be run by pip.  ')
print('From inside the Leo package directory, please run: ')
print('   pip install --editable .   ')
print('To make Leo fully ready to run')
quit()
#@+node:maphew.20180305124637.1: ** imports
from codecs import open  # To use a consistent encoding
import os
import platform
# from shutil import rmtree
from setuptools import setup, find_packages  # Always prefer setuptools over distutils
import sys


# Ensure setup.py's folder is in module search path else import leo fails
# required for pip >v10 and pyproject.toml
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
import leo.core.leoGlobals as g
import leo.core.leoVersion as leoVersion
#@+node:mhw-nc.20190126224021.1: ** setup janitor
try:
   from setupext_janitor import janitor
   CleanCommand = janitor.CleanCommand
except ImportError:
   CleanCommand = None

cmd_classes = {}
if CleanCommand is not None:
   cmd_classes['clean'] = CleanCommand
#@+node:maphew.20181010203342.385: ** get_version & helper (setup.py)
def get_version(file, version=None):
"""Determine current Leo version. Use git if in checkout, else internal Leo"""
root = os.path.dirname(os.path.realpath(file))
if os.path.exists(os.path.join(root, '.git')):
version = git_version(file)
if not version:
version = get_semver(leoVersion.version)
return version
#@+node:maphew.20181010203342.386: *3* git_version
def git_version(file, version=None):
"""
Fetch from Git: {tag} {distance-from-tag} {current commit hash}
Return as semantic version string compliant with PEP440
"""
root = os.path.dirname(os.path.realpath(file))
try:
tag, distance, commit = g.gitDescribe(root)
# 5.6b2, 55, e1129da
ctag = clean_git_tag(tag)
#version = get_semver(ctag)
version = ctag
if int(distance) > 0:
version = '{}-dev{}'.format(version, distance)
except IndexError:
print('Attempt to `git describe` failed with IndexError')
except FileNotFoundError:
print('Attempt to `git describe` failed with FileNotFoundError')
return version
#@+node:maphew.20180224170257.1: *4* clean_git_tag
def clean_git_tag(tag):
"""Return only version number from tag name. Ignore unknown formats.
   Is specific to tags in Leo's repository.
5.7b1 

Re: Initial F/B for installation of Leo 6.2b1 via pip from PyPI

2020-03-22 Thread 'tfer' via leo-editor
Thanks Matt, I was beginning to suspect there was something like these from 
some of the comments in setup.py, and ran across the "pip -e" variant on 
stack overflow.  I'm going to delete my leobase env and try this to see if 
it get rid of the error. 

On Sunday, March 22, 2020 at 1:26:20 PM UTC-4, Matt Wilkie wrote:
>
>
>
> On Saturday, 21 March 2020 07:32:11 UTC-7, tfer wrote:
>>
>> I been running Leo from a local clone of 'develop' under full Anaconda, 
>> (not using env's, just adding things it complained about missing to the 
>> base site packages).  I've since gone to a miniconda base and created a 
>> conda env 'leobase'.  At some point playing with getting this barebones env 
>> to work, I found out what setup.py is for and realized I should be letting 
>> it handle this.  
>>
>> Running:
>>
>>> ./setup.py develop
>>
>>
> It's prefered to use `pip install --editable path\to\code` over `python 
> setup.py develop`. It has a handler for the dependencies needed just for 
> setup (setup janitor in this instance). More importantly it registers the 
> installed files so they can removed later with `pip uninstall {thing}`. 
> With the `develop` method it's up to you to hunt down all the instances 
> under PYTHONHOME site-packages, scripts, etc. and remove them. See 
> https://stackoverflow.com/questions/30306099/pip-install-editable-vs-python-setup-py-develop
>
> -matt
>

-- 
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/f92b67fa-fd70-49ed-a1b8-95274c28c3a2%40googlegroups.com.


Re: Issues using import

2020-03-21 Thread 'tfer' via leo-editor


On Saturday, February 8, 2020 at 4:53:30 AM UTC-5, Edward K. Ream wrote:
>
> On Thu, Feb 6, 2020 at 4:15 PM 'tfer' via leo-editor <
> leo-e...@googlegroups.com > wrote:
>
>> I'm still having issues with various import types:
>>
>>   1. doing an import via the "File" menu is under the default @tabwidth 
>> -4, needs to be @tabwidth 2 for these files
>> ** this has been the only successful import I have been able to make
>>
>
> This is the hard way. After importing a file, either with the File:Import* 
> commands or with the recursive import script, you should have an @auto, 
> @file or @clean tree. After that, restarting Leo, or using 
> refresh-from-disk will re-import the file.
>
> You are right, that was the hard way.  I don't use the minibuffer much, 
and the context menu didn't seem to have the "refresh from disk" - iitem, 
(maybe that was due to the impression of using a trackpad--or the "Import" 
item blinded me to this item further down, been away from Leo too long).

The new javascript should work for my purposes, though a diff against the 
original file and a @clean saved out version from the import had one extra 
blank line after a block of comments.

I've been sidetracked by Leo itself, working stuff to do with the package 
and testing, I'll report on that in another thread when I get further along.

> After importing, @tabwidth will only affect *new* nodes.
>
> If the contextmenu.py plugin is running, right-clicking a node will bring 
> up a context menu. If that node is any kind of @ node, the context 
> menu will have refresh-from-disk.
>
> 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/a86d7440-5407-4835-82a6-6974e4031036%40googlegroups.com.


Re: Initial F/B for installation of Leo 6.2b1 via pip from PyPI

2020-03-21 Thread 'tfer' via leo-editor
I been running Leo from a local clone of 'develop' under full Anaconda, 
(not using env's, just adding things it complained about missing to the 
base site packages).  I've since gone to a miniconda base and created a 
conda env 'leobase'.  At some point playing with getting this barebones env 
to work, I found out what setup.py is for and realized I should be letting 
it handle this.  

Running:

> ./setup.py develop

in powershell, I found it bombed out due to the 'cleanup with janitor' - 
stuff.  I deleted the offending line and run it successfully.  Looking at 
the script terminal output, I see that it did this:

> Searching for setupext-janitor>=1.1
>
> Reading https://pypi.org/simple/setupext-janitor/
>
> Downloading 
>> https://files.pythonhosted.org/packages/fe/7c/21ab50164321e657d7ca281bc827b317351b0504dca72025b1e8063d4b91/setupext_janitor-1.1.2-py2.py3-none-any.whl#sha256=9cb4b72323c58b5a691d7bbb5b44079b0171c32297634b43b3ec21452bfa68ef
>
> Best match: setupext-janitor 1.1.2
>
> Processing setupext_janitor-1.1.2-py2.py3-none-any.whl
>
> Installing setupext_janitor-1.1.2-py2.py3-none-any.whl to 
>> c:\programdata\anaconda3\lib\site-packages
>
> Adding setupext-janitor 1.1.2 to easy-install.pth file
>
> This was using the 'develop' branch, if its 'setup.py' is the same as the 
release, then there is a subtle bug awaiting anyone who does not have 
setupext-janitor  already installed.

Tom
 

-- 
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/37848c0c-7608-417a-be7c-f64b60bb1dc5%40googlegroups.com.


Re: Issues using import

2020-02-06 Thread 'tfer' via leo-editor

>
>
>  I'm thinking that this behavior:

>   3. I've tired building my own sub-trees with an @tabwidth 2 in the body 
> of one of an ancestor nodes of either an @auto or @clean node, saving the 
> .leo document, (refusing the overwrite of the existing file so the .leo 
> save takes place without clobbering those that thfiles). then closing and 
> reopening the .leo document, expecting that opening to trigger the import 
> of the file but nothing happens.
>

is due to taking a time stamp of the existing file even through I refused 
to accept the overwrite when saving the .leo file.  Therefore, the 
re-opening of the file doesn't  trigger a import, even though the node has 
no subtree.  I guess a non-modifying external edit would be a work around. 

Tom

-- 
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/ca10ab2e-3d7d-414c-8acc-b63baca1ea69%40googlegroups.com.


Issues using import

2020-02-06 Thread 'tfer' via leo-editor
I'm still having issues with various import types:

  1. doing an import via the "File" menu is under the default @tabwidth -4, 
needs to be @tabwidth 2 for these files
** this has been the only successful import I have been able to make

  2. I placed the script Edward provided in a .leo document as an @button 
creates an "Imported files" node with children(s) @path nodes, one for the 
*/js directory, with a child @path for the file */js/reveal.js .  No @auto 
node is created.
- might be more useful for me if it created @clean nodes
- useful that it is meant to be recursive in the target directory

  3. I've tired building my own sub-trees with an @tabwidth 2 in the body 
of one of an ancestor nodes of either an @auto or @clean node, saving the 
.leo document, (refusing the overwrite of the existing file so the .leo 
save takes place without clobbering those files). then closing and 
reopening the .leo document, expecting that opening to trigger the import 
of the file but nothing happens.
-- is there a way to trigger this without closing and reopening?  I 
seem to remember you used to get a context menu to trigger this if you 
clicked a @thin node back in the day

Any hints from people that import then change the @ directive type?

Tom

-- 
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/f8fe240c-f903-499b-8adb-39cde4359a33%40googlegroups.com.


Re: Problem with import

2020-02-04 Thread 'tfer' via leo-editor
I modified this script to point to the 'js' directory and made it a script 
button, all it does is create a level one node 'imported files' with two 
descendants, both @path nodes, one for the directory an one for the 
reveal.js file.

On Friday, January 31, 2020 at 6:14:28 AM UTC-5, Edward K. Ream wrote:
>
> On Monday, January 27, 2020 at 1:56:09 PM UTC-6, tfer wrote:
>
> > I had a problem when trying to do an import with a "tabwidth 2" 
> directive in effect, below is the body text of the node I was using:
>
> I mentioned the solution in passing in another thread.  You can set 
> c.tab_width to 2 for the import script as follows:
>
> c.tab_width = 2
> try:
> c.recursiveImport(
> dir_ = r'C:\leo.repo\reveal.js\js',
> kind = '@auto',
> recursive = True,
> safe_at_file = True,
> theTypes = ['.js',],
> )
> finally:
> c.tab_width = -4
>
> 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/45fc3c37-dcc8-4bd0-aa39-965b4c624cf0%40googlegroups.com.


another problem with failed import

2020-02-04 Thread 'tfer' via leo-editor
I haven't had a chance to do my "by hand" rearrangement of reveal.js.  I'll 
look at how the improved importer does and incorporate that to get and 
outline for study.

I wasn't aware that failed imports are supposed to block the save activated 
overwrite of the file for the @auto node, so I didn't pick up at first that 
that wasn't happening.  An @ignore directive was written to the body of the 
@auto node but saving the .leo file results in the node being written out 
anyway.

Thanks for you work Edward,
  Tom

-- 
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/9165999b-68de-46e0-915f-546271054eb0%40googlegroups.com.


Re: Problem with import

2020-01-31 Thread 'tfer' via leo-editor
Alright, thanks.  I'm going to have to look at the javascript files for 
other reveal.js plugins to see what they are doing, I'll see about 
generalizing this a bit then.

On Friday, January 31, 2020 at 6:14:28 AM UTC-5, Edward K. Ream wrote:
>
> On Monday, January 27, 2020 at 1:56:09 PM UTC-6, tfer wrote:
>
> > I had a problem when trying to do an import with a "tabwidth 2" 
> directive in effect, below is the body text of the node I was using:
>
> I mentioned the solution in passing in another thread.  You can set 
> c.tab_width to 2 for the import script as follows:
>
> c.tab_width = 2
> try:
> c.recursiveImport(
> dir_ = r'C:\leo.repo\reveal.js\js',
> kind = '@auto',
> recursive = True,
> safe_at_file = True,
> theTypes = ['.js',],
> )
> finally:
> c.tab_width = -4
>
> 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/4dd01fa2-f38f-4c43-a010-d8229e3dc8a0%40googlegroups.com.


Re: So how do you arrange panes now?

2020-01-30 Thread 'tfer' via leo-editor
I was hoping to spread Leo across two virtual desktops, possibly in the 
--no-dock option, but that isn't the the way WVD's work.

I did get get to play with the --no-dock option and got a two column 
arrangement of the outline and body panes, the log pane just close via the 
context menu, pretty cool.  Are the any keyboard shortcut to 
increase/decrease the focused panel? or minimize/maximize it?

On Thursday, January 30, 2020 at 10:11:24 AM UTC-5, Thomas Passin wrote:
>
>
>
> On Thursday, January 30, 2020 at 12:26:59 AM UTC-5, tfer wrote:
>>
>> Thanks Edward and Tom, I'll have to check these out. Anyone using Leo 
>> with Windows !0 virtual desktops
>>
>
> Yes, every day.  It works fine. 
>

-- 
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/38f59e6c-bf47-45be-81ba-09d295dfe53f%40googlegroups.com.


Re: How to start up Leo the dumb way

2020-01-30 Thread 'tfer' via leo-editor
I can't help you with making a shortcut, but if you start another terminal 
session, that terminal will be free,and not be tied up waiting for Leo to 
terminate.

On Thursday, January 30, 2020 at 7:48:28 PM UTC-5, andyjim wrote:
>
> Really dumb question, I know.  MacOS system. I'd like to launch Leo from 
> the launch bar instead of from terminal (which is the only way I know to 
> launch it). But it ties up the terminal so I can't use it for anything else 
> while Leo is running (not that I use terminal much, but occasionally), plus 
> it would be easier/quicker to launch from icon.  I don't find a launchLeo 
> or a runLeo file on my system.
> Andy
>

-- 
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/13136385-9bca-4998-94ad-230355a1ddb9%40googlegroups.com.


Re: So how do you arrange panes now?

2020-01-29 Thread 'tfer' via leo-editor
Thanks Edward and Tom, I'll have to check these out. Anyone using Leo with 
Windows !0 virtual desktops?

Tom

-- 
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/db934a1a-2418-476e-9102-9948a136b217%40googlegroups.com.


So how do you arrange panes now?

2020-01-27 Thread 'tfer' via leo-editor
I'm looking to arrange the panes differently for a certain workflow and I 
find that has all changed.  Trying to discover what to do via the menu's 
runs me into this unhelpful error message:
---
free-layout-context-menu works only when
--no-dock is in effect
---
Maybe that is a switch I need to start Leo with?

Used to be a "Toggle split direction" command that would let have two 
columns, outline and log on the Left, body on the right.  That would be 
enough, though just outline and body would be ideal.

Nothing found in doc's, could someone explain?

Tom

-- 
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/a08e831c-c675-4c57-ad2d-11daf912e298%40googlegroups.com.


Problem with import

2020-01-27 Thread 'tfer' via leo-editor
I had a problem when trying to do an import with a "tabwidth 2" directive 
in effect, below is the body text of the node I was using:

to match the required use of tabs for indentation, plus how vscode shows 
the file(s)
@tabwidth 2
-trf Note: wanted to have this in effect for the import as the project 
guidelines requires the use of tabs for indentation, but importing by the 
"Flile" menu creates a node at level zero where "@tabwidth  -4" is still in 
effect!   Had to get around this by by temporally renaming "reveal.js" in 
Explorer, saving the leo file with a childless "@auto" node and closing its 
tab, go to Explorer and delete the empty file created, change the renamed 
file back to "reveal.js", then open .leo the file to get an import with the 
"@tabwidth 2" in effect.  I seem to remember that there was a context menu 
available when you clicked an "@auto" node so you could initiate the 
import, but that no longer seems to be the case.


Tom

-- 
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/9126e15c-d3c5-4e3e-9375-ad742645fd4c%40googlegroups.com.


Re: .js importer still has problems

2020-01-27 Thread 'tfer' via leo-editor


On Monday, January 27, 2020 at 6:57:46 AM UTC-5, Edward K. Ream wrote:
>
> On Monday, January 27, 2020 at 5:22:41 AM UTC-6, Edward K. Ream wrote:
>
> ​I see the same message as you reported. This should be enough to fix the 
>> problem.
>>
>
> I think I can see how the following could occur: 

> I now remember the general problem: it's difficult/impossible to use 
> section references in some situations, but without section references it's 
> not possible to put code in the proper place.
>
> In this case, the node
> "toArray( element.querySelectorAll( 'video, audio' ) ).forEach function"
> needs a section reference to properly place the child node,
> "if( promise && typeof promise.catch === 'function' && el.controls === 
> false )"
> and *its* child,
> "el.addEventListener( 'play', function".
>

Changing the @auto node to an @file node and manually doing the sectioning 
is acceptable, but we probably want to yield an at auto import to give us a 
result that, upon being saved, still generates a diff equivalent file to 
the original.  Disallowing some children is a good idea, as long as that 
noted in the doc's.

>
> In other words, the actual import machinery is probably working correctly. 
> The problem arising in the strategy used to allocate lines to nodes. This 
> is a tricky task. A rethink may be needed. One possibility would be to 
> disallow child nodes in some situations...
>

I suspect part of the problem maybe due to some of the lines that are 
tagged to be nodes, (and thus be the first line of the nodes body text), 
actually contains a leading fragment that should be the end of the prior 
node's body.  I have an idea for a new type of section reference that 
allows for the first line of  its body text to be joined into the line in 
which it occurs.  i.e. say <|section|>., or <|section>> to indicate the 
side of the join.

Tom

-- 
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/17dbc0ec-38a2-4870-bb23-6f1127884788%40googlegroups.com.


Re: .js importer still has problems

2020-01-26 Thread 'tfer' via leo-editor
I wrote an earlier reply, but it did not post, ah web interfaces...

The error with the mixed up line numbers below, is from the console from 
which I'm running Leo and have to do with the import, the don't exist in 
any file.

On Sunday, January 26, 2020 at 4:48:56 AM UTC-5, Edward K. Ream wrote:
>
> On Wednesday, January 22, 2020 at 3:36:08 PM UTC-5, tfer wrote:
>
>
>> To this end I tried import the main engine of reveal, the file reveal.js, 
>> Leo creates an @auto node, and creates a subtree. I get the following in 
>> the cmd shell I started Leo from:
>>
>>
>> ---
>> = PERFECT IMPORT FAILED = reveal.js
>> len(s1): 4810 len(s2): 4810
>> first mismatched line: 3174
>>
>
> You are using the same file as I am, strange that you are getting only a 
warning.  I'm am running under an up to date devel branch.
 

> I am not able to reproduce this failure.  I git cloned reveal.js from 
> https://github.com/hakimel/reveal.js/, then used the perfect import 
> script.
>

As to this warning, the import should be under the effect of a "@tabwidth 
2" directive, which actually was hard to have happen, I post that in 
another thread. 

It warned that it converted tabs to blanks, but otherwise all went well.
>
> The line that starts "// Once the video does start playing, hide the 
> controls" appears at line 4069 of my file, not line 3173 as in your file. 
> Please send your copy of reveal.js to me at edre...@gmail.com.
>

As I mentioned above, there is no such file, I can send my 
"nthD-exploration.leo" file which preserves the import, but I'm planning to 
copy that node an hand curate it into an @auto node as it should have been 
imported, change the filename in the node so it will generate the file on 
save and allow me to diff it against the original.  Might be more useful to 
wait for that.

Tom

-- 
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/ff4fe41a-095c-4ff5-b6bb-533379b06b3e%40googlegroups.com.


Re: A proposal for the Python Dev's

2020-01-24 Thread 'tfer' via leo-editor
Thanks for the wishes John, though it currently is far down  on the list of 
projects.

It would require permission to use the gylphs, or creation of an equivalent 
set.

Tom

-- 
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/a31744d6-513f-4e65-864f-8b1ae5b5ee1c%40googlegroups.com.


.js importer still has problems

2020-01-22 Thread 'tfer' via leo-editor
I've hung out with Leo since early days, discovered it when exploring 
Literate Programming, always liked the focus management outline provides, 
but I've yet to get the benefits I was looking for from it.  Maybe that is 
due to what my envisioned use case is, I'm not looking to write my own 
original code, (yet), I want to understand various existing code, pick it 
apart, figure out what the author is doing, all with the eye to modifying 
it, by changes or plugins.

Edward's recent posts show a lot of progress on flows for Python 
development, but I find myself in the weird world of JavaScript these days, 
which brings me to topic of the importer,  I want to make a plugin for the 
html presenter reveal.js I'm tentatively calling nthD, the intent of which 
is break the slides out of their 2D "Flatland", and give you the ability to 
use as many dimensions as you need to organize them, (think table of 
contents, outlines...). 

To this end I tried import the main engine of reveal, the file reveal.js, 
Leo creates an @auto node, and creates a subtree. I get the following in 
the cmd shell I started Leo from:

---
= PERFECT IMPORT FAILED = reveal.js
len(s1): 4810 len(s2): 4810
first mismatched line: 3174
s1...
  3172 'el.controls = true;\n'
  3173 '// Once the video does start playing, hide the controls a...(62)\n'
* 3174 "el.addEventListener( 'play', function() {\n"
  3175 'el.controls = false;\n'
  3176 '} );\n'

s2...
  3172 'el.controls = true;\n'
  3173 '// Once the video does start playing, hide the controls a...(62)\n'
* 3174 '} );\n'
  3175 '}\n'
  3176 '}\n'

imported C:/VC/git/reveal.js/js/reveal.js

,
and this in the Log panel:


Leo Log Window
Leo 6.2-b1-devel, devel branch, build b51bcaa8b5
2020-01-05 19:47:27 -0500
Python 3.6.5, PyQt version 5.9.4
Windows 10 AMD64 (build 10.0.18362) SP0
tabs found with @tabwidth -4 in reveal.js
changed leading tabs to blanks in 4800 lines in reveal.js
@auto failed: reveal.js
imported C:/VC/git/reveal.js/js/reveal.js
-

Opening reveal.js in vscode I find the line numbers from the cmd shell 
don't match the actual line numbers.

It probably shouldn't be surprising that this file choked import, looking 
at it, it appears most of the code is a complex nesting of objects, 
variables, and functions in a top level anonymous function.

With by cursor in the offending line, I noticed something I hadn't before, 
vscode's top line in the buffer was identical to the outline path Leo once 
had, (or some plugin gave).  From this you could see how the nodes the 
import created should have been nested, (there weren't, came out much 
flatter).

Anyway, vscode can be use as a check on the import via this line. Note: if 
you click on the purple cube prefixing functions, you get that function 
outline neighborhood.

Tom

-- 
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/8cfde0b5-ac88-4801-b405-d9e3bc648e0b%40googlegroups.com.


Re: A proposal for the Python Dev's

2020-01-20 Thread 'tfer' via leo-editor

>
> Here is a CSD:

 

-- 
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/eadf78c1-a810-4dda-bc5d-bad8399af25e%40googlegroups.com.


A proposal for the Python Dev's

2020-01-20 Thread 'tfer' via leo-editor
All the talk on parsers is probably something I'm going to need when l get 
around to working on the following proposal to make Python a even better 
teaching language for programming.

I check out different editors all the time, and the one that inspires ithis is 
called jGrasp, (I even mentioned it on here before). It's written in Java and 
only recently added support for Python. The feature I'm trying talking about is 
CSD, control structure diagrams, a decoration of the code using 3 columns to 
the left of the text plus the white space of indented lines replaced by glphs 
that show control flow.

Now this has to be computed and added to the code then stripped when ever you 
save your code,and I suspect this is something that one of these parsers could 
handle. 

But if we add these glphs to our programming font, (a utf-8 one, in the code 
lock for application use say), we can compile Python with these characters told 
to be treated as whitespace and as a consequence allow the decorated code be 
perfectly runnable -- (this is the proposal).

I'll include a picture of a CSD.
In the next post.

-- 
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/6db27c11-3328-4765-96e7-da9c5f6ea7a1%40googlegroups.com.


Re: mindmap view of one subtree

2019-12-20 Thread 'tfer' via leo-editor
Well, Leo has support for doing this sort of thing with the open source 
app: Freemind, never us it but you can probably search for usage inside of 
this group.  As far the app you mention, it saves it's trees via json, so 
you would have to write your own custom exporter.

Tom


On Thursday, December 19, 2019 at 10:48:55 AM UTC-5, Austin(Xu) Wang wrote:
>
> Dear Leo User,
>
> Is there any plugin can show a sub tree of Leo outlines into a mind map 
> view?
>
> For example, like below
> https://www.mindmaps.app/#  
>
> So user can edit outlines, or adding new childs..
>
> BR,
> Austin
>

-- 
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/8f9072f5-0c41-4170-a62f-845b6df069ba%40googlegroups.com.


Re: About separate processes and threads

2018-10-16 Thread 'tfer' via leo-editor
Their was a book on Ada I bought a few decades ago that dealt with locks 
and other interprocess stuff.  The author explained things by diagrams that 
had button, (push and pull), hatches and other things that illustrated how 
the various concepts worked in a graphical mechanistic fashion, (apparently 
Ada has a lot of this stuff).

Not really what I was suppose to be learning at the time, but it was 
interesting so I thought I'd get back to it someday, and it matched the way 
I think about those things.  Lost the book in a move, anybody here know the 
title/author?

Tom



On Tuesday, October 16, 2018 at 9:55:35 AM UTC-4, Terry Brown wrote:
>
> On Tue, 16 Oct 2018 04:36:31 -0700 (PDT) 
> "Edward K. Ream" > wrote: 
>
> > The original Dreaming Big Dreams thread suggested reorganizing Leo 
> > into more separable pieces, perhaps using a client/server 
> > architecture or other forms of interprocess communication (IPC). 
>
> Here's a presentation I just gave: 
> https://tbnorth.github.io/multiproc/ 
>
> So processes *can* share memory, although the sharing is managed with 
> IPC calls.  My presentation's for distributed processing of data in 
> NumPy, CPU intensive, not necessarily relevant to whatever it is you're 
> considering for Leo. 
>
> Cheers -Terry 
>
> > Here I'd like to present what little I know about IPC, servers and 
> > threads.  The purpose is continue the conversation, and to expose my 
> > own misconceptions.  Please comment. 
> > 
> > *Separate processes share no data* 
> > 
> > Some kind of IPC is required. There seems to be no end of such 
> > mechanisms: 
> > 
> > - pyzo uses yoton . 
> > - neovim uses msgpack plus 
> > vim-related wrappers. 
> > - LeoVue uses node.js client-server architecture. 
> > - Jupyter uses another client-server 
> > architecture. 
> > - All other client/server architectures have/are their own forms of 
> > IPC. 
> > 
> > I have no idea what would be best for a more "distributed" version of 
> > Leo. Does anyone have any organizing principles or ideas they would 
> > like to share? 
> > 
> > *Separate threads share (almost?) all data* 
> > 
> > Debuggers need access to the program under test, so must run in a 
> > separate *thread* rather than a separate process.  Otoh, both the 
> > debugger and the program under test could run in a separate process 
> > from the IDE.  In that case, the processes would have to communicate 
> > via IPC. 
> > 
> > The shared data between threads causes well-known problems.  Race 
> > conditions can result.  Python's queue.Queue is one (low performance) 
> > way of avoiding some, but not all, of the problems. 
> > 
> > Leo's new debugger contains a listener, in the main thread, that 
> > receives requests from the debugger thread.  The debugger thread is 
> > driven by commands from the main thread.  None of the code could be 
> > called elegant. It has a chance of working because *only *the 
> > g.app.xdb ivar is set by both threads. It must be set/cleared very 
> > carefully. As I write this, I suspect that the present code, while 
> > not *necessarily* wrong, would likely benefit from a lock 
> > on 
> > this ivar. 
> > 
> > *Summary* 
> > 
> > There seems to be too many choices for IPC.  Your comments, please. 
> > Please correct me if I have said something dubious. 
> > 
> > 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Progress report: embedding neovim in Leo

2018-10-13 Thread 'tfer' via leo-editor
While this may be important towards the physical integration of the Qt pane 
that will be the gui frontend for the Neovim core, this doesn't need to be 
finished to start working on the "plumbing" that will need set up between 
Leo and the neovim core, e.g., nvim.exe.

The "plumbing" is msgpack calls to the neovim core and some msgpack calls 
from neovim to a as yet unwritten interface in Leo.  For experiments you 
can just have Leo talk to a separately running instance of the stock Qt 
fronted Neovim.

I think my first experiments with this were with juypyter notebooks,  I was 
translating that work to leo files, not such what state that is in, but 
I'll attach those files.

Tom 

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


neovim_remote-api.leo
Description: Binary data


Re: Scoop, a new way to install?

2018-10-13 Thread 'tfer' via leo-editor
I should mention that what I have used scoop for so far, is to install 
ripgrep, and Neovim.

As a plus, it looks like scoop will let you known if an app has a newer 
version available.

Tom

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Scoop, a new way to install?

2018-10-13 Thread 'tfer' via leo-editor
Having to set up a new laptop to work with Leo and follow some of the 
current lines of development, I came across a new command line installer 
for Windows, scoop.  It is written in Powershell and to install a 
particular app scoop can run off a json file in the git repo.

Currently, I clone Leo-Editor to a local repo, Install Python 3 with all 
the bells and whistles by using Anaconda.  I usually run Leo from a special 
powershell session under Cmdr.

Tom 

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Dreaming big dreams

2018-10-10 Thread 'tfer' via leo-editor
I'm glad this came up, I was going to say something on this under the 
title: "Leo, an embarrassment of riches that are too well hidden."

I was involved in another editor in the past, in it we followed another 
convention for documentation.  Say you added support for another language, 
well, along with the plugin to support it, you created a file to talk about 
its features and demonstrate them.  This file was a "live document", for 
example, it would talk about a certain type of completion it added, then 
have a code block that once you entered enabled the language-mode, let you 
jump to point where there was a hint that could completed, and let you hit 
the tab to try out the completion.  Note that these demo-files where opened 
from templates so you weren't making changes to them when you explored them.

So to generalize this, I'm suggesting that there be an Examples directory 
in the distribution, where any file in it or a sub directory of it is 
treated as such a template.  It would contain live documents for plugins, 
workflows, debugging demos, design notes, generic add a language demo, unit 
test demo, todo plugin demo, etc.

So, now the Leo supports Jupyter notebooks, I imagine a lot of this stuff 
will use that format, but I don't know, because I've never tried that in 
Leo, there aren't any examples. :-)

Tom

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Dreaming big dreams

2018-10-10 Thread 'tfer' via leo-editor
Even with the caveats I've mentioned, Neovim should be one of the easiest 
to put into Leo.  On non window systems you could embed the terminal 
version into the n-curses like version of Leo.  For all systems you'd take 
the Qt front end version of Neovim and get it to take the place of the 
editor pane, (i.e. the screen location).   Then, add msg-pack to Leo and 
use that to complete the integration.  Note that you can already detach and 
close the Leo;'s editor pane.

This has the advantage of leaving Leo's log and outline pane and code in 
place.

Tom

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Dreaming big dreams

2018-10-09 Thread 'tfer' via leo-editor
Using Neovim is hampered by it not being equally well supported on Windows 
as on Unix-y systems.  There  windows support consists of the core running 
with a Qt frontend.  Terminal based Neovim only works well on Unix-y 
systems.

I believe the embedded switch is meant to be run with the terminal, it uses 
stdio/stderr as the communication channel between the parent and the 
embedded Neovim.


On Tuesday, October 9, 2018 at 12:12:28 PM UTC-4, Kent Tenney wrote:
>
> I also think it would onbe great if Leo could use neovim for the editing 
> experience.
>
> This project
> https://github.com/neovim/python-client
>
> says:
>
> You can embed neovim into your python application instead of binding to a 
> running neovim instance.
>
> >>> from neovim import attach
> >>> nvim = attach('child', argv=["/bin/env", "nvim", "--embed"])
>
> Not sure if that works with QT
>
> https://gitlab.com/Muream/neovim-pyqt
> seems to subclass a QT class to provide neovim in a QT window
>
>
> 
> import PyQt5.QtWidgets as QtWidgets
>
> class NeovimWindow(QtWidgets.QMainWindow):
>
> def __init__(self, nvim):
> super().__init__()
> self.nvim = nvim
>
> ++
> ++
> import sys
> import PyQt5.QtWidgets as QtWidgets
> import ui.window as _window
> from neovim import attach
>
> def spawn_nvim():
> nvim_argv = ['nvim', '--embed']
> nvim = attach('child', argv=nvim_argv)
> print(nvim)
> return nvim
>
> def main():
> app = QtWidgets.QApplication(sys.argv)
> nvim = spawn_nvim()
>     window = _window.NeovimWindow(nvim)
> window.show()
> app.exec_()
>
> if __name__ == '__main__':
> main()
> ++
>
>
> On Tue, Oct 9, 2018 at 10:17 AM 'tfer' via leo-editor <
> leo-e...@googlegroups.com > wrote:
>
>>
>>
>> On Tuesday, October 9, 2018 at 4:48:06 AM UTC-4, Edward K. Ream wrote:
>>>
>>> On Mon, Oct 8, 2018 at 2:47 PM 'tfer' via leo-editor <
>>> leo-e...@googlegroups.com> wrote:
>>>
>>> So one idea talked about here is to run the IDE as a separate, possibly 
>>>> browser based process.  I propose an inversion of this, run Leo as the 
>>>> separate process, (Leobridge++), then leave all the fiddly UI bits (like 
>>>> completions), to what ever editor you're using as a graphical front end.
>>>>
>>>
>>> It's an interesting dream. See below.
>>>
>>> Some of the work being done in VScode caused me to have  the realization 
>>>> that such an integration may not be as hard as we thought it might be.  
>>>> Think of it this way, editors are built to work on files, well let Leo be 
>>>> the file system!  All you need is a tree-like browser in your editor to 
>>>> get 
>>>> at the "files", ie Leo's nodes.
>>>>
>>>> Emacs, Vim, VScode all have tree-like file browsers, they just need to 
>>>> be "re-plumbed" to get Leo to open the selected node as if it were a file, 
>>>> (then save any edits back to Leo).  It may even be possible to have that 
>>>> plumbing be very dumb, just ship the outline navigation commands to Leo 
>>>> and 
>>>> have it send the resulting outline tree to the editor to "paint" rather 
>>>> that duplicate all the outline handling code in the editor.
>>>>
>>>
>>> This would be just the tip of the icebersig.  One needs a way of running 
>>> python code from within the editor, and the python code must interact with 
>>> the re-plumbed outline pane.
>>>
>>> Yes there would be a lot of fiddly bits and duplication of Leo's logic 
>> to handle the outline tree *in the editor,* but I'm suggesting something 
>> different here.  Let Leo handle all that and ship the current state of the 
>> of the outline pane to the editor as just data, so it is just concern with 
>> the rendering of it, much as we do when we hand off the outline pane data 
>> to QT.
>>
>> I made things too simple when I said Leo would act as the file system for 
>> the editor we hook it up to.  It does that but also responds to commands, 
>> even synthetic keystrokes sent to it by the editor.  It also responds to 
>> information request, e.g. "what language should I consider this node to be 
>> written in?".
>>
>> So we need a rpc channel between the two, neovim has one built in, they 
>> use one called 'msg-pack'.
>&

Re: Dreaming big dreams

2018-10-09 Thread 'tfer' via leo-editor


On Tuesday, October 9, 2018 at 4:48:06 AM UTC-4, Edward K. Ream wrote:
>
> On Mon, Oct 8, 2018 at 2:47 PM 'tfer' via leo-editor <
> leo-e...@googlegroups.com > wrote:
>
> So one idea talked about here is to run the IDE as a separate, possibly 
>> browser based process.  I propose an inversion of this, run Leo as the 
>> separate process, (Leobridge++), then leave all the fiddly UI bits (like 
>> completions), to what ever editor you're using as a graphical front end.
>>
>
> It's an interesting dream. See below.
>
> Some of the work being done in VScode caused me to have  the realization 
>> that such an integration may not be as hard as we thought it might be.  
>> Think of it this way, editors are built to work on files, well let Leo be 
>> the file system!  All you need is a tree-like browser in your editor to get 
>> at the "files", ie Leo's nodes.
>>
>> Emacs, Vim, VScode all have tree-like file browsers, they just need to be 
>> "re-plumbed" to get Leo to open the selected node as if it were a file, 
>> (then save any edits back to Leo).  It may even be possible to have that 
>> plumbing be very dumb, just ship the outline navigation commands to Leo and 
>> have it send the resulting outline tree to the editor to "paint" rather 
>> that duplicate all the outline handling code in the editor.
>>
>
> This would be just the tip of the icebersig.  One needs a way of running 
> python code from within the editor, and the python code must interact with 
> the re-plumbed outline pane.
>
> Yes there would be a lot of fiddly bits and duplication of Leo's logic to 
handle the outline tree *in the editor,* but I'm suggesting something 
different here.  Let Leo handle all that and ship the current state of the 
of the outline pane to the editor as just data, so it is just concern with 
the rendering of it, much as we do when we hand off the outline pane data 
to QT.

I made things too simple when I said Leo would act as the file system for 
the editor we hook it up to.  It does that but also responds to commands, 
even synthetic keystrokes sent to it by the editor.  It also responds to 
information request, e.g. "what language should I consider this node to be 
written in?".

So we need a rpc channel between the two, neovim has one built in, they use 
one called 'msg-pack'.

VScode is based on electron/node.js.  Perhaps VScode could emulate one end 
> of a yoton connection.  (I'm never sure whether it would be a client or 
> server.)  This would be similar to the emacs/pymacs bridge 
> <http://www.google.com/url?q=http%3A%2F%2Fleoeditor.com%2Femacs.html%23controlling-leo-from-emacs-using-pymacs=D=1=AFQjCNH2Di1EzkkhFYQu4TOjtlZFGtW1VA>,
>  
> which is just a few lines of elisp.

 
Interestingly I find myself trying Emacs again, (with Evil-Mode for sane 
keybinding ;-), just to get Org-Mode.


> 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


style sheet error on launch

2018-06-18 Thread 'tfer' via leo-editor
My MO is to start Leo from a console with: python 
"C:\VC\Git\leo-editor\launchLeo.py", this leaves the terminal open and 
available to log some error that don't end up going the log pane.

Setting up to run Leo on a different laptop, I'm getting such an error when 
Leo apparently opens a new workbook, and read in copy of 
"...leo/doc/CheatSheet.leo", (neat trick that gets around dirtying up 
"CheatSheet.leo", I'll have to borrow that).   Anyway, the error is 
triggered several times, (copied from console):

reading settings in C:/VC/Git/leo-editor/leo/config/leoSettings.leo

Leo 5.7.3, build 20180525162844, Fri May 25 16:28:44 CDT 2018
Git repo info: branch = master, commit = 433d8d6e0ca9
Python 3.6.5, PyQt version 5.9.4
Windows 10 AMD64 (build 10.0.17134) SP0
** isPython3: True
** caching enabled

Using default leo file name:
C:/Users/tfeth/.leo/workbook.leo
expand_css_constants Unresolved @constants
['@big-text-warning-bg']
reading settings in C:/VC/Git/leo-editor/leo/doc/CheatSheet.leo
expand_css_constants Unresolved @constants
['@big-text-warning-bg']
wrote recent file: C:/Users/tfeth/.leo/.leoRecentFiles.txt
expand_css_constants Unresolved @constants
['@big-text-warning-bg']
...

Tom

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: File > New

2018-06-14 Thread 'tfer' via leo-editor
Thanks, I thought that might be the case though I couldn't think of why the 
change.

On Thursday, June 14, 2018 at 7:35:15 PM UTC-4, Rob wrote:
>
> I noticed the same thing. The `Master` implies the branch you're currently 
> subscribed to. I subscribe and update the `devel` branch, so when I create 
> a new xxx.leo file, that is what is shown in the tab as a title until I 
> save and rename it. I don't have a strong opinion about the merits of that 
> change, nor do I know when that started, but that's what it means. When you 
> save the file, you're still prompted to provide the location and the name 
> of the file. Unless I'm wrong (I could be), the only effect is the name of 
> the tab itself. HTH,
>
> Rob...
>
> On Thursday, June 14, 2018 at 6:58:31 PM UTC-4, tfer wrote:
>>
>> Just running Leo again after a while, noticed "File > New" creates a tab 
>> "Master: untitled".  This is different, so what is meant by "Master: " - 
>> Not the branch surely, (although I am indeed running it from my local git 
>> repository with the Master branch checkout).  Perhaps Master in the sense 
>> of 'master-template', though their seems no special structure to the 
>> "untitled" document.
>>
>> If the later is the case we could use to support things like making 
>> example documents that when saved become "Working Copies" and don't modify 
>> the "master" they were open from.
>>
>> Tom
>>
>

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


File > New

2018-06-14 Thread 'tfer' via leo-editor
Just running Leo again after a while, noticed "File > New" creates a tab 
"Master: untitled".  This is different, so what is meant by "Master: " - 
Not the branch surely, (although I am indeed running it from my local git 
repository with the Master branch checkout).  Perhaps Master in the sense 
of 'master-template', though their seems no special structure to the 
"untitled" document.

If the later is the case we could use to support things like making example 
documents that when saved become "Working Copies" and don't modify the 
"master" they were open from.

Tom

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


LSP and FileSystemProvider

2018-05-03 Thread 'tfer' via leo-editor
Both these things have come up in the past, and are still in the 
"interesting but not yet", category.  However, the latest release of VS 
Code includes the idea of FileSystemProviders that allow you to open 
editors via various Universal Resource Identifiers (ref: 
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier).  You would have 
to develop a leo: or maybe leoFS: scheme to let you open nodes, and 
probably a LSP to keep node updated in Leo, but it would be a way to let VS 
Code do editing.

There is a memory based example memFS 
(here: https://marketplace.visualstudio.com/items?itemName=jrieken.vscode-memfs 
)

Tom

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Developer get together?

2018-04-17 Thread 'tfer' via leo-editor
Any thoughts on a developer get together as in past years?  And/or Leo 
enthusiasts/developers going to PyCon in Cleveland running the middle of 
next month?

Tom

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Neovim as an easier way to add in a different editor

2018-02-22 Thread 'tfer' via leo-editor
 Neovim 0.2+ adds a Qt based editor in order to hit its promise of "works 
on Windows".  It should be possible to leverage this into an alternative 
editor pane, all that would be needed is to channel each node's body text 
into and out of Neovim, (the in-portion would also require you to set 
filetype to correspond to the "in-force" @language directive).

Why I say this should be easy is that Neovim uses Msgpack rpc to give you 
complete control of Neovim.  Three things are needed:
   1) provide a way to embed the Qt frontend as a new/alternative editor 
pane and connect to an running neovim instance.
   2) switch all the leo code that fills/updates the current editor pane 
into msgpack calls that fill or update the body text of the current node 
to/from the neovim pane.
   3) pass back to leo any calls that change the Outline pane, e.g. 
alt-downarrow.

Two and three could all be handled by a neovim plugin that is written in 
python!  See https://github.com/neovim/python-client

I know that Edward prefers emacs over vim, but just as their are vim 
emulating modes for emacs, there are emacs emulating modes for vim.

(sorry about the partial topic above)

Tom

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Neovim as an easier way to add in a different editor

2018-02-22 Thread 'tfer' via leo-editor
Neovim 0.2+ adds a Qt based 

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Why I believe that using class based prototyping is suboptimal

2017-12-16 Thread 'tfer' via leo-editor
Hi,

The unresponsiveness after load may have to do with the number of lines the 
current node contains.  As the editor for nodes is all written in python, 
it has problems when the number of lines in a node is large.

On Saturday, December 16, 2017 at 5:05:58 PM UTC-5, vitalije wrote:
>
> As I promised in other thread few days ago, that I will write in more 
> detail about what I believe to be a better way to make prototype, I am glad 
> to report that text is on the web.
>
> Text is not short and perhaps needs some spelling and grammar corrections. 
> I would appreciate all feedback that you fellows can give.
>
> I was looking for a theme, a suitable example to discuss and better 
> explain my point of view. Problem that I chose was Leo import commander. In 
> April 2017, Edward wrote about problem on this forum and I decided to look 
> into it. I was expecting to make some improvements in this code and while 
> doing so to explain each step. On my surprise I have discovered serious 
> problem in this code. I have never used import commands before (* maybe 
> once or twice I don't remember). When I tried them last time I wasn't 
> satisfied with the results of imports and I did imports by hand.
>
> When I tried to import one javascript file, on my greatest surprise, Leo 
> was blocked more than a minute. After import, for each keypress or mouse 
> click I had to wait for about 30s. I could hardly delete imported node. 
> There must be a bug somewhere in this code. Later I created script to 
> profile just bare import of file and it turned out that Leo needed 30s to 
> import this file. File is about 300k and 8000-9000 lines. Some, Python 
> files in Leo are similar size.
>
> After few hours I have made prototype of new import_file function that 
> imports same file on average in 250ms.
>
> How I did it? You can read it here:
> http://computingart.net/functional-programming-for-prototyping.html
>
> All comments are welcome.
> Vitalije
>
>
>
>

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: The biggest picture

2017-09-18 Thread 'tfer' via leo-editor
There is an interesting multi-kernal front end other than Juypter you might 
want to check out, Beaker.  It is a Java app with a wrinkle of it's own, 
since let's you bring in kernals from different languages, it bridges the 
languages with a common data format that can be quickly be made into the 
native format of the language of the current cell.

Tom

On Thursday, September 14, 2017 at 9:41:50 AM UTC-4, Edward K. Ream wrote:
>
> Imo, the most important direction for Leo is the best possible integration 
> with existing programs and tools, such as:
>
> - The Language Server Protocol. 
> - Better emulation of org-mode features , 
> such as agendas and tables.
>
> These are important directions for Leo, and I'll be working on both.
>
> But imo the most important long-term direction for Leo is the best 
> possible integration with the Jupyter project. 
> Jupyter is where the action is, with a talented team of devs and a budget 
> in the millions of dollars. Leo has features lacking in Jupyter, and vice 
> versa. Better integration with Jupyter is my top priority in the coming 
> year.
>
> 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot run Leo using pythonw, but I can using python

2017-08-14 Thread 'tfer' via leo-editor
opps, "server" *or* it's embedding app...

On Monday, August 14, 2017 at 10:23:31 AM UTC-4, tfer wrote:
>
> Neovim uses Msgpack-rpc that can use different channels to communicate 
> with a "server" on it's embedding app, the lowest channel is via 
> stout/sterr, so the option to leave those clear might be useful to handing 
> the editing of body text to Neovim.
>
> Tom
>
> On Friday, August 11, 2017 at 5:52:25 AM UTC-4, Edward K. Ream wrote:
>>
>> On Thu, Aug 10, 2017 at 6:42 PM, xgid  wrote:
>>
>> Is there an easy way to get Console output logs when using pythonw?
>>>
>>
>> ​I suspect that pythonw is doing something with sys.stdout/stderr.  That 
>> might be causing Leo to crash (softly) during startup.
>>
>> Perhaps Leo should have a new command-line option that would send all log 
>> output to a file.
>>
>> Another idea would be for Leo to be more careful about catching 
>> exceptions during startup.
>>
>> Please file a bug report about this.  With these two new ideas I may be 
>> able to fix it.
>>
>> 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot run Leo using pythonw, but I can using python

2017-08-14 Thread 'tfer' via leo-editor
Neovim uses Msgpack-rpc that can use different channels to communicate with 
a "server" on it's embedding app, the lowest channel is via stout/sterr, so 
the option to leave those clear might be useful to handing the editing of 
body text to Neovim.

Tom

On Friday, August 11, 2017 at 5:52:25 AM UTC-4, Edward K. Ream wrote:
>
> On Thu, Aug 10, 2017 at 6:42 PM, xgid  
> wrote:
>
> Is there an easy way to get Console output logs when using pythonw?
>>
>
> ​I suspect that pythonw is doing something with sys.stdout/stderr.  That 
> might be causing Leo to crash (softly) during startup.
>
> Perhaps Leo should have a new command-line option that would send all log 
> output to a file.
>
> Another idea would be for Leo to be more careful about catching exceptions 
> during startup.
>
> Please file a bug report about this.  With these two new ideas I may be 
> able to fix it.
>
> 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Leo 5.4b1 coming soon. Please test

2016-10-02 Thread 'tfer' via leo-editor
I don't seem to be able to import any javascript files. getting error like 
this:

reading: @auto C:\DevArea\JS\Sample files\client.js
Error: @auto did not import @auto C:\DevArea\JS\Sample files\client.js perfectly
The clean-all-lines command may help fix whitespace problems
first mismatched line: 0 (original) = 0 (imported)
Original file...

   0 'module.exports = DHT\n'
   1 '\n'
   2 "var bencode = require('bencode')\n"

Imported file...

   0 '\n'
errors inhibited read @auto C:\DevArea\JS\Sample files\client.js
reading: @auto C:\DevArea\JS\IxEditSamples\IxEdit   Samples_files\ga.js
Error: no block: 27240
Error: no block: 27227
Error: no block: 19096
errors inhibited read @auto C:\DevArea\JS\IxEditSamples\IxEdit   
Samples_files\ga.js
reading: @auto C:\DevArea\pp_Learning JavaScript Data Structures and Algorithms 
[Video]\5698OS_02_FD_Code_1stDraft\array-example.js
Error: @auto did not import @auto C:\DevArea\pp_Learning JavaScript Data 
Structures and Algorithms [Video]\5698OS_02_FD_Code_1stDraft\array-example.js 
perfectly
The clean-all-lines command may help fix whitespace problems
first mismatched line: 0 (original) = 0 (imported)
Original file...

   0 'var authors = [\n'
   1 "   {name: 'Spencer H.', sections: ['Business']},\n"
   2 "   {name: 'John C.', sections: ['Movies']},\n"

Imported file...

   0 '\n'
errors inhibited read @auto C:\DevArea\pp_Learning JavaScript Data Structures 
and Algorithms [Video]\5698OS_02_FD_Code_1stDraft\array-example.js
reading: @auto C:\DevArea\pp_Learning JavaScript Data Structures and Algorithms 
[Video]\5698OS_02_FD_Code_1stDraft\array-pop.js
Error: @auto did not import @auto C:\DevArea\pp_Learning JavaScript Data 
Structures and Algorithms [Video]\5698OS_02_FD_Code_1stDraft\array-pop.js 
perfectly
The clean-all-lines command may help fix whitespace problems
first mismatched line: 0 (original) = 0 (imported)
Original file...

   0 "var friends = ['Luci', 'Samira', 'Juliano', 'Alicia'];\n"
   1 '\n'
   2 'var exFriend = friends.pop();\n'

Imported file...

Tom 

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Leo 5.4b1 coming soon. Please test

2016-09-22 Thread 'tfer' via leo-editor
git pull complains that stderr.txt and or stdout.txt can't be merged.  I 
think these files might be due to the pythonw.exe fix.  Anyway, I think 
that these need to be added to .gitignore

Tom

On Wednesday, September 21, 2016 at 12:01:00 PM UTC-4, Edward K. Ream wrote:
>
> The only remaining bug on the list is #304 
> , which is annoying 
> nit that applies only to PyQt5 on Windows.
>
> Expect Leo 5.4b1 in about a week.  There is no hurry whatever.  I'll be 
> adding enhancements in the meantime.  
>
> Which enhancements find their way into 5.4 remains to be seen.  If there 
> are any you would especially like, let me know.  Limit: one per customer.
>
> 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


importer proposal

2016-09-21 Thread 'tfer' via leo-editor
There are always request for new importers or changes to existing 
importers, few people other than Edward have wrapped their mind around how 
to do this for themselves.  This is a proposal to make this easier for 
people to create their own importers or easily customize any importer to 
create nodes at whatever level of detail they want.

This would work by borrowing the Unix principles of making little programs 
that do one thing, then composing a chain of them to accomplish the task 
you want done.  Each language would have its own default chain, but you 
would have the option of adding your own chains/parameters/programs in your 
files "settings" node for each language you want to override the defaults 
on.

I imagine some of these tools would be general and then made specific to 
the language at hand by passing them things like a keyword list, regex's, 
and the like.  I'm not sure if this would need a intermediate format that 
gets turned into the nodes by a "nodeMaker" program at the end, (though 
this seems the likely scenario as the Unix approach is to keep things in 
text as long as possible), or if each program refines the parsing of nodes 
created by the previous program in the chain more directly.

Python has support for this sort of thing in the "included batteries", the 
io module includes stuff to work with strings.  To make things look more 
Unix like their is pipetools:  https://pypi.python.org/pypi/pipetools.

Tom


-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Pare Leo down and make it a plugin

2016-09-06 Thread 'tfer' via leo-editor
I looked into this further and, at this time, Edward is right, you can't 
easily mix Python with the JavaScript-based Visual Code.  Paring things 
down and translating into JavaScript is way too ambitious.  There are a few 
projects that are taking aim at allowing browser based technology to be 
coupled to Python, (and other languages), but such stuff is down the line.

As others have mentioned elsewhere, I think the thing to do is give Leo the 
ability to use neovim as an editor alternative.  I'll talk more about that 
in another post.

On Thursday, September 1, 2016 at 8:27:53 PM UTC-4, Edward K. Ream wrote:
>
>
>
> On Mon, Aug 22, 2016 at 8:18 PM, 'tfer' via leo-editor <
> leo-e...@googlegroups.com > wrote:
>
> There have been some discussions in the past on what we might do to make 
>> Leo more popular.  I've recently had some time out in the woods and was hit 
>> with a tack that just might do that.
>> ​
>>
>
> [snip]
>
> So here is what I'm proposing, make Leo into a plug-in for Visual Code.  
>> We'd need to pare down Leo, dropping the Qt code and using html and 
>> JavaScript to build a Outline pan
>> ​e.
>>
>
> ​This is a big question, and one that has been discussed partially 
> before.  We could probably list dozens of sub-items that might be of 
> interest.
>
> I have only a few minutes now, but I'd like to say what I think is the 
> most important message, namely that doing such a thing is
>
> 1. A very big project and
>
> 2. A project that has the potential to do more harm than good.
>
> 3. There may be better alternatives, or not.
>
> Point 1 should be obvious to any programmer.  Just picking a reasonable 
> widget set could easily become a full-time job.
>
> Point 2 is debatable.  I'm not asserting that it is true, but I would be 
> surprised if it weren't true.
>
> Again, this is a huge question.  I would suggest that people think 
> carefully of the consequences.
>
> 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Pare Leo down and make it a plugin

2016-08-22 Thread 'tfer' via leo-editor
There have been some discussions in the past on what we might do to make 
Leo more popular.  I've recently had some time out in the woods and was hit 
with a tack that just might do that.

If you do anything in the world of JavaScript you're aware of ability to 
use it and nodejs frameworks to build standalone apps.  In fact, there are 
two popular editors that use that technology, there is Github's Atom, and 
Microsoft's Visual Code.

So here is what I'm proposing, make Leo into a plug-in for Visual Code. 
 We'd need to pare down Leo, dropping the Qt code and using html and 
JavaScript to build a Outline pane (Note that the file browser pane works 
as a tree view of directories so we can steal some code from there).  There 
is already support for a log, (shell).  The editor pane would just have to 
be hooked up to the Outline pane and set to the relevant language.  It's 
perfectly possible to use both JavaScript and Python in such an app.

We would have the advantage and visibility of latching on to a popular and 
growing editor, get features for free that would likely never get into Leo 
and move over to what is becoming the most popular visual toolkit for 
interface design, one based on Html, CSS, and JavaScript. 

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Leo not running with pythonw.exe

2016-07-16 Thread 'tfer' via leo-editor
>From a terminal/console try:
   pythonw .\launchLeo.py  1>stdout.txt 2>stderr.txt

This worked for me, reference <
http://stackoverflow.com/questions/9705982/pythonw-exe-or-python-exe>

On Friday, July 15, 2016 at 12:07:11 PM UTC-4, Terry wrote:
>
> *Problem: Leo does not run when launched with pythonw.exe. Appears to run 
> fine with python.exe but has starting messages (see output below)*
>
> platform : win-64
> python version : 3.5.2.final.0
> Leo is installed with: LeoSetup-5.3-final.exe
> Qt5 installed: 
> http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.6/PyQt5-5.6-gpl-Py3.5-Qt5.6.0-x64-2.exe
>
> Launching with python.exe:
>
>
> C:\Users\terry\AppData\Local\Continuum\Miniconda3\python.exe "C:\Program 
> Files (x86)\Leo-5.3-final\launchLeo.py"
>
> leoID=6857 (in C:\Users\terry\.leo)
> reading settings in C:\Program Files 
> (x86)\Leo-5.3-final\leo\config\leoSettings.leo
> reading settings in C:\Users\terry\.leo\myLeoSettings.leo
> @openwith lines must start with a tag: 
> 'subprocess.Popen',['pythonw','C:/Python24/Lib/idlelib/idle.pyw'],'.py'
> @openwith lines must start with a tag: 'subprocess.Popen','C:/Program 
> Files/Microsoft Office/Office/WINWORD.exe',None
> conflicting key bindings in myLeoSettings.leo
>all Ctrl+Shift+Key-0 delete-comments
>all Ctrl+Shift+Key-0 delete-comments
> Failed to load libEGL (The specified module could not be found.)
> QWindowsEGLStaticContext::create: Failed to load and resolve libEGL 
> functions
> Failed to load opengl32sw.dll (The specified module could not be found.)
> Failed to load and resolve WGL/OpenGL functions
> reading settings in C:\Users\terry\.leo\harry.leo
>
> ** isPython3: True
> Leo 5.3-final, build 20160412153848, Tue Apr 12 15:38:48 CDT 2016
> Not running from a git repo
> Python 3.5.2, PyQt version 5.6.0
> Windows 7 AMD64 (build 6.1.7601) SP1
> wrote recent file: C:\Users\terry\.leo\.leoRecentFiles.txt
>
>

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Help -- Idea for a UI addition

2016-07-10 Thread 'tfer' via leo-editor
As I fumbled around in Leo Menus trying to do half remembered things, (its 
been a while since I've used it), I thought that we should borrow from the 
prompts Inkscape provides to make this easier.

In Inkscape, down in the status bar context sensitive hints are displayed. 
 For instance, as you go through the menus, you get an explanation of what 
the currently highlighted menu item would do.  For Leo, say we have Edit > 
Edit Body > highlighted: 

   - "Create a new node named by the first line of selected body text and a 
   body made of the other selected lines, then deletes that selection."
   - (if some lines are selected in an active body pane)
   - "Create a new node named the line the cursor is in (leading whitespace 
   stripped)"
   - (for when we have the cursor or a selection in a single line)
   - "Needs to have cursor in, or lines selected in an active body pane to 
   work"
  - (for when menu item is inactive)
   
This would make Leo easier to use

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Leo's inner workings trimmed from Doc?

2016-07-09 Thread 'tfer' via leo-editor
I've been working on a fork of a html presentation framework, 
(flowtime.js), intending to extend it from a nxm 2D grid, to a 3D outline, 
much like Leo.  Well if its going to mimic Leo, why not borrow some of the 
design?

Well, when I hit the doc's, I found that all of the tnode, vnode, 
parent/child, DAG stuff seems to have been deleted from the documentation, 
perhaps it is meant to be moved over to the "everything developers need to 
know" manual?

I got a hard copy of an older version around here somewhere, guess I go 
hunt it up.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Time travel in Leo

2016-07-09 Thread 'tfer' via leo-editor
You might want to look at Meld, a diff tool written in python with 
excellent visualization of changes.

A while back I was trying to give leo the ability to let me "slideshow" the 
lines of thinking in writing a piece of code, from psuedocode to stubs, to 
turning the stubs into working code.  IIRC, I was trying to adapt chapters 
to carry this out where the previous chapter was copied to a new chapter 
and then the next stage would be done there, ... rinse, repeat. 
 Unfortunately, it devolved into a "sort of works, but a nest of bugs" 
mess, perhaps this "movie" approach would support what I was trying to do.

In terms of a git-time-machine approach, I understand not wanting to alter 
previous commits, but if we are trying to form a narrative of what we were 
doing/thinking, we need some place to put that, how about just forming 
another branch.  So perhaps it might be best to split this into two tools, 
a git-explorer, and a narrative-maker that could take snapshots from the 
former and use it's own branch to provide space for commentary, (a nice 
touch would include the ability to capture audio commentary -- as we all 
hate to write comments but a willing to explain our coding to a colleague).

On Wednesday, June 1, 2016 at 8:45:46 AM UTC-4, Edward K. Ream wrote:
>
> I'll be working on pyflakes for at least several more days.
>
> As I do so, I am struck by how important the clone-find-all (cff, cfa, 
> cffm) command are: they provide exactly the kind of search-related views 
> that Leo needs.  For me, cff is the workhorse.  To my knowledge, these 
> commands exist in no other environment.
>
> As I consider how to present my pyflakes work, it occurs to me that a 
> relatively easy script might be almost as useful as the clone-find 
> commands.  Kent has asked for a long time for node history.  The idea is to 
> take history to the "limit", by allowing a slideshow-like view of an entire 
> Leo outline based on git commits.  Hit the back button: go back in time to 
> see what the *entire* file was like at the previous commit.  Hit the 
> forward button, go forward in time.
>
> Imo, this is probably the *only* way to show what has really changed.  
> Diffs are far too scattered.  Preferably, the time travel would not modify 
> the git repo.  Instead, it would be better to have the script do a 
> "lightweight" computation of the various versions of the outline.
>
> We'll see how feasible this would be.  We must make it difficult to revert 
> to a previous time by accident...
>
> In short, I want a way of describing, for instance to the pyflakes people, 
> the steps I took getting from A to B.  Diffs have no chance of doing what I 
> want. A "movie" of how pyflakes_study.leo has changed seems like the only 
> way.  More generally, such a feature might be a killer feature, just like 
> cff.
>
> 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.