doCommand() bug?

2021-12-21 Thread Phil
In an @button node I have the following text:
  c.doCommand(c.copyOutline, label='Copy Node')

When I click the button, I get the error below:

exception executing script
TypeError: doCommand() got an unexpected keyword argument 'label'


  line 2: #@+node:phil.20200202134614.6: * @button Copy Node
* line 3: c.doCommand(c.copyOutline, label='Copy Node')
  line 4: #@-leo
  line 5: 

I am running this:

Leo 6.6b2-devel, devel branch, build f85969ae8c
2021-12-21 06:16:01 -0600
Python 3.7.3, PyQt version 5.12.4
linux

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


Change in, and inconsistent behavior from previous version

2021-10-24 Thread Phil
There appears to be some slight change in behavior of Tab, Shift-Tab and 
Ctrl-{up-arrow} and Ctrl-{down-arrow} from previous versions, with 
respected to highlighted text and the location of the cursor.

*Regarding Tab and Shift-Tab:*
With the cursor at the beginning of a line, use Shift-{down-arrow} to 
highlight the line, then use Tab to tab the line to the right. The result 
is the single highlighted line tabbing right, and the cursor moving to the 
end of the line. Now Shift-Tab, and the line moves back left, but the 
cursor remains at the end of the line. The cursor re-position seems 
inconsistent - but that's not the main issue... This does seem different 
from previous versions of Leo though - because the line following the 
highlighted lines would also get tabbed.

*Now adding Ctrl-{up/down-arrow}:*
With the cursor at the beginning of a line, use Shift-{down-arrow} to 
highlight the line. Then use Ctrl-{up-or-down-arrow}. The highlighted line 
moves up/down respectively, *but so does the line below the highlighted 
line! *This also holds true for Shift-{up-arrow} to highlight the line 
above the current cursor position.

None of this is terrible. It seems somewhat inconsistent and illogical 
though. It used to be that Tab and Ctrl-{up-or-down-arrow} would also 
affect the following un-highlighted line - which I thought odd, but I got 
used to it. I'm not advocating a return to the old behavior necessarily, 
but I think it would make sense that these two actions would behave 
similarly with selected text.


I'm running this:

Leo 6.5-b2-devel, devel branch, build d73d76f206
2021-10-17 09:14:56 -0500
Python 3.7.3, PyQt version 5.12.4
linux

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


Import data structure for inspection

2021-09-24 Thread Phil
I would like to use Leo as a tool to inspect structured data from another 
application. In my particular case, I have a large tree data structure 
(perfect for Leo!), and it is possible to script the application to dump 
the data to a file, formatted as I desire - an ASCII representation would 
seem most sensible. I'd like to dump it into whatever format would be easy 
to import into Leo. I certainly can roll my own on this, but I'm wondering 
if there is a best approach for this, maybe even a "Leo standard" way.

Thanks!
Phil

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


Re: "Random" de-hoist

2021-09-15 Thread Phil
No, I do not use chapters; I have both *use_chapter_tabs *and *use_chapters 
*set false in my settings.

On Tuesday, September 14, 2021 at 5:32:40 PM UTC-5 Edward K. Ream wrote:

> On Monday, September 6, 2021 at 9:13:34 PM UTC-5 Phil wrote:
>
>>  I had a "random dehoist" again. Here's the sequence of events I 
>> captured. [snip]
>>
>
> Do you ever use chapters? 
>
> 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/2386f45f-9bae-4591-8194-1be0489ee350n%40googlegroups.com.


Re: "Random" de-hoist

2021-09-06 Thread Phil
Thanks for that Edward. I had a "random dehoist" again. Here's the sequence 
of events I captured. I don't see any obvious reason why the tree should 
dehoist. Hopefully this makes sense, and is helpful for you.



This is the text I was editing, in one node, typing line N, then copying 
text from another node and pasting it as line N+1.

line N:  local level = t[2]
line N+1:print(indent_text(tostring(s), 2*level))


Here's the view-lossage output; I've added annotations to the right:

l  {start typing line N}
o
c
a
l
Space
l
e
v
e
l
Space
=
Space
[
2
]
BackSpace  {noticed the error, backspaced to correct it}
BackSpace
BackSpace
t
[
2
]  {finished typing line N}
Return {after the Return, I clicked on another node to copy and 
paste some code}
Ctrl+c {selected text with the mouse, copied it, then clicked back 
to the target node}
Ctrl+v {pasted the text}
Ctrl+s {saved, as I do frequently - it is here that my hoisted 
subtree dehoisted}
v
i
e
w
-
l
o
s
s
a
g
e
Return


On Saturday, September 4, 2021 at 11:34:52 AM UTC-5 Edward K. Ream wrote:

> On Sat, Sep 4, 2021 at 10:15 AM Phil  wrote:
>
>> When working in a hoisted tree, I occasionally experience "random" 
>> de-hoisting.
>>
> ... 
>
>> Any ideas?
>>
>
> The view-lossage command shows the last keystrokes you typed.
>
> 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/8a861ae2-d556-43b0-ba3a-d763648ceb03n%40googlegroups.com.


"Random" de-hoist

2021-09-04 Thread Phil
When working in a hoisted tree, I occasionally experience "random" 
de-hoisting. It's not really random, as it only occurs when I'm typing. And 
I'm not a great typist, so it is certainly possible - likely! - that my fat 
fingers are the culprit. But... I have looked through all my settings to 
find the key-combination that I may be inadvertently hitting, and I don't 
see how I can be causing this; Ctrl-Alt-Shift-h and Alt-O-H-E are quite 
specific combinations, that seem highly unlikely to be hit at random. One 
other possible factor is that I have defined Hoist/Dehoist buttons as I use 
these frequently; but these require a mouse click to operate, and I lack 
the dexterity to be mousing and typing at the same time!

Any ideas?

Here's what I'm running:

Leo 6.2.1 final
Python 3.7.3, PyQt version 5.12.4
linux

Thanks!
Phil

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


@url without percent encoding?

2019-10-30 Thread Phil
I use @url to link to file paths on my PC (Windows). When paths have 
special characters (spaces, etc.), I have manually replaced those 
characters with their %xx encoding. This allows those links to be opened 
from Leo, but it is clumsy and impedes readability.

Is there a better way to do this?

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/57a7ec41-89ac-4935-85f5-4bf078a46a64%40googlegroups.com.


Re: Failure starting newly installed Leo

2019-07-01 Thread Phil
On Sunday, June 30, 2019 at 10:50:41 PM UTC-5, Zoom.Quiet wrote:
>
> SEE: Installing Leo — Leo 6.0 documentation 
>
> https://leoeditor.com/installing.html#installing-everything-with-anaconda-or-miniconda
>  


Thank you thank you! This worked perfectly!
Phil 

-- 
You received this message because you are subscribed to the Google Groups 
"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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/027b18be-5194-4a65-b76d-6305d8d995f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Failure starting newly installed Leo

2019-06-30 Thread Phil
Leo is failing to start after a fresh installation of Linux and Anaconda. 
Do I simply need to install QtWebKit, or is this something else?

Starting with this:

Pop!_OS (Ubuntu) 19.04
Anaconda 3
Python 3.7

I then did a "pip install leo", which appeared to be successful.

Running Leo gives this traceback:


(base) phil@muon:~$ leo
Traceback (most recent call last):
  File 
"/home/phil/tools/anaconda3/lib/python3.7/site-packages/leo/core/leoQt.py", 
line 127, in 
from PyQt5 import QtWebKit
ImportError: cannot import name 'QtWebKit' from 'PyQt5' 
(/home/phil/tools/anaconda3/lib/python3.7/site-packages/PyQt5/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/phil/tools/anaconda3/bin/leo", line 6, in 
from leo.core.runLeo import run
  File 
"/home/phil/tools/anaconda3/lib/python3.7/site-packages/leo/core/runLeo.py", 
line 27, in 
leoGlobals.app = leoApp.LeoApp()
  File 
"/home/phil/tools/anaconda3/lib/python3.7/site-packages/leo/core/leoApp.py", 
line 334, in __init__
import leo.core.leoFrame as leoFrame
  File 
"/home/phil/tools/anaconda3/lib/python3.7/site-packages/leo/core/leoFrame.py", 
line 13, in 
import leo.core.leoColorizer as leoColorizer
  File 
"/home/phil/tools/anaconda3/lib/python3.7/site-packages/leo/core/leoColorizer.py",
 
line 18, in 
    from leo.core.leoQt import Qsci, QtGui, QtWidgets
  File 
"/home/phil/tools/anaconda3/lib/python3.7/site-packages/leo/core/leoQt.py", 
line 131, in 
from PyQt5 import QtWebEngineCore as QtWebKit
ValueError: PyCapsule_GetPointer called with incorrect name

-- 
You received this message because you are subscribed to the Google Groups 
"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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/45d08796-b52c-49cc-a2bc-09eb7f88a9ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


using Julia - how to type unicode characters

2019-03-14 Thread Phil
I want to use Leo to do Julia code development. Julia allows unicode in 
identifiers. Is there a way to enter and display unicode in the body pane?

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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.


Having difficulty with WIndows 10

2018-11-30 Thread Phil
I am trying (almost successfully) to get Leo installed on a colleague's 
Windows 10 machine. She has installed Anaconda and is running a Python 3 
environment. She has pulled the master branch of Leo into 
c:/Users/userid/Tools/leo-editor, and she can run an Anaconda prompt in 
that directory and run Leo "manually" just fine. But we have utterly failed 
getting file associations to work so that she can just double click on a 
Leo file to open it.

Any suggestions, either to make the appropriate file associations, or for 
some reasonable workaround?

Thanks!
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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: seeking guidance on using Leo collaboratively with Git

2018-08-27 Thread Phil
Thanks for that, it's helpful. But the notion of a reference file begs the 
question of who maintains *that* file. In my project, both my partner and I 
are continually creating new content, which means that we would both need 
to make changes to the reference file. This impedes the efficiency that we 
could achieve by working concurrently - we would instead need to take turns 
updating the reference file.

Maybe I'm still missing something?

On Monday, August 27, 2018 at 10:42:37 AM UTC-5, Edward K. Ream wrote:

>
>
> On Mon, Aug 27, 2018 at 10:19 AM Phil > 
> wrote:
>
>> I am currently collaborating on a project with one other person, using 
>> Leo and Git. In addition to committing derived files to Git, we have also 
>> been committing the Leo file itself. We have had some occasional problems 
>> (a corrupted Leo file, mainly), making me think that we should *not* put 
>> the Leo file in Git - but maybe it's something *we're* doing wrong, and 
>> not Leo.
>>
>> What is the recommended way to use Leo in this scenario?
>>
>
> There are several FAQ entries <http://leoeditor.com/FAQ.html#id61>. Let 
> me know if you have questions or comments.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To 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.


seeking guidance on using Leo collaboratively with Git

2018-08-27 Thread Phil
I am currently collaborating on a project with one other person, using Leo 
and Git. In addition to committing derived files to Git, we have also been 
committing the Leo file itself. We have had some occasional problems (a 
corrupted Leo file, mainly), making me think that we should *not* put the 
Leo file in Git - but maybe it's something *we're* doing wrong, and not Leo.

What is the recommended way to use Leo in this scenario?

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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.


Meaning of outline icons - where is that documented?

2018-04-06 Thread Phil
I have (possibly) turned a colleague of mine into a Leonista! I handed over 
a project to him, including my Leo file, and he's been diving in, asking 
questions (and liking Leo). The last question he asked was, what is the 
meaning of the symbols in the outline; he couldn't find that in the 
documentation. I explained the meanings to him, then I looked in the 
documentation so that I could point him to more information. I also could 
not find it either, although I am sure I have seen it before. It seems it 
should be in the "Leo in 10 Minutes" section, but it's not - and there's 
only one screenshot, all the rest is just text.

So, as I peruse the documentation, it occurs to me that, for newbies at 
least, more pictures with explicit and detailed descriptions of the 
elements of Leo would be helpful.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To 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.


puzzled by valuespace plugin

2018-03-21 Thread Phil
Today I started Leo to a Leo Tip (I like those!) suggesting use of the 
valuespace plugin. Ok, I'm game. I load it up, and.  I am completely 
clueless as to what this is good for. I have read the documentation, looked 
for help in this list, and I just don't get it.

I'm assuming that it made it to a Leo Tip because it has value, which 
suggests to me that I might want to use it. But it's not at all obvious why 
(or how). What am I missing?

-- 
You received this message because you are subscribed to the Google Groups 
"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: how to run a script when Leo starts

2018-02-25 Thread Phil
There would still be a security risk for a specific Leo file, which would 
need addressing, but it perhaps simplifies the problem somewhat.

Actually, the security risk would be higher if a Leo file could turn on 
@script by itself. It means that even when the global setting disallows 
@script, a specific Leo file could override that. Yuck!

-- 
You received this message because you are subscribed to the Google Groups 
"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: how to run a script when Leo starts

2018-02-25 Thread Phil
Alright, I have done a little test, as follows:


In myLeoSettings.leo:
@bool scripting-at-script-nodes = True

With test.leo
Under @settings, include this:
@bool scripting-at-script-nodes = True

create node @script myscript containing this:
import datetime
for p in c.all_positions():
if p.h == 'THIS_IS_A_TEST':
p.b = datetime.datetime.now()
g.es('@script has run')

create an empty node with headline THIS_IS_A_TEST

When the outline is loaded, the following appears in the log window:
Security warning! Ignoring...
@bool scripting-at-script-nodes = True
This setting can be True only in
leoSettings.leo or myLeoSettings.leo
disabled @script: myscript

Make this change:
@bool scripting-at-script-nodes = False

When the outline is loaded, the following appears in the log window:
disabled @script: myscript

Finally, make this change:
@@bool scripting-at-script-nodes = False

When the outline is loaded, the following appears in the log window:
executing script myscript
@script has run
and the node THIS_IS_A_TEST has the current date/time.


This shows that the value of the outline-local *scripting-at-script-nodes* 
flag is tested when test.leo is loaded, and that its value affects the 
ability to run @script nodes. Thus, it would appear that there could be an 
outline-local version of the flag, so that the global flag in 
myLeoSettings.leo could be set to False for default behavior. There would 
still be a security risk for a specific Leo file, which would need 
addressing, but it perhaps simplifies the problem somewhat.

-- 
You received this message because you are subscribed to the Google Groups 
"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.


how to run a script when Leo starts

2018-02-23 Thread Phil
I want a script to run every time I start Leo. How can I do this?

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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: saving cloned @clean files in different @path's

2017-11-09 Thread Phil
 

> ​Rev a627fcc ensures that ​@cloned nodes to two different paths will both 
> be written.  The fix was entirely straightforward and all unit tests pass.  
> But...
>

Thank you Edward!
 

>
> *Warning*
>
> ​This rev changes corresponding code in at.readAll, but here the results 
> ​are kinda like rearranging chairs on the Titanic :-)
>
> All will be well as long as both external files contain exactly the same 
> code, but Leo does not detect if the two files are different, say if one 
> has been changed with another editor. Afaik, Leo has *never *been able to 
> detect changes between two different *cloned *nodes with the same gnx.
>
> What will happen is that one of the clones will "win".  Before today, the 
> *first* read node will win.  Now, the *last* cloned node will win.
>
> In short, you are asking for trouble using two cloned @clean nodes (or any 
> other kind of @ node).  This has always been true, and will likely 
> remain so forever.
>
>
Ok, that makes sense to me, and I will keep it in mind in the future. As a 
mostly sole developer writing code almost entirely using Leo, I don't 
usually modify files outside of Leo, so I wouldn't expect problems.

Thanks again!
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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: saving cloned @clean files in different @path's

2017-11-07 Thread Phil
Matt,
 

> I replicated the only-1-copy-written behaviour here with both @file and 
> @clean cloned nodes. 
>

Good! I'm not crazy...!


> I Edward explained that he really didn't like cloned 
> @file/@thin/@shadow/... nodes because of {...cache problems? race 
> conditions?} and possibility of data loss. (whee! I found it)
>
> The advised pattern is to have distinct `@file path1/thing` and `@file 
> path2/thing` head nodes and then create an organizer node inside each and 
> clone that instead.
>
 
I tried that, and indeed it works. However, it seems inconsistent that 
changing an organizer-node-clone would trigger file writes for all files 
containing that clone, but that changing an @file-node-clone would not do 
the same.

Further experimentation shows that only the *first* @file-node-clone that 
appears (in top-to-bottom traversal order) in the outline actually gets 
saved on change - subsequent clones are not saved to their respective 
paths. If I exchange the order of the clones in the outline, suddenly a 
different file is being saved, but none of the others.

If the reason for not using @file-node-clones is because of the risk of 
data loss, then my next question becomes "why is there a risk of data 
loss?" If the answer to this is due to some fundamental property of 
outlines containing clones, then I'd like to understand that better so that 
I can work accordingly. If that is not the case however, then the 
underlying cause of data loss should be addressed, rather than to simply 
adhere to a convention of not using @file-node-clones.

-- 
You received this message because you are subscribed to the Google Groups 
"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.


saving cloned @clean files in different @path's

2017-11-06 Thread Phil
Leo 5.6, build 20171105131700, Sun Nov  5 13:17:00 PST 2017
Git repo info: branch = master, commit = 94ebac1f2510
Python 2.7.13, PyQt version 5.6.2
Windows 7 AMD64 (build 6.1.7601) SP1
isPython3: False
caching enabled

Place the attached file in a folder containing empty subdirectories sub1 
and sub2. Then open the .leo file and do the following:

1) Select the test.c node under the sub1 path, make an edit to the body, 
and save the file. The file test.c will be created in directory sub1, but 
not in sub2.

2) Select the test.c node under the sub2 path, make an edit to the body, 
and save the file. The file test.c in directory sub1 will be modified, but 
there will be no file created in directory sub2.

3) With the test.c node under the sub2 path still selected, make an edit to 
the body, then save using Ctrl-Shift-W. The file test.c will be created in 
directory sub2 with the new edits, but the file in directory sub1 will not 
be updated.

This behavior does not match what used to happen in the past (maybe more 
than a year ago). It used to be the case that changing a cloned @file-like 
node would result in those changes being saved to all the paths under which 
the clone lived in the Leo outline.

I just recently switched to using the GIT repo as my Leo install, so maybe 
I lost a setting in that switch. Or maybe Leo's behavior changed. Either 
way, I'd like it to be what it used to be. Any suggestions?

Thanks!
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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.


test.leo
Description: Binary data


langserver - this looks important

2017-09-13 Thread Phil
I just ran across this 5 minutes ago, so I can't really comment on it other 
than that it appears relevant to Leo, so I though I'd pass along the info:

http://langserver.org/

-- 
You received this message because you are subscribed to the Google Groups 
"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.


How do you organize your Leo projects?

2017-04-05 Thread Phil
Hi All,

I am about to start a new project using Leo, and am considering how I want 
to organize it with respect to other projects. I have used two different 
approaches, as follows:

   1. Use a single Leo file and put all projects in it. Each project is 
   rooted in a single root node, using @path to locate it in the filesystem.
   2. Use a separate Leo file for each project. Each Leo file is located in 
   the filesystem along with its project.
   
There are pros and cons to each approach. The single-Leo-file approach 
offers the following:

*Pros:*

   - Only one Leo file - nothing gets misplaced or forgotten
   - Global search through all my code history - giving a better chance of 
   finding something to re-use
   - Bugfixes in cloned reused code propagate to all projects - no need to 
   manually patch them in
   - I know that code is always to be found in this single Leo file - no 
   need to go looking in the filesystem for something I remember doing "way 
   back when"
   
*Cons:*

   - Only one Leo file - becomes large and sluggish to load
   - Changes to cloned reused code propagate to all projects, even when I 
   don't want it to
   - Changes to filesystem breaks @path
   - Something I did "way back when" can eventually fall out of my mental 
   radar range, even if it is useful
   

The two approaches are roughly equivalent, though I tend to favor the 
single-Leo-file method.

I am wondering how others manage this.

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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.


Is it possible to suppress a section reference?

2016-12-09 Thread Phil
I have a shell script that contains the following line:

*echo <> out.txt*

Leo wants to treat *<>* as a section reference, which I obviously 
don't want. My workaround is to make the node an @asis node, but I'd prefer 
to suppress the section reference behavior for just that line so that I can 
make the file from an @clean node.

Any ideas?

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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: copy text to clipboard in a script

2016-09-21 Thread Phil


> For example (tested):
>
> g.app.gui.replaceClipboardWith('hi')
> print(g.app.gui.getTextFromClipboard())
>
> EKR
>


Perfect! Thank you!

Phil 

-- 
You received this message because you are subscribed to the Google Groups 
"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.


copy text to clipboard in a script

2016-09-21 Thread Phil
I have a script that generates some text in the log pane, which I then 
manually copy and paste into another application. Can I save myself the 
manual copy step by having the script put the text directly into the 
clipboard?

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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: making "identical" clones truly identical

2016-03-09 Thread Phil
Edward,

I was unable to make your example work due to the fact that I have no 
c.cloneFindByPredicate() 
method (I'm running 5.1-final, build 20150429071550). But with your hints, 
I tried a couple other things that, while increasing my understanding of 
the difficulty of the problem, did not get me to a solution. In the end, I 
simply manually fixed my document, which took less time than I had spent 
noodling over the problem. Sometimes, the direct solution is better than 
the pretty one.  :)

I don't generally do much scripting of Leo, but every time I do, I am 
impressed by the capabilities. It's fun to get into the mud sometimes and 
play, and this was a fun little exercise. Thanks again for your help, and 
for a great product.

Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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: making "identical" clones truly identical

2016-03-08 Thread Phil
Edward, thank you! I will (carefully) give this a try and report back if I 
find anything unexpected.

Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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.


making "identical" clones truly identical

2016-03-07 Thread Phil
I caught this in my code today:

I have a <> node that I clone all over the place so that 
I can update all affected files from a single clone. However, I apparently 
copied some code into my outline at some point that created a 2nd clone 
with the exact same headline and contents as the first clone, but the two 
are not clones of the same node! Is there a way to combine these so that 
they really are clones of the exact same node?

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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: Push/pop hoist?

2015-12-02 Thread Phil


> Not 100% clear on your goal - basically cut / yank / push a subtree, 
> which you're identifying by hoisting, to a stack, rather than the 
> single content clipboard, and the copy / pop it somewhere else later? 
> I guess I'm confused by the mix of moving subtrees and hoisting. 
>
> The quickmove plugin provides a number of ways (including buttons) to 
> move subtrees to targets.  You could create a node somewhere called 
> "stack-of-nodes" and set it as a target for "move to first child" 
> operations using quickmove.  Then you'd have a button to move the 
> current node / subtree to the first child position of that node, so 
> your stack would be the children of a node in the tree, which seems 
> Leonine. 
>
> It wouldn't be hard to script a button to move those children back to 
> the current position - could show some code, but not sure I'm answering 
> the question? 
>
> Cheers -Terry 
>

Terry, thanks for your response. I guess I didn't pose the question clearly 
enough; let me try again:

What I'm looking for might be called push/pop of "views" (and not cut/paste 
operations), with a "view" being what I see when I have a particular node 
hoisted. Ideally, this would also preserve the state of the expanded and 
collapsed subtrees in that view, but that would not be necessary. So, I 
don't want to change the tree structure, I just want to change the way I'm 
looking at it.

Does this help?

Thanks!
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Push/pop hoist?

2015-12-02 Thread Phil


> Chapters provide a similar function.  I use them all the time for this 
> functionality.
>
>
> Thanks for the tip, that is helpful. I had looked at chapters in the past 
but didn't really get how they work. Playing with it again, now I get it.

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


Re: Push/pop hoist?

2015-12-02 Thread Phil


> The 'problem' with chapters, if you can call it that, is that they 'feel' 
> more permanent -- you're making a change to the tree structure (with 
> @chapter nodes) to accommodate it -- of course, they're disposable if you 
> wish, just not transparently so.
>
> Sure, that's a good point. I think I can work with that behavior, but it 
would also be nice to have a more "transient" stacking behavior that is 
independent of the outline structure. Maybe if I can find some time I'll 
try to figure out how to do that.  :)

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


Push/pop hoist?

2015-12-01 Thread Phil
Is there a command that can push the current (hoisted) root node onto a 
stack, which can later be popped back to the hoisted root position? If not, 
can someone provide some guidance for how I would implement this 
functionality myself in a @button?

Thanks!
Phil

-- 
You received this message because you are subscribed to the Google Groups 
"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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Observations about how Leo has affected my workflow

2015-08-07 Thread Phil
I have been using Leo for many years now, and I love it. I use it for a 
couple primary purposes. First, I use it as a PIM, both for 
administrative information, as well as for archival information where I 
keep virtually all the code I've ever written in the event I should need 
something later (which happens surprisingly often). Second, I use it as a 
code development tool.

For both uses, I have been mostly a solo user, i.e., I have had very little 
need to collaborate with others, and therefore no need to coordinate my 
Leo-nized workflow with the non-Leo workflow of others. Until now, that 
is. I am currently working in a team to develop code, where I use Leo, and 
my team members do not. It's working pretty well, but it has led to some 
realizations about how Leo has affected the way I like to work, and how 
that subsequently affects my team's work.

In short, Leo allows me to be a sloppy coder! Let me explain.

1) Leo greatly simplifies trial and error coding. I can implement 
experimental code blocks and routines, try them, and if they don't work the 
way I want or there's something I want to defer further work on until 
later, Leo allows me to quickly and easily park the code by making a note 
in the headline, commenting out the block with @ and @c, or moving the 
offending code node somewhere else. That means that my team members can 
sometimes find spurious code blocks with no obvious relationship to the 
rest of the code. I see why it is the way it is, because I see the 
structure, but they can't see that.

2) I tend to use fewer comments. This is because the outline structure of 
my code contributes so significantly to my understanding of the code that I 
don't need copious comments. And I like this, because, even though I know 
better, I have difficulty keeping comments and code in sync. But my team 
members don't see the structure, so it is not always obvious to them how 
things are related or what they are intended to do.

3) I tend to use fewer helper functions, and use nodes instead. This is 
great for me, because it provides better documentation, but for the poor 
coder who is looking at the text, my code can sometimes look like long 
run-on functions.

4) I use clones freely, including between files. This can conflict with 
non-Leo coders, who don't realize that a piece of code is common between 
several locations. If they make a change in a cloned section of a file, it 
won't propagate to the other files. If I make the same change in a cloned 
node, it affects all code using the clone. Maybe the common code should be 
broken out into a separate file or library, but that's not always practical.



I use Leo because it fits my thinking style. I would say it has even helped 
me to be a more creative and innovative developer, because the ability to 
capture structure allows me to envision the code in a larger scope, and see 
relationships that I might otherwise miss.

I am also convinced that my team members would find using Leo to be very 
productive. But I am not in a position to force others to use it. And every 
developer has his or her own favorite tools, so convincing them to adopt 
Leo would be difficult if not impossible.

So, I would be interested to hear the experiences of others who are in 
similar environments. What workflow practices work best? What doesn't work? 
How do you resolve workflow conflicts?

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


navigation question

2015-07-31 Thread Phil
Is it possible to suppress automatic collapsing of subtrees while I'm 
navigating an outline? I often cycle through several nodes in several 
places, and when they automatically collapse, I need to re-navigate, which 
slows me down and disrupts my thinking.

-- 
You received this message because you are subscribed to the Google Groups 
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


a font question

2015-04-21 Thread Phil
I have a single Leo file that I work with on both a Windows machine and a 
Linux machine. Font display is different between the two machines. Is there 
a way to have platform-specific settings in a Leo file, so that I can have 
it automatically display the way I like, regardless of which platform I 
open the file on?

-- 
You received this message because you are subscribed to the Google Groups 
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


undesirable font change when opening new tab

2015-01-19 Thread Phil
I have fat fingers and occasionally hit Ctrl-N when I meant to hit Ctrl-B. 
So, I get a new tab. Not really a problem, as I can just close it, but it 
changes the fonts in my other tab.

Is there a simple fix for that?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


script execution path versus save path, and CTRL-B

2014-11-13 Thread Phil
I have an outline containing two python scripts, A and B, and in which A 
imports B. I use @path X to specify where these scripts get saved. My Leo 
file lives in directory Y, different from the directory in which the python 
scripts are stored.

I would like to be able to execute A during development and debugging using 
CTRL-B or by making the node into a script button. But this doesn't work, 
because Leo is running in Y, but B is in X, and therefore I get an import 
when I try to execute A because it cannot find B.

Of course, I could run the Leo file from X, but I have other scripts in 
other nodes, stored in other locations, for which I want the same 
capability.

So, what I need is for CTRL-B or script nodes to recognize where (and if) a 
script is stored in a particular path, and then execute that script as if 
it is being executed at that path.

Any thoughts or suggestions?

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: script execution path versus save path, and CTRL-B

2014-11-13 Thread Phil
I meant to say and therefore I get an import *error* when I try to execute 
A

-- 
You received this message because you are subscribed to the Google Groups 
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: script execution path versus save path, and CTRL-B

2014-11-13 Thread Phil


 Does 

 import sys 
 sys.path[:0] = '.' 
 import B 

 help? 

 Cheers -Terry 


 Yes, that works. I don't understand why though - the current path - . - 
is still Y, isn't it? How does that make it possible for A to find B?

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: script execution path versus save path, and CTRL-B

2014-11-13 Thread Phil


   Yes, that works. I don't understand why though - the current path - 
  . - is still Y, isn't it? How does that make it possible for A to 
  find B? 

 I think the current directory is wherever A is, check 

 import os 
 g.es(os.getcwd()) 

 in A 

 But I think Python doesn't try to import from the current directory 
 unless you specifically tell it to, as above. 


A couple experiments helped me to understand. In fact, Leo *does* execute a 
script in the path designated by @path, but as you pointed out, the Python 
search path  does not include that path by default. However, this is 
different behavior from executing a script directly from a command prompt, 
in which case the default search path *does* include the current directory.

I would prefer not having to explicitly add the current path. Can this 
behavior be captured in Leo's code that executes the script?

Phil

-- 
You received this message because you are subscribed to the Google Groups 
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Check out the rewritten rst3 tutorial

2013-10-25 Thread Phil
Ok, I use Leo quite a bit, but only for a small subset of its capabilities. 
I've never used rst before, nor even tried to understand what its good for. 
So maybe I'm a good test case.  ;)

I'm using Leo 4.11 devel, build 5637.

1) I did not know I needed docutils. The tutorial should mention something 
about this.
2) @bool rst3_call_docutils = False suggests to me that I don't need 
docutils, but that doesn't seem to be the case. What then does it actually 
do?
3) You might talk about settings first, especially if they affect whether 
the examples will work.
4) You mention sphinx without explaining it. I don't know why that should 
be important to me.

What is the presumed knowledge level of the reader? Admittedly, I know 
nothing about rst, so maybe if I did, I would understand the tutorial 
better. But it might help to preface the tutorial to let the reader know 
what they might need to know before reading the tutorial, and direct them 
to other materials that would help them acquire the prerequisite knowledge.

In the short time I've spent with this, I could not get the examples to 
work. I did not install docutils, but the tutorial seem to suggest it's not 
necessary (via rst3_call_docutils), but that's not clear to me either.

I will now install docutils, try again, and report back.

HTH,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Check out the rewritten rst3 tutorial

2013-10-25 Thread Phil
I installed docutils, and now the example that I previously created does 
work. Yay!

I am still unclear as to the function of the settings, as it doesn't seem 
to matter whether I have them or not.
And I still don't know what sphinx is about.

Phil

-- 
You received this message because you are subscribed to the Google Groups 
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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.


Embarrassing noob question

2012-05-11 Thread Phil
I have v4.10 final with Python 3.2.0, qt 4.8.0 running on Windows 7.
My goal is to outline an existing 37 page server build document, and
revise it to the current standard.

I can import the existing .txt file, and learned how to build nodes
with body text.  I also started a new test outline with some leveled
nodes with text.

My problem is that I think that I save the file and see it in the file
system.  When I open any .leo file, at best I get a single node with
the nodes that I created in XML in the body text.

I can't figure out how to open an existing file and pick up editing
where I left off!

I have lived most of my life in Microsoft land, but I can navigate
very slowly through Linux/OSX lands.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



Embarrassi​ng noob question

2012-05-11 Thread Phil


I have v4.10 final with Python 3.2.0, qt 4.8.0 running on Windows 7.
My goal is to outline an existing 37 page server build document, and
revise it to the current standard.

I can import the existing .txt file, and learned how to build nodes
with body text.  I also started a new test outline with some leveled
nodes with text.

My problem is that I think that I save the file and see it in the file
system.  When I open any .leo file, at best I get a single node with
the nodes that I created in XML in the body text.

I can't figure out how to open an existing file and pick up editing
where I left off!

I have lived most of my life in Microsoft land, but I can navigate
very slowly through Linux/OSX lands.
Thanks.
 
ps  I probably am deficient in how to post to this group!  sigh

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/leo-editor/-/PC9F6488ZdIJ.
To post to this group, send email to leo-editor@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



Re: simple file-open problem, probably Windows, but I gotta ask

2012-04-18 Thread Phil
 Have you tried the suggestions posted in this still-active 
 threadhttps://groups.google.com/forum/#%21topic/leo-editor/KwrqYGMH20Q/disc...
 ?

Oops, my apologies! I *do* actively read this forum, and should have
caught that. Sorry for the noise!

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



simple file-open problem, probably Windows, but I gotta ask

2012-04-17 Thread Phil
Hello,

I have just been forced to upgrade to Windows 7, and am learning its
quirks, so this just might be me not knowing the right thing to
do

I installed (using the pre-built windows installer) Leo 4.10 build
5020, using Python 2.7.3, qt version 4.8.0. When I double-click a .leo
file to open it, Leo starts up with an empty workbook.leo node, but
does not load the file I double-clicked. Of course, what I want is for
the file I double-clicked to be opened up. I can manually open the
file from the file menu, so this behavior is merely irritating, not
debilitating.

How can I fix this?

Thanks!
Phil

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



Weirdness in body text

2012-04-17 Thread Phil
More playing with my shiny new Leo install!

Windows 7, Leo 4.10 build 5020, using Python 2.7.3, qt version 4.8.0.

I have an outline with a @data qt-gui-plugin-style-sheet node. When I
save the outline with that node selected, then reopen (back to that
node), its contents appear fine. But if I then select another node,
and then re-select the @data node, the contents of that node have
appeared to change, with some of the text lines not displaying. I say
appeared because if I close and reopen the file, the node again is
fine, and I can repeat the problem. After the problem occurs, if I
scroll through the text using the down/up arrow keys, I can see the
line counter change, but the cursor occasionally disappears for a few
lines before it reappears and resumes scrolling.

I will be happy to share the offending Leo file. Where should I send
it?

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



minor hoist issue

2010-09-14 Thread Phil
The following refers to Leo 4.7.1 final, using tk on Windows.

The hoist button only goes to Hoist 1 after which it becomes
disabled. I have traced the problem to the hoist.py module, in class
HoistButtons, method onHoistChanged, which I've copied below. You'll
see that I commented out the b.config() line, and now the hoist button
works perfectly except that it doesn't gray out the button when hoists
are not possible. However, that doesn't seem to cause a problem. (And
besides, I don't see the gray-out behavior to be a very helpful
feature anyway.)

Though my fix works, I believe the canHoist() function is the real
problem, as it returns False if you hoist to a node that can be
hoisted, and returns True if you de-hoist to a node that can be
hoisted. There is a comment in the source for canHoist() stating that
minimizing positions is crucial! I don't know what that means, but
perhaps that hints at the cause?

def onHoistChanged(self,tag,keywords):

c = self.c

if g.app.killed or g.app.unitTesting: return


for b,f in (
(self.hoistButton,c.canHoist),
(self.dehoistButton,c.canDehoist),
):
state = g.choose(f(),normal,disabled)
#b.config(state=state)

n = c.hoistLevel()
if n  0:
self.hoistButton.config(bg=activeHoistColor,
activebackground=activeHoistColor,
text=Hoist %s % n)
else:
self.hoistButton.config(bg=self.bgColor,
activebackground=self.activeBgColor,
text=Hoist)

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-edi...@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



Re: seeking help with broken script node after upgrade to 4.7

2010-09-14 Thread Phil
Ok, I haven't fixed the Qt version yet, but I have the tk version
working well. I thought I'd post it for others.

Place this code into a Leo node with following sibling nodes, and
execute it (Ctrl-B).
On the button bar that is created:
Left click a button to hoist the node associated with that button.
Right click on the buttons to remove them.


@
This script will create a hoist button bar with buttons for every
sibling node that follows this script node
@c

from mod_scripting import scriptingController

class myScriptingController(scriptingController):
def deleteButton(self,button,**kw):

Delete the given button.
This is called from callbacks, it is not a callback.

w = button

if button and self.buttonsDict.get(w):
del self.buttonsDict[w]
self.iconBar.deleteButton(w)
self.c.bodyWantsFocusNow()
w.master.iconBarButtonCount -= 1
if w.master.iconBarButtonCount == 0:
w.master.destroy()

def makeiIconBarButton(node):
text = node.headString()
statusLine = Hoist %s % text
def hoistButtonCallback (event=None,c=c,p=node.copy()):
while (c.canDehoist()):
c.dehoist()
c.selectPosition(p)
c.hoist()
b = sc.createIconButton(text=text,
command=hoistButtonCallback,
shortcut=None,
statusLine=statusLine,
bg='yellow')
g.app.iconWidgetCount -= 1
return b

sc = myScriptingController(c)

originalFrame = sc.iconBar.iconFrame
sc.iconBar.addRow()
sc.iconBar.iconFrame.iconBarButtonCount = 0

for node in p.following_siblings_iter():
b = makeiIconBarButton(node)
sc.iconBar.iconFrame.iconBarButtonCount += 1

sc.iconBar.iconFrame = originalFrame
c.frame.iconFrame = originalFrame

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-edi...@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



Re: seeking help with broken script node after upgrade to 4.7

2010-08-30 Thread Phil
On Aug 22, 10:03 am, Terry Brown terry_n_br...@yahoo.com wrote:
 On Sun, 22 Aug 2010 10:00:56 -0500

 Terry Brown terry_n_br...@yahoo.com wrote:
  To clarify, Leo has a gui agnostic API for these parts of the interface for 
  Leo's core functions, but I'm not sure it covers everything plugins might 
  need.

 Ahem, and to clarify the point of my posting :-)  .configure() is a Tk 
 function, so it won't work with Qt.  There may or may not be Leo wrapper 
 functions to get the same result in either gui.

Terry, thanks for the tips. I found some spare time to look into this
a bit more and found that the plugin toolbar.py, which I had
enabled, was the main culprit. Upon disabling it, my script worked ok
on Windows (tk), but not on Ubuntu (qt). As you say, the .configure()
function does not work in qt, so as a temporary workaround I simply
removed DeleteButtonCallback(), at which point it worked alright with
qt.

Ultimately, I would like to have a script that works the same on both
tk and qt. I'll continue to tinker with it until I get it the way I
want it, but for now I have it working well enough on both platforms.

So a final question: Other than looking at the code (which I assume is
in leoGuiPluginsRef.leo), is there any official documentation of the
gui-agnostic API?

Thanks!
Phil

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-edi...@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



Re: seeking help with broken script node after upgrade to 4.7

2010-08-21 Thread Phil
  On Windows, I have determined that the problem occurs at
  c.frame.addIconRow(). The traceback I get is:

  exception executing script
  AttributeError: 'ToolbarTkIconBarClass' object has no attribute
  'iconFrameContainerFrame'

 Ok.  This should be enough hint for me.  Presumably an ivar got
 deleted or renamed.  I'll look into it.


More info:
On Ubuntu using qt, the traceback is as follows:

exception executing script
AttributeError: 'leoIconBarButton' object has no attribute 'configure'

  line 51:
* line 52: b.configure(command=hoistButtonCallback)
  line 53: b.bind('3',deleteButtonCallback)
  line 54: #...@-node:SCRIPT BuildHoistButtons

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-edi...@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



seeking help with broken script node after upgrade to 4.7

2010-08-19 Thread Phil
I recently upgraded to version 4.7.1 (from 4.5.x) on both a Windows
machine and an Ubuntu machine. I have been using the script node code
below to implement a poor-man's PIM, but now the script doesn't work.
I use tkinter on Windows, and qt on Ubuntu. Though I'm sure I could
fix the problems if I spend enough time tracing it out, I'm pressed
for time right now and would be grateful if someone could give me a
quick solution.

Thanks!

Here's the code:

@
Place clones of nodes (that should have hoist buttons created for them
automatically) below this node.
@c
from mod_scripting import scriptingController
sc = scriptingController(c)

def FindNextClone(c):
if not c: return c
if not c.isCloned(): return c
v = c.threadNext()
while v and v.t != c.t:
v = v.threadNext()
if not v:
# Wrap around.
v = c.rootVnode()
while v and v != c and v.t != c.t:
v = v.threadNext()
if v:
return v
else:
return c

c.frame.addIconRow()
first = True
for node in p.following_siblings_iter():
if first:
first = False
continue
#for node in p.children_iter():
#node = FindNextClone(node)
h = node.headString()
buttonText = sc.getButtonText(h)
statusLine = Hoist %s % h
b = sc.createIconButton(text=buttonText,
command=None,
shortcut=None,
statusLine=statusLine,
bg='yellow')
def deleteButtonCallback(event=None,sc=sc,b=b):
sc.deleteButton(b)

def hoistButtonCallback (event=None,c=c,p=node.copy()):
while (c.canDehoist()):
c.dehoist()
c.selectPosition(p)
c.hoist()

b.configure(command=hoistButtonCallback)
b.bind('3',deleteButtonCallback)

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-edi...@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



Re: seeking help with broken script node after upgrade to 4.7

2010-08-19 Thread Phil

 In the one-node world, v.t == v for all v.  Is that enough hint?

 Edward

Umm... no. However, I was rather sloppy in posting the code, as the
part you reference isn't even used - sorry about that!.

The following is a better listing:

=
from mod_scripting import scriptingController
sc = scriptingController(c)

c.frame.addIconRow()
first = True
for node in p.following_siblings_iter():
if first:
first = False
continue
h = node.headString()
buttonText = sc.getButtonText(h)
statusLine = Hoist %s % h
b = sc.createIconButton(text=buttonText,
command=None,
shortcut=None,
statusLine=statusLine,
bg='yellow')
def deleteButtonCallback(event=None,sc=sc,b=b):
sc.deleteButton(b)

def hoistButtonCallback (event=None,c=c,p=node.copy()):
while (c.canDehoist()):
c.dehoist()
c.selectPosition(p)
c.hoist()

b.configure(command=hoistButtonCallback)
b.bind('3',deleteButtonCallback)
=

On Windows, I have determined that the problem occurs at
c.frame.addIconRow(). The traceback I get is:

exception executing script
AttributeError: 'ToolbarTkIconBarClass' object has no attribute
'iconFrameContainerFrame'

  line 4324:
* line 4325: w =
Tk.Frame(self.iconFrameContainerFrame,height=height,bd=2,relief=groove)
  line 4326: w.pack(fill=x,pady=2)
  line 4327: self.iconFrame = w

Is there some other object I should be using instead of c.frame? I
simply don't understand the connection between the error and my
script.

Thanks,
Phil

-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-edi...@googlegroups.com.
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.



haxe

2009-11-14 Thread Phil

 James Hofmann,
FYI there is a Haxe jedit mode here http://haxe.org/com/ide/jedit
I ran that through the Leo script that converts jedit modes with
jEdit2Py script in scripts.leo
the resulting mode works for me.
I can write @language Haxe and get syntax highlighting.
this only problem I saw was that multiline strings don't get
highlighted properly

Phil

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~--~~~~--~~--~--~---



Re: haxe

2009-11-14 Thread Phil

Terry,
no changes made to Leo.I just put the xml in the modes directory
and ran jedit2py
after that it just worked for me. Does it work for you?

The only limitations I'm aware of are mutiline strings aren't
highligted right and all the multiline doc comments use the // instead
of /* */ in the @file external files.

It's been a little while since I setup my leo install on gentoo but I
don't think I have any non-default plugins enabled.
I just checked and I don't even have a myLeosettings file.

About filetypes.
Haxe only directly uses the .hx
hxtml files are a build or project kind of file but are not in the
haxe syntax.

The string templates use the .mtt extension but I think thats just a
loose convention,
and it's probably a special syntax embedded in HTML anyway.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~--~~~~--~~--~--~---



Re: haxe

2009-11-14 Thread Phil

Terry,
   I don't believe I've changed anything or even enabled any plugins.
I don't even have a myleoSettings file.
I just put the xml in the modes folder and ran the converter script

There are two limitations that I'm aware of.
The first is that haxe's multiline string literals don't highlight
right. I think I read here that this is a limitation of the colorizer.
The second is that multiline comments dont use the multiline
delimiter /* */ in derived files. but instead each line is line
commented with //.

Haxe uses only the .hx extension on files.
There are other related file, such as .mtt files that are templates
and .htxml files that are essentially command line parameters for the
compiler but they are both different syntax from the haxe language.

Phil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
To unsubscribe from this group, send email to 
leo-editor+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~--~~~~--~~--~--~---