Re: Wanted: students for the Leo Code Academy

2016-07-08 Thread Zoltan Benedek
Hi Edward,

Thanks for the excellent idea and for your effort.
I hope I'll find time to get deeper into the Leo sources.
A few times I tried and seemed fairly difficult, but perhaps my approach 
was not the best.

Zoltan

On Tuesday, July 5, 2016 at 5:47:12 PM UTC+3, Edward K. Ream wrote:
>
> It's time, imo, to begin planning for the day that I won't be around to 
> maintain Leo.  To that end, I would like to start training people to become 
> comfortable with fixing bugs in Leo and to add Leo plugins. Yes, we already 
> have people who have done both, but we could use more.
>
> I would like to start encouraging people to fix bugs themselves.  In many 
> cases, the task isn't all that difficult. Learning to navigate/explore 
> Leo's code is an excellent skill, not just for Leo, but for any project 
> that uses Leo to maintain code. People have different learning styles, but 
> I am convinced that learning by doing is the best way to master any complex 
> skill.  And fixing a bug that bugs you is pretty close to the best possible 
> motivation.
>
> I would rather spend a week teaching someone how to fix a bug in Leo than 
> to take an hour fixing the bug myself.  The former has long-term benefits, 
> the latter only fixes the bug.
>
> I will be happy to teach people who don't know Python, and even people who 
> don't know anything about programming at all.  There are resources of the 
> web to get anyone started, and learning in the Leo environment should be 
> easier in some ways than learning, say, using vim or emacs.  I suspect that 
> just about anyone who is interested in Leo has the temperament and ability 
> to program Leo with Python.
>
> Please let me know if you are interested in learning about Leo's code, how 
> to program in Python, or how to fix a specific bug. For bug fixes, the best 
> place to have the discussion is in the github bug page itself.  In fact, 
> the mypy people use the github bug system for *all* conversations, so 
> please feel free to open a new bug item 
>  in order to start 
> learning.  I've just created a new "Leo Academy" label for all such 
> conversations.
>
> All comments 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 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 close icon_bar as default?

2016-04-20 Thread Zoltan Benedek
Hi,

There is a mini-buffer command:

gui-iconbar-hide

but I don't know how to put it in the settings.

Zoltan

On Wednesday, April 20, 2016 at 1:15:35 AM UTC+3, Zoom.Quiet wrote:
>
> as attachment snapshot: 
> - i always use Leo as normal editor, not run any scripts from Leo 
> - so how to config, make the icon_bar not display as default? 
>
> i try setup in MyLeoSettings.leo : 
> @int icon_bar_widgets_per_row = 0 
>
> but not work. 
>
> thanks for all suggest 
>
> PS: 
> my leo env.: 
> Leo 5.2-final, build 20160319041841, Sat Mar 19 04:18:41 CDT 2016 
> Not running from a git repo 
> Python 2.7.11, PyQt version 4.8.7 
> darwin 
> reading: /Users/zoomq/.leo/myLeoSettings.leo 
> read outline in 0.68 seconds 
>
> -- 
> Life's Pathetic, Let's Pythonic! 人生苦短, Python是岸! 
> 俺: http://zoomquiet.io 
> 授: http://creativecommons.org/licenses/by-sa/2.5/cn/ 
> 怒: 冗余不做,日子甭过!备份不做,十恶不赦! 
> KM keep growing environment culture which promoting organization be 
> learnning! 
>

-- 
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: playing with vim mode

2016-04-20 Thread Zoltan Benedek
Hi Edward,

Thanks for the prompt fix and for the explanation.

Zoltan

On Monday, April 18, 2016 at 4:10:48 PM UTC+3, Edward K. Ream wrote:
>
> ​​
> ​​
> On Mon, Apr 18, 2016 at 7:19 AM, Edward K. Ream <edre...@gmail.com 
> > wrote:
>
>> On Sunday, April 17, 2016 at 3:22:26 PM UTC-5, Zoltan Benedek wrote:
>>
>  
>  >
> ​>​
> ​I cannot use ":" (colon)
>
> ​> ​I'll fix this immediately.
>
> Done at 24fddfc.
>
> Oh, the dreaded software rot.  Apparently, Leo's key handlers now expect 
> that all events have a "c" ivar. This must be something new. The fix was to 
> add the "c" ivar to all VimEvent objects.​
>
> Clearly, this reversion would have affected all of Leo's vim-mode users, 
> so I surmise that not too many people are using vim mode.  Thanks for 
> reporting the problem.  Let me know if you find any others.
>
> BTW, whenever something unexpected happens, it's always a good idea to run 
> Leo from a console 
> <http://leoeditor.com/running.html#running-leo-from-a-console-window>.  
> In this case, you would have seen something like:
>
> Traceback (most recent call last):
>   File "c:\leo.repo\leo-editor\leo\plugins\qt_events.py", line 126, in 
> eventFilter
> k.masterKeyHandler(event)
>   File "c:\leo.repo\leo-editor\leo\core\leoKeys.py", line 3303, in 
> masterKeyHandler
> done = k.doMode(event, state, stroke)
>   File "c:\leo.repo\leo-editor\leo\core\leoKeys.py", line 3388, in doMode
> val = k.callStateFunction(event) # Calls end-command.
>   File "c:\leo.repo\leo-editor\leo\core\leoKeys.py", line 3363, in 
> callStateFunction
> val = k.state.handler(event)
>   File "c:\leo.repo\leo-editor\leo\core\leoKeys.py", line 2538, in 
> fullCommand
> ok = k.callAltXFunction(k.mb_event)
>   File "c:\leo.repo\leo-editor\leo\core\leoKeys.py", line 2592, in 
> callAltXFunction
> func(event)
>   File "c:\leo.repo\leo-editor\leo\core\leoGlobals.py", line 1701, in 
> wrapper
> c = event.c
> AttributeError: 'VimEvent' object has no attribute 'c'
>
> ​​Usually, as here, the last line shows the actual cause of the problem.
>
> 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: playing with vim mode

2016-04-17 Thread Zoltan Benedek
Thanks a lot Edward,

May be the most problematic for me, I cannot use ":" (colon) to run neither 
Vim nor Leo commands. (Especially ":w" doesn't work, for now I use Ctrl+S)
The other is the effect of "w" (word) command, when used with "d". "dw" 
goes through any special characters and deletes everything until finds an 
alfa-numeric or "_".

My Leo:
Leo 5.3-devel, build 20160412153848, Tue Apr 12 15:38:48 CDT 2016
Git repo info: branch = master, commit = 46bde82ffc5a
Python 3.4.3, PyQt version 5.2.1
linux

In Vim "dw" doesn't go over special characters and even over end line 
characters. It deletes end line characters only when used by multiplying 
numbers ex: "3dw".

I hope I'll look at the code and can try something.

Best Regards
Zoltan


On Wednesday, April 13, 2016 at 6:40:43 PM UTC+3, Edward K. Ream wrote:
>
> ​​
>
>
> On Wed, Apr 13, 2016 at 8:28 AM, Zoltan Benedek <benz...@gmail.com 
> > wrote:
>
>> Hi,
>>
>> I use vim mode (@bool vim-mode = True). I guess the recommended/new way 
>> to use Vim commands is Vim mode, I don't use Vim bindings (which is the 
>> older approach).
>>
>
> ​Right.  The code is in leo.core.leoVim.py. Iirc, all/most keystrokes are 
> hard-coded, on the theory that keystrokes are hard-coded in vim as well.
>
> I was wondering recently whether anyone actually uses vim mode, after all 
> the effort I put into it.  Kinda like the way I'm wondering about whether 
> @auto support for Jupyter notebooks.  I think some will, but it's nice to 
> get feedback.​ 
>
> ​​
>> Now in Vim mode some commands doesn't work as expected and I'd like to 
>> change some shortcuts/functionality, but unfortunately is not clear, how 
>> should I do that.
>>
>> I was looking in leoSettings.leo and LeoPyRef.leo, but now I'm confused.
>>
>
> ​Iirc, there aren't many settings the pertain to the new vim code.
> ​
>  
> ​
> Let me know what improvements need to be made.  It should be relatively 
> straightforward, once I come up to speed again on the code, which is in:
>
> @file leoVim.py-->class VimCommands
>
> Specifically, for commands:
>
> class VimCommands-->vc.commands
>
> There is a lot of tricky parsing-like code all over the place, much like 
> vim's own command dispatcher, which I studied closely.
>
> Can someone help me? How should I start or what should I look for?
>>
>
> ​You have already started correctly by asking here rather than filing a 
> bug report ;-)  I'll be able to guide you through the code or make any 
> changes you want myself.
>
> 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.


playing with vim mode

2016-04-13 Thread Zoltan Benedek
Hi,

I use vim mode (@bool vim-mode = True). I guess the recommended/new way to 
use Vim commands is Vim mode, I don't use Vim bindings (which is the older 
approach).

Now in Vim mode some commands doesn't work as expected and I'd like to 
change some shortcuts/functionality, but unfortunately is not clear, how 
should I do that.

I was looking in leoSettings.leo and LeoPyRef.leo, but now I'm confused.

I have a disabled node: "@@shortcuts  Vim plain keys" in myLeoSettings.leo. 
Should I enable it and try that way?
A lot of options are commented there. I don't get how this works.

Can someone help me? How should I start or what should I look for?

Thanks.
Zoltan

-- 
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: importing @clean files deletes empty lines

2016-03-25 Thread Zoltan Benedek
Hi Edward,

Thanks for these explanations.

I agree, the script is not meant to preserve outline structure, only 
corrects blank lines after importing @clean files.

Unfortunately I don't really know how to change my workflow in order to 
avoid importing @clean files.
Currently I cannot use @file nodes, I have to use @clean nodes, so I have 
to import them.

As I stated before there is a minor issue with c.recursiveImport. It uses 
an other algorithm to import @clean files, importing from "File->Import 
File..." menu has no the same issue. I think a better option for 
c.recursiveImport would be to use the same algorithm as "File->Import 
File...".

Regards,
Zoltan


On Friday, March 18, 2016 at 3:21:40 AM UTC+2, Edward K. Ream wrote:
>
> On Thursday, March 3, 2016 at 4:12:49 AM UTC-6, Edward K. Ream wrote:
>>
>> On Thu, Mar 3, 2016 at 2:59 AM, Zoltan Benedek <benz...@gmail.com 
>> > wrote:
>>
>>>
>>>
>>> https://github.com/benzolius/leo-scripts/blob/master/correct_empty_lines.py
>>>
>>> Corrects blank lines according to PEP8 (at least between main blocks: 
>>> classes, functions and between methods), even if it had wrong blank lines 
>>> before importing into Leo.
>>>
>>
>> ​A great idea. I'll add a command to do this. It's on the list.
>>
>
> I still think this is a good idea, but everyone should understand that 
> *importing* an @clean file is a bad idea.
>
> For example, refresh-from-disk will create an outline from any @clean 
> file, but you lose all the headlines and outline structure of the original 
> file.
>
> Instead, you should copy and paste the @clean node from one outline to 
> another.  This preserves everything (except gnx's in the .leo file).  
> paste-retaining-clones would even preserve gnx's, iirc.
>
> I have been cutting and pasting @clean trees recently because there are 
> files in leo/external that mirror scripts whose main git repo is 
> elsewhere.  Yes, git could actually include a subsidiary repo in 
> leo/external, but I don't want to go there.
>
>
>
> *Summary*1. copy and paste is the *only* way to preserve headlines and 
> outline structure when "importing" @clean nodes.
>
> 2. *After* you have pasted an @clean tree, (or before, for that matter), 
> running the suggested script would be useful.  But this script is in no way 
> a substitute for preserving outline structure with copy/paste.
>
> Clear?
>
> 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: importing @clean files deletes empty lines

2016-03-04 Thread Zoltan Benedek
Thanks Edward,

Perhaps better optional, because there are corner cases, for example 
someone can have other instructions between classes, methods.

Zoltan

On Thursday, March 3, 2016 at 12:12:49 PM UTC+2, Edward K. Ream wrote:
>
> On Thu, Mar 3, 2016 at 2:59 AM, Zoltan Benedek <benz...@gmail.com 
> > wrote:
>
>>
>>
>> https://github.com/benzolius/leo-scripts/blob/master/correct_empty_lines.py
>>
>> Corrects blank lines according to PEP8 (at least between main blocks: 
>> classes, functions and between methods), even if it had wrong blank lines 
>> before importing into Leo.
>>
>
> ​A great idea. I'll add a command to do this. It's on the list.
>
> It would even be possible to do this automatically for any @clean python 
> file, although that might best optional.​
>  
>
> ​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: importing @clean files deletes empty lines

2016-03-03 Thread Zoltan Benedek
Hi Edward,

Thanks, I'll try c.refreshFromDisk() outside the loop, but now I have a 
better workaround:

https://github.com/benzolius/leo-scripts/blob/master/correct_empty_lines.py

Corrects blank lines according to PEP8 (at least between main blocks: 
classes, functions and between methods), even if it had wrong blank lines 
before importing into Leo.

Regards
Zoltan


On Thursday, March 3, 2016 at 1:30:43 AM UTC+2, Edward K. Ream wrote:
>
>
>
> On Mon, Dec 7, 2015 at 1:21 PM, Zoltan Benedek <benz...@gmail.com 
> > wrote:
>
>> I see there are two 'Refresh from disk' possibilities, one from the File 
>> menu and one by right click menu.
>>
>> I'm interested in the right click 'Refresh from disk'.
>>
>> How could I call it by a script?
>>
>
> ​Eventually it just calls c.refreshFromDisk(). This gives a warning if not 
> c.p.isAnyAtFileNode()
>
> 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: New directions suggested by make-stub-files project

2016-02-14 Thread Zoltan Benedek
Hi Edward,

Thanks for the suggestion.

Zoltan

On Saturday, February 13, 2016 at 5:47:47 PM UTC+2, Edward K. Ream wrote:
>
>
>
> On Sat, Feb 13, 2016 at 4:42 AM, Zoltan Benedek <benz...@gmail.com 
> > wrote:
>
> ​> ​
> ​I have a Leo script which corrects blank lines between main blocks and 
> between methods:
>
> ​Heh.  I didn't know about Python's string.partition method.  Learn 
> something new every day...
>
> EKR
>

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

2016-02-13 Thread Zoltan Benedek
Hi Edward,

Concerning blank lines, I have a Leo script which corrects blank lines 
between main blocks and between methods:

https://github.com/benzolius/leo-scripts/blob/master/correct_empty_lines.py

Sorry, is full of hard coded stuff, but the second part of the script 
corrects over 90% of blank line problems.

Regards
Zoltan


On Thursday, February 11, 2016 at 6:40:32 PM UTC+2, Edward K. Ream wrote:
>
> I'm decompressing from the intense programming I've done recently. The 
> decompression phase is often the time when new ideas arrive.  Here are some 
> recent ones:
>
> 1. I love clones, I hate clones.
>
> I used clones intensely in the make-stub-files project.
>
> - For unit testing, I moved clones of all code needed by the @test node to 
> be children of the @test node.  *Considered in isolation*, this looks 
> like the ultimate unit-testing pattern. There is never any need to execute 
> the unit test externally because all code is up-to-date.
>
> - I've just created a set of "views" on the code that would help 
> *experienced* Leo users understand the code.
>
> Alas, this *expert* usage of clones comes with a price. Views will 
> bewilder people who don't use Leo. Second, clones gum up searches, even 
> (especially) for experts. Every unit test created its own set of clones!
>
> The clone-find-all commands are kinda a workaround, because I can search 
> just from the created node to the end of the file.  But these commands 
> create *more* clones, so if I search from anywhere else the situation 
> just gets worse.  Boo hoo.
>
> This morning a new thought arose.  Is it possible to use an improved Nav 
> pane to avoid the problems with clones.  In particular:
>
> A. I want a way to mark (with an attribute) nodes to be incorporated into 
> unit tests, as if they were cloned as children of @test nodes.  It should 
> be possible!
>
> B. I want a way to mark (with an attribute) nodes that are part of a 
> view.  Richard et. al. may already have done this!  My requirements are 
> probably more stringent than most people's.  I'm excited to think of the 
> possibilities.
>
> 2. Minor problems with @clean.
>
> @clean was a *huge *success for this project.  GvR might not have looked 
> at make_stub_files.py if it had been produced by an @file node.  
>
> A minor annoyance: it was easy to forget to put a single blank line in 
> front of def's, and two blank lines in front of classes. The diffs looked 
> bad when I forgot, so I wrote the following Leo script to check for blank 
> lines.
>
> @button check-leading-lines
> for p1 in c.all_unique_positions():
> if p1.h.startswith('@clean'):
> for p in p1.subtree():
> if (not p.h.strip().startswith('<<') and
> p.b.strip() and not p.b.startswith('\n')
> ):
> print(repr(p.b[:3]), p.h)
> print('done')
>
> Hehe.  This morning I realized that it might be possible for the @clean 
> read/write code to insert the blank lines automatically.  It's worth doing.
>
> 3. Markdown problems.
>
> @language rest is needed to render the docs properly within Leo, but Leo 
> converts @language rest to @language md when reading files whose extension 
> is .md.  Annoying.  This should be fixed somehow.
>
> 4. Diffs.
>
> I committed many times every day, and each time I was annoyed at what git 
> diff showed for .leo files.  A few months ago I experimented with having 
> *Leo* be the diff agent, but a) that didn't work well even for me and b) 
> it's out of the question for people who don't use Leo.
>
> It would be good to create a git plugin/addon that would more clearly show 
> diffs to .leo files.  The requirements are actually very simple:
>
> - Ignore all html elements except  elements.
> - Strip  and <\t>and show only diffs to the body pane.
> - Show the headline in the diff.
>
> The result could be awesome!
>
> 5. Improving Leo's make-stub-files command.
>
> It's really bad to have two separate code bases.  Instead of folding the 
> make-stub-files code into Leo by hand, make_stub_files.py should become 
> part of the leo/external folder.
>
> Also, Leo should have an update-stub-files command which would be like 
> using the --update option.  
>
> That's all for now. I'm excited to start working on all these projects, as 
> well as the task-oriented docs that promise so much to newbies.
>
> 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.


strange diff on LeoPyRef.leo

2016-02-10 Thread Zoltan Benedek
Hi,

Can someone explain to me, how could happen this?
I only opened LeoPyRef.leo in Leo and saved it (Ctrl + S). No changes at 
all, but got a surprising diff:

diff --git a/leo/core/LeoPyRef.leo b/leo/core/LeoPyRef.leo
index 8601387..258bb9c 100644
--- a/leo/core/LeoPyRef.leo
+++ b/leo/core/LeoPyRef.leo
@@ -1621,8 +1621,8 @@ unl: class Ui_LeoQuickSearchWidget--retranslateUi
 
 # -*- mode: python -*-
 '''
-launchLeo.spec: the spec file for pyinstaller.
-Run with pyinstaller launchLeo.spec, **not** with launchLeo.py.
+launchLeo-single.spec: a spec file for pyinstaller that creates a 
single-executable version of Leo.
+Run with pyinstaller launchLeo-single.spec, **not** with launchLeo.py.
 '''
 import glob, os
 
@@ -1641,7 +1641,7 @@ else:
 # Same code as in runLeo.py.
 path = os.getcwd()
 if path not in sys.path:
-print('launchLeo.spec: appending %s to sys.path' % path)
+print('launchLeo-single.spec: appending %s to sys.path' % path)
 sys.path.append(path)
 
 import leo.core.leoGlobals as g
@@ -1717,13 +1717,16 @@ datas = [
 if True:
 datas.extend([
 # leo-editor: loaded by LeoPy.leo...
-('launchLeo.spec', ''),
+   ('launchLeo-folder.spec', ''),
+('launchLeo-single.spec', ''),
 ('pylint-leo.py', ''),
 ('setup.py', ''),
 # leo.commands...
 ext('.py', 'leo/commands'),
 # leo.core...
-ext('.leo', 'leo/core'),
+   # Only include reference files.
+# ext('.leo', 'leo/core'),
+   ('leo/core/LeoPyRef.leo', 'leo/core'),
 ext('.py', 'leo/core'),
 ext('.txt', 'leo/core'),
 # leo.dist...
@@ -1762,7 +1765,10 @@ if True:
 ext('.json', 'leo/external/ckeditor'),
 ext('.md', 'leo/external/ckeditor'),
 # leo/plugins...
-ext('.leo', 'leo/plugins'),
+# Only include reference files.
+# ext('.leo', 'leo/plugins'),
+   ('leo/plugins/leoPluginsRef.leo', 'leo/plugins'),
+   ('leo/plugins/leoGuiPluginsRef.leo', 'leo/plugins'),
 ext('.txt', 'leo/plugins'),
 ext('.py', 'leo/plugins/examples'),
 ext('.py', 'leo/plugins/test'),
@@ -1819,6 +1825,10 @@ if generate_folder:
 name='Leo')
 
 # -*- mode: python -*-
+'''
+launchLeo-folder.spec: a spec file for pyinstaller that creates a 
folder-based install of Leo.
+Run with pyinstaller launchLeo-folder.spec, **not** with launchLeo.py.
+'''
 
 block_cipher = None
 
@@ -1894,16 +1904,16 @@ datas = [
 # Additional Leo data fles...
 # leo-editor: loaded by LeoPy.leo...
 ('launchLeo-folder.spec', ''),
-   ('launchLeo-single.spec', ''),
-   ('leo_to_html.xsl', ''),
-   ('pylint-leo.py', ''),
+('launchLeo-single.spec', ''),
+('leo_to_html.xsl', ''),
+('pylint-leo.py', ''),
 ('setup.py', ''),
 # leo.commands...
 ext('.py', 'leo/commands'),
 # leo.core...
-   # Only include reference files.
+# Only include reference files.
 # ext('.leo', 'leo/core'),
-   ('leo/core/LeoPyRef.leo', 'leo/core'),
+('leo/core/LeoPyRef.leo', 'leo/core'),
 ext('.py', 'leo/core'),
 ext('.txt', 'leo/core'),
 # leo.dist...
@@ -1942,10 +1952,10 @@ datas = [
 ext('.json', 'leo/external/ckeditor'),
 ext('.md', 'leo/external/ckeditor'),
 # leo/plugins...
-   # Only include reference files.
+# Only include reference files.
 # ext('.leo', 'leo/plugins'),
-   ('leo/plugins/leoPluginsRef.leo', 'leo/plugins'),
-   ('leo/plugins/leoGuiPluginsRef.leo', 'leo/plugins'),
+('leo/plugins/leoPluginsRef.leo', 'leo/plugins'),
+('leo/plugins/leoGuiPluginsRef.leo', 'leo/plugins'),
 ext('.txt', 'leo/plugins'),
 ext('.py', 'leo/plugins/examples'),
 ext('.py', 'leo/plugins/test'),



latest git commit: 7ae9c054db7

Thanks,
Zoltan

-- 
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: strange diff on LeoPyRef.leo

2016-02-10 Thread Zoltan Benedek
Thanks a lot, Terry

On Thursday, February 11, 2016 at 12:53:54 AM UTC+2, Terry Brown wrote:
>
>
>
> --
> *From:* Zoltan Benedek <benz...@gmail.com >
> *To:* leo-editor <leo-e...@googlegroups.com > 
> *Sent:* Wednesday, February 10, 2016 3:01 PM
> *Subject:* strange diff on LeoPyRef.leo
>
> Hi,
>
> Can someone explain to me, how could happen this?
> I only opened LeoPyRef.leo in Leo and saved it (Ctrl + S). No changes at 
> all, but got a surprising diff:
>
> Not sure I can explain it exactly, but maybe something to do with clones 
> and / or references to other files, I've seen that sort of thing happen 
> occasionally, perhaps there's still a file or two (.txt files) referenced 
> from more than one .leo file, or clones of bits of such files within a .leo 
> file, and it seems to take another load / save cycle for the changes to 
> propagate.  Not a good explanation, just a general idea.
>
> The way to avoid it, and the easiest way to interact with LeoPyRef.leo, is 
> to copy it to LeoPy.leo and open and use that instead, then it isn't an 
> issue with git. You only need to actually load / edit / save LeoPyRef.leo 
> when you're adding a new file to the codebase that needs to be referenced 
> from LeoPyRef.leo, which does not happen very often.
>
> Cheers -Terry
>
>
> diff --git a/leo/core/LeoPyRef.leo b/leo/core/LeoPyRef.leo
> index 8601387..258bb9c 100644
> --- a/leo/core/LeoPyRef.leo
> +++ b/leo/core/LeoPyRef.leo
> @@ -1621,8 +1621,8 @@ unl: class Ui_LeoQuickSearchWidget--retranslateUi
>  
>  # -*- mode: python -*-
>  '''
> -launchLeo.spec: the spec file for pyinstaller.
> -Run with pyinstaller launchLeo.spec, **not** with launchLeo.py.
> +launchLeo-single.spec: a spec file for pyinstaller that creates a 
> single-executable version of Leo.
> +Run with pyinstaller launchLeo-single.spec, **not** with launchLeo.py.
>  '''
>  import glob, os
>  
> @@ -1641,7 +1641,7 @@ else:
>  # Same code as in runLeo.py.
>  path = os.getcwd()
>  if path not in sys.path:
> -print('launchLeo.spec: appending %s to sys.path' % path)
> +print('launchLeo-single.spec: appending %s to sys.path' % path)
>  sys.path.append(path)
>  
>  import leo.core.leoGlobals as g
> @@ -1717,13 +1717,16 @@ datas = [
>  if True:
>  datas.extend([
>  # leo-editor: loaded by LeoPy.leo...
> -('launchLeo.spec', ''),
> +   ('launchLeo-folder.spec', ''),
> +('launchLeo-single.spec', ''),
>  ('pylint-leo.py', ''),
>  ('setup.py', ''),
>  # leo.commands...
>  ext('.py', 'leo/commands'),
>  # leo.core...
> -ext('.leo', 'leo/core'),
> +   # Only include reference files.
> +# ext('.leo', 'leo/core'),
> +   ('leo/core/LeoPyRef.leo', 'leo/core'),
>  ext('.py', 'leo/core'),
>  ext('.txt', 'leo/core'),
>  # leo.dist...
> @@ -1762,7 +1765,10 @@ if True:
>  ext('.json', 'leo/external/ckeditor'),
>  ext('.md', 'leo/external/ckeditor'),
>  # leo/plugins...
> -ext('.leo', 'leo/plugins'),
> +# Only include reference files.
> +# ext('.leo', 'leo/plugins'),
> +   ('leo/plugins/leoPluginsRef.leo', 'leo/plugins'),
> +   ('leo/plugins/leoGuiPluginsRef.leo', 'leo/plugins'),
>  ext('.txt', 'leo/plugins'),
>  ext('.py', 'leo/plugins/examples'),
>  ext('.py', 'leo/plugins/test'),
> @@ -1819,6 +1825,10 @@ if generate_folder:
>  name='Leo')
>  
>  # -*- mode: python -*-
> +'''
> +launchLeo-folder.spec: a spec file for pyinstaller that creates a 
> folder-based install of Leo.
> +Run with pyinstaller launchLeo-folder.spec, **not** with launchLeo.py.
> +'''
>  
>  block_cipher = None
>  
> @@ -1894,16 +1904,16 @@ datas = [
>  # Additional Leo data fles...
>  # leo-editor: loaded by LeoPy.leo...
>  ('launchLeo-folder.spec', ''),
> -   ('launchLeo-single.spec', ''),
> -   ('leo_to_html.xsl', ''),
> -   ('pylint-leo.py', ''),
> +('launchLeo-single.spec', ''),
> +('leo_to_html.xsl', ''),
> +('pylint-leo.py', ''),
>  ('setup.py', ''),
>  # leo.commands...
>  ext('.py', 'leo/commands'),
>  # leo.core...
> -   # Only include reference files.
> +# Only include reference files.
>  # ext('.leo', 'leo/core'),
> -   ('leo/core/LeoPyRef.leo', 'leo/core'),
> +('leo/core/LeoPyRef.leo', 'leo/core'),
>  ext

Re: How to write the unwriteable file?

2016-02-01 Thread Zoltan Benedek
Hi Terry,

A stupid, quick and dirty workaround:

Change '<<' and '>>' before Leo editing to something else, let's say 
'<{<{<' and '>}>}>' (be sure that doesn't appears in the text) and change 
back after Leo editing.

Using sed, may be something like:

find /your/path -type f -print0 | xargs -0 sed -i 's/<
> Hmm, unfortunately I want to write files which contain content like this:
>
> this part is LaTeX etc. etc.
>
> <>=
> this part is R code
> @
>
> more LaTeX here
>
> https://github.com/yihui/knitr/blob/master/inst/examples/knitr-minimal.Rnw
> is an example, and http://yihui.name/knitr/demo/minimal/, comments at end 
> of main post, explains the situation well.  I think the question "can we 
> have user defined section delimiters instead of << >> has come up before 
> and met with a probably quite reasonable No!
>
> I know @asis and @nosent can do it, but I want hierarchy.  I can just use 
> other delimiters and post-process.
>
> Cheers -Terry
>
>

-- 
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: importing @clean files deletes empty lines

2015-12-07 Thread Zoltan Benedek
I had the impression that importing a single file by the menu File -> 
Import File works in the same way.

But now I tested and seems to work correctly.

Indeed the problem is with c.recursiveImport.

Thanks for your effort.

Zoltan

On Saturday, December 5, 2015 at 1:43:10 AM UTC+2, Edward K. Ream wrote:
>
>
> On Fri, Dec 4, 2015 at 1:04 PM, Zoltan Benedek <benz...@gmail.com 
> > wrote:
>
> ​> ​
> I use just the same script you copied. Should I change it a bit?
>
> ​Changing the code for ​
> c.recursiveImport itself is the only thing that could work.  I'll look 
> into the deleted lines issue.
>
> EKR
>

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

2015-12-07 Thread Zoltan Benedek
I have a workaround.
I should call 'Refresh from disk' for every position wich starts with 
'@clean'.

Only I don't know how. Something like:

for p in c.all_positions():
if p.h.startswith('@clean'):
c.refreshFromDisk()


Can someone help me?

Thanks
Zoltan


On Saturday, December 5, 2015 at 1:43:10 AM UTC+2, Edward K. Ream wrote:
>
>
> On Fri, Dec 4, 2015 at 1:04 PM, Zoltan Benedek <benz...@gmail.com 
> > wrote:
>
> ​> ​
> I use just the same script you copied. Should I change it a bit?
>
> ​Changing the code for ​
> c.recursiveImport itself is the only thing that could work.  I'll look 
> into the deleted lines issue.
>
> EKR
>

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

2015-12-07 Thread Zoltan Benedek
I see there are two 'Refresh from disk' possibilities, one from the File 
menu and one by right click menu.

I'm interested in the right click 'Refresh from disk'.

How could I call it by a script?

On Monday, December 7, 2015 at 7:28:07 PM UTC+2, Zoltan Benedek wrote:
>
> I have a workaround.
> I should call 'Refresh from disk' for every position wich starts with 
> '@clean'.
>
> Only I don't know how. Something like:
>
> for p in c.all_positions():
> if p.h.startswith('@clean'):
> c.refreshFromDisk()
>
>
> Can someone help me?
>
> Thanks
> Zoltan
>
>
> On Saturday, December 5, 2015 at 1:43:10 AM UTC+2, Edward K. Ream wrote:
>>
>>
>> On Fri, Dec 4, 2015 at 1:04 PM, Zoltan Benedek <benz...@gmail.com> wrote:
>>
>> ​> ​
>> I use just the same script you copied. Should I change it a bit?
>>
>> ​Changing the code for ​
>> c.recursiveImport itself is the only thing that could work.  I'll look 
>> into the deleted lines issue.
>>
>> EKR
>>
>

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


importing @clean files deletes empty lines

2015-12-04 Thread Zoltan Benedek
Hi,

I appreciate very much the great advancement of Leo with @clean, vim mode 
and other improvements.
I'm quite a happy Leo user currently, because I can use vim mode if I use 
Python 3.
Many thanks for the documentation, I see the new things are documented very 
well.

Now I can import a whole folder by the given script:

http://leoeditor.com/tutorial-scripting.html#id15

Unfortunately I have a big problem with the import, because after a save 
(write-at-file-nodes or save-file) it deletes empty lines between code 
parts (classes, methods, functions, instructions)
The code remains valid and functional, but I have to rearrange empty lines 
every time after an import into Leo.

If someone knows a solution for this problem, I'll be very grateful.
Thanks
Zoltan

-- 
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: importing @clean files deletes empty lines

2015-12-04 Thread Zoltan Benedek
Hi Edward,

Thanks for the prompt reply.

I use just the same script you copied. Should I change it a bit?

Zoltan

On Friday, December 4, 2015 at 6:24:43 PM UTC+2, Edward K. Ream wrote:
>
> On Fri, Dec 4, 2015 at 8:08 AM, Zoltan Benedek <benz...@gmail.com 
> > wrote:
>
>>
>> Now I can import a whole folder by the given script:
>>
>> http://leoeditor.com/tutorial-scripting.html#id15
>>
>
> ​This link is to the scripting tutorial, so I don't know what script you 
> are talking about.  The typical way is to use c.recursiveImport.  Like this:
>
> '''Recursively import all python files in a directory
> and clean the result.
> '''
> c.recursiveImport(
> dir_ = r'',
> kind = '@clean', 
> one_file = False,
> safe_at_file = False, # or True
> theTypes = None, # Same as ['.py']
> )
>
> Does this work for you?
>
> 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Leo in virtualenv

2015-02-19 Thread Zoltan Benedek
Hi,

Sorry for the late reaction, some time ago there were a discussion about 
Leo in virtualenv.

Now I could test it in Python3, PyQt5 on Kubuntu:

Here are the steps (I worked in a folder with write permission '/leo'):

1. Install PyQt5 in the system:

sudo aptitude install python3-pyqt5

2. Create the virtual environment with the '--system-site-packages' switch 
and without pip (I've found this the only way, which worked):

pyvenv-3.4 --system-site-packages --without-pip py3-pyqt5

3. Install setuptools and pip into the created environment:

wget --no-check-certificate 
https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O 
ez_setup.py

py3-pyqt5/bin/python ez_setup.py --insecure

wget --no-check-certificate 
https://pypi.python.org/packages/source/p/pip/pip-6.0.8.tar.gz#md5=2332e6f97e75ded3bddde0ced01dbda3

tar xzvf pip-6.0.8.tar.gz

cd pip-6.0.8

../py3-pyqt5/bin/python setup.py install

cd ..

Now you can install what you want in the created environment, without 
affecting the system.

py3-pyqt5/bin/pip install Sphinx

4. From the leo-editor source folder launch Leo with the new interpreter:

In my case:

/leo/py3-pyqt5/bin/python launchLeo.py

Regards
Zoltan

-- 
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: ENB: Fixing gnx collisions without a post scan

2014-10-15 Thread Zoltan Benedek
Hi,

I don't understand much of the topic, but I know a way to reduce the length 
of an uuid, if it helps.

The result of transformation is a string id of 22 character length, 
containing only the characters:

0123456789abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXY

The result is a unique id as long as the source uuid is unique.

In this way we get an id of 22 character length instead of the 32 character 
length of the original uuid and we are near to the current 18-19 character 
length timestamp.n

The transformation is pretty simple, I transform the integer part of the 
uuid into sexagesimal (base 60) integer, where the digits are the mentioned 
characters, according to:

http://sexagesimal.objectis.net

Zoltan

-- 
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: ENB: Fixing gnx collisions without a post scan

2014-10-15 Thread Zoltan Benedek
:-) It was only an idea.

Many thanks for the English correction.

-- 
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: A Leo pep8 tool?

2014-10-08 Thread Zoltan Benedek
Hi,

Unfortunately the tool doesn't work correctly.
I've tested beautify-tree and there are a lot of issues:

- puts whitespace between function name and opening '('
- puts whitespace between dictionary name and '['
- removes whitespace between function arguments after ','
- removes whitespace around operator inside parentheses
- puts whitespace between print and opening '('   -  when print(obj) is 
correct and PEP8 style in Python 3 and runs in Python 2.7

-- 
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: Delayed loading of large nodes

2014-09-20 Thread Zoltan Benedek
Now the github 58 related issues are solved.
Thanks for the prompt fix.

On Friday, September 19, 2014 10:45:09 PM UTC+3, Edward K. Ream wrote:

 On Friday, September 19, 2014 10:05:47 AM UTC-5, Edward K. Ream wrote:

  Oops.  It appears to be impossible to cut or delete text from large 
 nodes.

 Fixed at rev 80e5693, Leo build: 20140919143910

 The fix was simple, setting w.leo_big_text = None in two places, so 
 perhaps the code is solid now.

 Please let me know if it isn't...

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Delayed loading of large nodes

2014-09-19 Thread Zoltan Benedek
Hi,

Unfortunately I have an issue with delayed loading:

https://github.com/leo-editor/leo-editor/issues/58

and I could not disable it by:

@int max-pre-loaded-body-chars = 0

On Friday, September 19, 2014 6:05:47 PM UTC+3, Edward K. Ream wrote:

 On Wednesday, September 17, 2014 3:03:27 PM UTC-5, Fidel N wrote:

 it works great here, thanks for this Edward


 Oops.  It appears to be impossible to cut or delete text from large nodes.

 It's on my urgent list, but in the meantime I recommend setting::

 @int max-pre-loaded-body-chars = 0

 to disable the big buttons feature.

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Caution: leoSettings.leo fully parameterized settings

2014-09-17 Thread Zoltan Benedek
Thanks for the wonderful work.
Now I have only one custom color in myLeoSettings.leo in which I'm 
interested. It is much easier to find/change 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: Find / replace issue

2014-09-16 Thread Zoltan Benedek
This behavior seems normal for me. I don't know the code, but seems, that 
every outline has it's own find tab and objects within.
The default text in the Find field is find pattern here, so when you 
hit the Find next evidently the result is:

not found 'find pattern here'

May be it could be fixed, by caching the search text in the Leo application 
object and the default search text of the outline could get this cache 
value if there is one.

Only an idea, unfortunately I don't know the details.

On Monday, September 15, 2014 9:27:24 PM UTC+3, Fidel N wrote:

 This was very difficult for me to understand, but I think this is it at 
 last.

 In order to reproduce this issue, please do the following:

 In the Find tab, check the suboutline only

 Select an outline, and search for any text on its subtree, for instance 
 a. This outline shouldnt have a within its text.

 Now select another outline (that should have a within its text), then 
 click Find next or just do F3

 It should make the search again, this time within the subtree of the 
 selected node, but instead, it will give you not found 'a'

 It will only work if you change the search. So if you want to search for 
 the same term within another outline, you have to change that twice.

 I think this bug also interferes with searches not limited to the 
 sub-outline, but still wouldn't be able to pinpoint it.

 Did anyone else have problems with this or is it just me??


-- 
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: Proposed changes to settings (was Help! Messing with UI settings)

2014-09-11 Thread Zoltan Benedek
Hi,

I like the idea.

I wanted to change only selection-background-color and I had to copy the 
entire @data qt-gui-plugin-style-sheet.
Without Fidel's help I could not figure it out.

I would simplify the configuration system, too. There are 9 or more 
possibilities to place a config file.
I see that there is a best practice recommendation, but for a beginner this 
is very difficult to enter.

Regards
Zoltan

-- 
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: Caution: recent major changes

2014-09-10 Thread Zoltan Benedek
Thanks for explanation. I'll pay attention to that.

On Wednesday, September 10, 2014 2:39:27 AM UTC+3, Edward K. Ream wrote:

 On Wed, Sep 3, 2014 at 5:06 AM, Zoltan Benedek benz...@gmail.com 
 javascript: wrote: 

  In one occasion Leo didn't save one file of three (in a @path ... @file 
  node). I've found by git that the file was not saved after I used Ctrl + 
 S 
  several times. Leo showed the file modified but in reality was not 
 modified. 

 Leo will refuse to write a file if there are orphaned or ignored nodes 
 in the file.  No data will be lost: the .leo file contains all the 
 data that would otherwise have been written to the file. 

 Unless I am paying close attention, it can be easy for me to miss 
 messages to that effect. 

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Caution: recent major changes

2014-09-03 Thread Zoltan Benedek
Hi,

Unfortunately I've found a problem, I cannot reproduce second time:

In one occasion Leo didn't save one file of three (in a @path ... @file 
node). I've found by git that the file was not saved after I used Ctrl + S 
several times. Leo showed the file modified but in reality was not modified.

After reopening the file everything worked correctly. I cannot reproduce it 
anymore.

My system: Kubuntu 14.04, Python 2.7.6, PyQt version 4.8.6
Leo commit = 65b70aa65627

Regards

On Tuesday, September 2, 2014 4:49:52 PM UTC+3, Edward K. Ream wrote:

 On Tuesday, September 2, 2014 8:31:01 AM UTC-5, Edward K. Ream wrote:

 The immediate reason for this change was to make it easier to support 
 Scintilla widgets in Leo.  At present, it displays text properly, using 
 Scintilla's syntax coloring.  But key bindings don't work and changes to 
 body text don't stick.  To see for yourself, set @bool qt-use-scintilla = 
 True and restart Leo.


 A recent rev keeps Leo alive if Leo can't import Qsci.  On Linux, you need 
 the python-qscintilla2 package, and perhaps others.

 EKR


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

2014-09-03 Thread Zoltan Benedek
This is fantastic!

Thanks for the good work.
Zoltan

-- 
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: Proposed (fairly minor) code reorg

2014-08-28 Thread Zoltan Benedek
Hi Edward,

Very good idea.
I think smaller files are always better, even in Leo.
each file pertains to a single topic - even better.

I would use 'leo_colorizer.py' instead of leoColorizer.py (pep8: Modules 
should have short, all-lowercase names)

Zoltan

-- 
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: A big collapse: simpler and more flexible idle-time handling

2014-08-25 Thread Zoltan Benedek
Wonderful.

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.


Re: Vim mode almost complete. Please test

2014-08-22 Thread Zoltan Benedek
Hi Edward,

I appreciate very much the great advancement in vim mode.
Unfortunately I cannot use it yet, but is not urgent for me at all.

I reported an issue now:

https://github.com/leo-editor/leo-editor/issues/46

Thanks for all your efforts.
Zoltan

On Friday, August 22, 2014 2:01:54 PM UTC+3, Edward K. Ream wrote:

 Starting a new thread, just to reduce the loading time.

 Rev 6f6f71c...appears to fix all known problems with the vim dot command.

 **Warning**: Yesterday the dot could hang Leo:  For now, use the dot 
 command only if you are willing the kill the Leo process! 

 Here is the checkin log:

 QQQ
 Fixed (maybe) two bugs related to the vim dot:
 1. Added lockout to vc.vim_dot in an attempt to prevent a hanger. This is 
 *not* guaranteed to work!

 For now, use the dot command only if you are willing the kill the Leo 
 outline!

 2. vc.vim_dot now saves/restores the dot, so that, for example, the 4. 
 command does not change the dot.

 Leo build: 20140822054225
 QQQ

 The only major item on the to-do list: substitutions such as :% 
 s/find/change/g.

 It is already possible to type this, followed by Return.  That's 
 actually the hard part :-)

 Now, vim mode must do something with the command.  Probably today.

 Edward

 P.S. Yes, there are *many* vim commands not handled by Leo's vim mode.  
 I'll add commands as people request them.  Note, however, that:

 - almost all commands that Kent (and others) have requested are now 
 available and

 - the present code provides an easy-to-extend framework for writing all 
 other commands.

 EKR


-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To 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: A beautiful and general design pattern eliminates tab-completion special cases

2014-08-20 Thread Zoltan Benedek
Excellent.

On Wednesday, August 20, 2014 2:38:50 PM UTC+3, Edward K. Ream wrote:

 In an earlier post I said:

 QQQ
 Strictly speaking, tab cycling doesn't have to be disabled for all colon 
 commands.  One could imaging a list of commands that use tab to complete 
 file names. Otoh, maintaining that list would be clumsy, and it would add 
 still more special cases to ga.do_tab.
 QQQ

 This post describes a much better way, done at rev 3994eca...Leo build:  
 20140820060754.

 The new code is gorgeous, if I do say so myself. Even better, the solution 
 is a design pattern with many applications.

 The trick is to replace functions implementing commands by classes having 
 __call__ methods.  See the P.P.S for details.

 Yes, this has all been done before.  Several of Leo's commands are 
 implemented this way.  But read on...

 What's new is that classes can advertise their ability to do various 
 things.  Here, the classes implementing vim commands advertise, by having a 
 tab_callback method, that they want to handle a tab that follows their 
 name.  ga.do_tab then defers to the vim command.

 There are several really cool things about this code.

 1.  ga.do_tab, and its helper, ga.do_tab_callback, no longer know 
 *anything* about colon commands, or what any command intends to do with the 
 tab(!!).  If the command handler has a tab_callback attribute, 
 ga.do_tab_callback just does::

  ga.reset_tab_cycling()
  k.functionTail = tail # For k.getFileName.
  handler.tab_callback()

 Nothing could be simpler, or more general.

 2. The code in the command classes is simplified as well.  No need for a 
 kludgy test event.get_arg_value.  See the P.S. for the full implementation 
 of the :tabnew command.

 The overall result is a spectacular collapse in complexity, which the 
 attendant increase in power and generality.

 Edward

 P.S.  Here is the flattened form of the class that handles the :tabnew 
 command (does not require vim-mode).  In particular, note that the __call__ 
 and tab_callback methods are trivial.  This is the way it is written in The 
 Book.

 class LoadFileAtCursor:
 '''
 A class to handle Vim's :tabnew command.
 This class supports the do_tab callback.
 '''
 def __init__(self,vc):
 '''Ctor for VimCommands.LoadFileAtCursor class.'''
 self.vc = vc

 __name__ = ':r'
 # Required.

 def __call__(self,event=None):
 '''Prompt for a file name, the open a new Leo tab.'''
 self.vc.c.k.getFileName(event,callback=self.open_file_by_name)
 
 def tab_callback(self):
 '''Called when the user types :tabnewtab'''
 self.vc.c.k.getFileName(event=None,callback=self.open_file_by_name)
 
 def open_file_by_name(self,fn):
 c = self.vc.c
 if fn and not g.os_path_isdir(fn):
 c2 = g.openWithFileName(fn,old_c=c)
 try:
 g.app.gui.runAtIdle(c2.treeWantsFocusNow)
 except Exception:
 pass
 else:
 c.new()

 P.P.S. This pattern is particularly well suited to Leo, because the 
 various getPublicCommands methods reference those functions when create 
 command dictionaries.  Here, we replace just two entries in the dict::

 ':r':   vc.LoadFileAtCursor(vc),
 ':tabnew': vc.Tabnew(vc),

 This creates instances of the LoadFileAtCursor and Tabnew classes. In 
 other words, we replace a function by an instance of a class.  All such 
 classes must have __call__ methods, so that Leo can call the instance as 
 if it were a function.

 EKR


-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To 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: Cmments please: proposal to eliminate tab cycling in completions pane

2014-08-18 Thread Zoltan Benedek
Hi,

I don't use the functionality and I appreciate any attempt of removing 
complex code.

Simple is better than complex.
Complex is better than complicated.

Thanks

On Monday, August 18, 2014 1:54:01 PM UTC+3, Edward K. Ream wrote:

 At present, when entering command names (but *not* file names) in the 
 minibuffer, hitting tab repeatedly cycles through the list of names shown.

 I would like to eliminate this Easter Egg: it's clearly not needed and 
 it greatly complicates truly important code, namely k.getArg.  

 Worse, the present code doesn't work well if the user should happen to hit 
 backspace to increase the number of completions shown.  In that case, the 
 Easter Egg fails forever, that is, until the user hits Ctrl-G or Return. 
 Apparently, either nobody is using this Easter Egg, or nobody has ever 
 noticed the bug, or they have noticed the bug and have given up on Leo as a 
 result.

 = The code

 Revising k.getArg is part of the project to eliminate the first return 
 in vim-mode commands such as :rreturnfile-namereturn

 Yesterday I refactoring k.getArg so that it uses a helper GetArg class.  
 This is an important encapsulation of complex code.  It moves lots of state 
 variables out of the KeyHandlerClass class.  Most of this state involves 
 the Easter Egg.

 The new_arg switch at the start of leoKeys.py enables/disables the new 
 code.  As of the latest rev, the code appears to work identically, 
 regardless of this switch.  In particular, the bug in the Easter Egg exists 
 regardless of the value of new_arg. Hehe.

 = The plan

 My plan for this morning is to drop the Easter Egg in the GetArg class 
 only.  I expect a substantial collapse in complexity: the new code will 
 look very much like the corresponding (and much simpler) code in the 
 FileNameChooser class.  Imo, this collapse in complexity is far more 
 important than the Easter Egg.

 I'll keep a copy of the present GetArg class in the attic leoNotes.py 
 and revert to the old code in the unlikely event that somebody can convince 
 me that the Easter Egg is essential.  Good luck with that.  I'll give 
 weight only to those who actually use the Easter Egg at present.

 Note that the new_arg switch is a temporary safety net.  As usual with 
 such switches, it will be eliminated after the new code has been tested for 
 a few days.

 Your comments, please, and quickly.

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Vim emulation: ready for testing!

2014-08-18 Thread Zoltan Benedek
Hi,

I upgraded my system to Kubuntu 14.04, Python 2.7.6, PyQt version 4.8.6

and tried to start with @bool vim-mode = True

Unfortunately Leo becomes unresponsive and launchLeo.py works 100% on my 
CPU, I have to kill the process.

When I comment in myLeoSettings.leo:

@@bool vim-mode = True

everything works fine.

Leo commit = 41edd7c9d7ef

On Wednesday, August 13, 2014 1:22:07 PM UTC+3, Edward K. Ream wrote:

 On Tue, Aug 12, 2014 at 10:05 PM, Steve Zatz slz...@gmail.com 
 javascript: wrote: 
  Not giving up yet. 
  
  Completely clean Leo install from git. 
  
  Only nodes in myLeoSettings are setting vim-mode to true and placing the 
  @keys Vim bindings under @settings 

 You can **not** use both @keys Vim bindings and@bool vim-mode = True. 

 If you want to use the new vim code, leave the @keys Vim bindings node 
 in the @ignore tree. 

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Weird autocompleter bug

2014-08-07 Thread Zoltan Benedek
May be related:

https://github.com/leo-editor/leo-editor/issues/38

On Thursday, August 7, 2014 4:37:07 PM UTC+3, Fidel N wrote:

 Hi all:
 Just realized that when doing
 c. and checking the autocompleter options it wont offer the usual 
 (p,etc) but offers things like:

 CScanner
 basescanner

 and a few more.
 Anyone having this issue?


-- 
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: Tipp: Avoid conflicts when leo file is in source control

2014-08-07 Thread Zoltan Benedek
Interesting.

Thanks

On Thursday, August 7, 2014 12:05:24 AM UTC+3, SegundoBob wrote:

 On 08/06/2014 10:55 AM, Zoltan Benedek wrote: 
  In order to avoid useless changes of the leo file in SCMS you can run 
  the 'contract-all' command before every commit. 

 Good idea. 

 Attached is a script that allows you to do the contractions from the 
 command line. 

 usage: contract_all_nodes.py [options] path1 [path2 ...] 

 Contract all nodes 

 positional arguments: 
path   Pathname of a Leo-Editor file. If doesn't end .leo, 
  then .leo is added automatically. 

 optional arguments: 
-h, --help show this help message and exit 
-v, --version  show program's version number and exit 


 -- 
 Segundo Bob 
 segun...@gmail.com 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Tipp: Avoid conflicts when leo file is in source control

2014-08-06 Thread Zoltan Benedek
Hi,

I don't know whether is documented or not this idea, but I wanted to be 
sure, that is not lost.

If your leo file is in source control management system (like git, 
mercurial, ...), you can face some useless conflicts/commit changes of the 
leo file.

When some outline nodes are contracted/expanded the leo file changes, 
whether or not the outline structure has changed.

In order to avoid useless changes of the leo file in SCMS you can run the 
'contract-all' command before every commit.

Best regards


-- 
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: load files into Leo from the command line

2014-08-06 Thread Zoltan Benedek
Interesting.

Thanks

On Sunday, August 3, 2014 10:17:22 PM UTC+3, Terry wrote:

 Just upgraded my script to load files into Leo from the command line, 
 thought it was shared somewhere before, but not finding it, I've put it 
 here: 

 https://github.com/leo-editor/snippets/blob/master/utils/led.py 

 Cheers -Terry 


-- 
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: Vim emulation: ready for testing!

2014-08-05 Thread Zoltan Benedek
Hi Edward,

I've tested a bit vim-mode on Kubuntu 12.04, Python 2.7.3, PyQt 4.8.1, Leo 
063ef7af39f

The body pane seems ok, but I don't know how to work on outlines.

Changing to outline pane and using arrow keys jumps back to the body pane. 
(Ex: Alt + t, Left arrow)

I missed something?

Thanks

On Tuesday, August 5, 2014 6:14:19 AM UTC+3, Edward K. Ream wrote:

 On Mon, Aug 4, 2014 at 10:04 PM, Edward K. Ream edre...@gmail.com 
 javascript: wrote: 

  P.P.S. At present, vim mode's colon command is exactly equivalent to 
  Alt-X: it does *not* put a colon in the minibuffer. 

 Fixed at rev 55f2004...Here is the checkin log: 

 QQQ 
 The vim colon command now enters a colon into the minibuffer. 
 It's not protected, meaning that you can backspace over it. 
 QQQ 

 EKR 


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

2014-08-04 Thread Zoltan Benedek
Excellent work, Edward,

I'll definitely test vim-mode in the coming days.

On Sunday, August 3, 2014 1:43:12 PM UTC+3, Edward K. Ream wrote:

 There has been spectacular progress in the last four days. The first 
 recent commit, e7efb78..., was only three days ago, on July 31!

 It may actually be possible to use vim mode for actual work, although I 
 would not recommend do so yet.

 To enable vim mode, just set @bool vim-mode = True in the @settings tree 
 for a test .leo file.  Please report any real problems immediately. 

 Vim mode now demonstrates all important features of vim:

 - The status line showing accumulating commands and shows what the dot is.
 - All simple motion commands work, h,j,k,l.  At present, plain arrow keys 
 are equivalents.
 - The dd and d{motion} commands work.
 - All insert modes work: a,A,i,o,O.
 - Repeat counts work with all of the above commands: 3dd, 3d2j, 5j, 
 5itestescape, etc.
 - Visual mode works:  v{motions}v or v{motions}escape work, but not the 
 follow-on commands such as v{motions}d.
 - All changes persist made in a node persist when changing nodes, and all 
 changes are undoable, with either u  Ctrl-R or Leo's traditional undo 
 bindings, Ctrl-Z and Shift-Ctrl-Z.
 - The : command enters the minibuffer, exactly as Alt-X does.  minibuffer 
 commands do not affect the dot.
 - The dot command passes *simple* tests.  I would be wary of this command 
 for now ;-)

 Even better, vim mode uses Leo's existing code base in many ways:

 - Return in headlines and in outline panes work as always.

 - Ctrl-g is handled outside of vim mode: it is still the universal escape 
 code.  It resets vim emulation to normal mode.

 - insert-mode just passes keys to Leo's existing code.  This means that 
 insert mode supports syntax coloring, abbreviations, auto-indentation and 
 *all* key-related settings.  All without *any* code in leoVim.py!

 - Except for Ctrl-R, *all* of Leo's non-plain key bindings work *within* 
 vim mode just as they always have.  In particular, you can save work with 
 Ctrl-S without changing vim's state ;-)

 - Many other subtle integrations between Leo and vim-mode just work.  
 This is truly unexpected, and means that vim emulation will be much 
 smoother than I ever dreamed would be possible.

 Much work remains to be done.  Many vim commands remain to be implemented. 
 If you want to lobby for a particular vim feature, feel free to do so.

 Edward

 P.S. The code continues to get simpler while it gets more powerful.  This 
 is an extremely good sign.  When I woke this morning I saw how to make the 
 code even more straightforward.  I'll describe the new approach in a 
 separate ENB post.

 EKR


-- 
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To 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: Warning: two recent revs change the loading of importer/writers plugins

2014-08-02 Thread Zoltan Benedek
I agree. It is definitely easier to pull a new repo, than to debug false 
bugs caused by old pyc files.

Thanks for pointing out the danger.


On Friday, August 1, 2014 8:05:07 PM UTC+3, Edward K. Ream wrote:

 On Fri, Aug 1, 2014 at 10:51 AM, Zoltan Benedek benz...@gmail.com 
 javascript: wrote: 
  I recall that pyc files cause problems only on Python 2. 

 I didn't know that ;-)  Alas, many of us are still using 2. 

 I haven't heard any cries of pain from Leo's users, but the .py files 
 might be considered time bombs.  Besides deleting them, one could 
 always pull down a clean git repo. 

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: custom background color for 'selected/highlighted text'

2014-07-30 Thread Zoltan Benedek
Hi Fidel,

Many thanks for the tip, I can change the color I wanted.

Unfortunately I have some font issues with the new setting: the fonts 
changed in the outline pane and log pane.

I copied the entire section QTextEdit#richTextEdit from leoSettings.leo 
into a node (@settings--Qt Gui (appearance)--@data 
qt-gui-plugin-style-sheet) and changed only selection-background-color.

The fonts changed in the outline pane and log pane.

Then I copied the entire sections QTextEdit, QTextEdit#richTextEdit from 
leoSettings.leo into a node (@settings--Qt Gui (appearance)--@data 
qt-gui-plugin-style-sheet) and changed only selection-background-color.

Now I have issue only with the font in the outlines. (The font size is 
nearly half of the original)

Is there another section I should copy?

Thanks

On Tuesday, July 29, 2014 9:01:15 PM UTC+3, Fidel N wrote:

 Hi Zoltan:
 If you are using Qt, could you check if changing the following does the 
 trick?

 Go to the node: 
 myLeoSettings.leo#@settings--Qt Gui (appearance)--@data 
 qt-gui-plugin-style-sheet

 Then replace your color in this text:


 QTextEdit#richTextEdit {
 background-color: white; /* #fdf5f5; A kind of pink. */
 color: @text-foreground-body;
 selection-color: white;
 selection-background-color: lightgrey;
 font-family: @font-family;
 /* font-family: Courier New; */
 font-size: @font-size-body;
 font-weight: normal; /* normal,bold,100,..,900 */
 font-style: normal; /* normal,italic,oblique */
 }

 Change the selection-background-color to your liking.



-- 
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.


Is it safe to have @file and @edit node for the same file?

2014-07-29 Thread Zoltan Benedek
Hi,

Sometimes I want to see the code entirely as is in the file. Should I have 
a separate leo file or can I define @file and @edit node for the same file?

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.


custom background color for 'selected/highlighted text'

2014-07-29 Thread Zoltan Benedek
Hi,

Could someone explain to me, how I can customize the background color of 
highlighted text? (result text of find(Ctrl + F) command)

I have already myLeoSettings.leo with other custom setting:

@settings-@bool enable-abbreviations = True


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.


Re: Writer plugins now operational. Warning: this affects @auto-rst

2014-07-28 Thread Zoltan Benedek
Hi Edward,

I don't know how much is a problem, but recently when starting Leo I get 
some unusual messages in the log pane:

can not import leo.plugins,importers.ini.py
can not import leo.plugins,importers.php.py
can not import leo.plugins,importers.elisp.py
can not import leo.plugins,importers.html.py
can not import leo.plugins,importers.pascal.py
can not import leo.plugins,importers.csharp.py
can not import leo.plugins,importers.python.py
can not import leo.plugins,importers.otl.py
can not import leo.plugins,importers.rst.py
can not import leo.plugins,importers.javascript.py
...

My environment: Kubuntu 12.04, Python 2.7.3, PyQt version 4.8.1, Leo's 
commit:
5c0164b7e9bb7958fca85c4c87f84d9355515675

Best regards.
Zoltan

On Monday, July 28, 2014 4:16:26 PM UTC+3, Edward K. Ream wrote:

 Rev 7f25136...now connects the writer plugins in leo/plugins/writers.  As 
 stated below, this is somewhat experimental code.  Please report any 
 problems immediately.

 Here is the checkin log:

 QQQ
 Connected the writers in leo/plugins/writers to the atFile write logic in 
 at.writeOneAtAutoNode.

 An important **escape hatch**: the code will use the *old* rst writer (for 
 @auto-rst nodes) if leo/plugins/writers/rst.py is disabled, say by changing 
 the file's extension.

 All tests pass, but this must still be considered experimental code.
 QQQ

 Let me elaborate on the escape hatch.  Previously, @auto-rst used 
 rst.writeAtAutoFile as the writer.  This is considerably more complicated 
 than the code in plugins/writers/rst.py.  Actually, I don't really 
 understand the old rst write code: it would work on @rst nodes, but I don't 
 see how those would get turned into @auto-rst nodes.

 It may be that some people would prefer the old @auto-rst writer.  In that 
 case, just disable plugins/writers/rst.py, say by renaming it to rst.xxx.

 If you do decide to do this, please let me know why. We can then discuss 
 how the new rst writer should work.

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Restarting the vim-emulation project

2014-07-24 Thread Zoltan Benedek
Excellent!

For me the main obstacle in adopting Leo was Vim. Vim is so powerful and 
efficient, you can work by keyboard only.

Thanks Edward, for your endeavor and work.
Zoltan


On Wednesday, July 23, 2014 3:54:36 PM UTC+3, Edward K. Ream wrote:

 Encouraged by the success of the simplified persistence project, I am 
 going to restart the vim-emulation project.

 All aspects of the design will be based on simplicity and accuracy. I have 
 spent several hours recently playing with vim and noticing subtleties about 
 vim's screen and handling of the dot. I shall attempt the best possible 
 emulation of vim, constrained by the following simplifying principles:

 1. For now, and probably forever, the code will assume the typical vim key 
 bindings.  Not sure about vim key mapping, but that can wait.

 2. The vim key bindings will apply only to plain keys (when @bool vim_mode 
 = True).  Leo's existing key bindings will still apply for non-plain (Alt, 
 Ctrl, Meta) keys, even when vim_mode is True.  However, it's possible that 
 a few control keys will be handled differently in vim_mode in a hard-wired 
 way...

 This great divide of keystrokes is the simplest thing that could 
 possibly work.  Furthermore, it allows the vim emulation to work in the 
 much-more-complex Leonine environment *without* having to change any plain 
 vim bindings!  The trick is to use the Leo bindings for the Alt-Arrow keys 
 and return to shift focus to and from the outline. Return never makes 
 any sense when in the outline (in vim insert mode), so it may as well shift 
 focus back to the body pane and enter normal mode.  Slick.

 This great divide does have a few complications involving non-plain 
 keys, especially Ctrl-G and Ctrl-R, but we'll muddle through somehow.  The 
 point is that vim is focused on plain keys, so getting them *exactly* right 
 is the main problem.

 3. I'll attempt as accurate an emulation as possible, including Visual 
 and Selection modes, and especially attempting to recreate the cursor and 
 selection areas exactly.  I don't necessarily plan a *complete* emulation 
 of every possible combination of plain keys.  I'll start off with the most 
 useful, and add others if and when anyone requests them.

 4. Vim emulation will be based on a set of official commands whose names 
 start with vim_:  vim_a, vim_dot, etc.  These commands will update vim's 
 dot as appropriate, and emulate the corresponding vim commands as closely 
 as possible.

 5. Vim's ':' key in normal mode will probably be a synonym for Alt-X.  
 This seems reasonable because : commands do not affect the dot.

 That's all for now.  Your comments and corrections are welcome.

 I expect to be able to use vim mode comfortably myself in just a few days.

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Representing Leo outlines in git

2014-07-10 Thread Zoltan Benedek
Hi,

HDF5 is an interesting data format, too (http://www.hdfgroup.org).
ensure long-term access to HDF data
long term, mission critical data management needs

There is a python interface:

http://www.h5py.org

Regards
Zoltan

On Tuesday, July 8, 2014 6:43:36 PM UTC+3, Edward K. Ream wrote:

 On Tue, Jul 8, 2014 at 10:14 AM, 'Terry Brown' via leo-editor 
 leo-e...@googlegroups.com javascript: wrote: 
  On Tue, 08 Jul 2014 10:36:43 -0400 
  Jacob Peck gates...@gmail.com javascript: wrote: 
  
  What it could allow is per-node versioning... but there are better 
  ways of doing that.  Kent's work, for example... 
  
  versioning Leo nodes with git 2013-8-28 
  https://groups.google.com/forum/#!topic/leo-editor/F4k_zCXjtYc 
  
  Versioning Leo nodes... with Leo! 2013-8-29 
  
 https://groups.google.com/forum/#!msg/leo-editor/Y-daCfU5C5Y/5pV0Ukgcr0cJ 
  
  I don't think either of these cover what Kent's trying to do. 

 We seem to have an embarrassment of riches.  I'll try to get my head 
 around 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 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: problems with the minibuffer

2014-06-28 Thread Zoltan Benedek
Thanks for the prompt fix.

On Saturday, June 28, 2014 3:47:27 PM UTC+3, Edward K. Ream wrote:

 On Fri, Jun 27, 2014 at 6:07 AM, Zoltan Benedek benz...@gmail.com 
 javascript: wrote: 
  Hi, 
  
  Recently I've tried some commands in the minibuffer and got some 
 problems: 

 These have been fixed at rev ba20f6dbaa86.  They were introduced June 
 20 at rev 288847b40e3. 

 I'm glad this bug happened.  To find it, I had to zero in on the 
 offending rev using a divide  conquer strategy.  This is super easy 
 to do using git checkout.  Once I could see the buggy code, it was 
 obvious what the fix was.  My usual strategy of tracing the flow of 
 focus-related calls did not work in this case. 

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


problems with the minibuffer

2014-06-27 Thread Zoltan Benedek
Hi,

Recently I've tried some commands in the minibuffer and got some problems:

1. When I copy/paste commands to the minibuffer sometimes the command 
becomes uneditable, even by mouse click I can not get focus in the 
minibuffer
2. It would be nice to have the focus in the minibuffer after copy/paste of 
a command

My system: Kubuntu 12.04 with the latest upgrades, Python 2.7.3
Leo: the latest commit in git

Thanks
Zoltan

-- 
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: problems with the minibuffer

2014-06-27 Thread Zoltan Benedek
Done: https://bugs.launchpad.net/leo-editor/+bug/1335130

On Friday, June 27, 2014 3:35:07 PM UTC+3, Edward K. Ream wrote:

 On Fri, Jun 27, 2014 at 6:07 AM, Zoltan Benedek benz...@gmail.com 
 javascript: wrote: 
  Hi, 
  
  Recently I've tried some commands in the minibuffer and got some 
 problems: 
  
  1. When I copy/paste commands to the minibuffer sometimes the command 
  becomes uneditable, even by mouse click I can not get focus in the 
  minibuffer 
  2. It would be nice to have the focus in the minibuffer after copy/paste 
 of 
  a command 
  
  My system: Kubuntu 12.04 with the latest upgrades, Python 2.7.3 
  Leo: the latest commit in git 

 Thanks for this report.  Please file an official bug report. 

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Is there a way to move button toolbar to the continuation of the menubar?

2014-06-22 Thread Zoltan Benedek
Amazing.

Thanks a lot.

On Friday, June 20, 2014 7:39:25 PM UTC+3, Terry wrote:

 On Fri, 20 Jun 2014 06:43:15 -0700 (PDT) 
 Zoltan Benedek benz...@gmail.com javascript: wrote: 

  Hi, 
  
  It would be nice if I could move the script button toolbar to the 
  menubar, after the Help menu. There is a lot of free space, and I 
  could get one more line for the work space. 
  In some office programs you can change the position of toolbars, but 
  I have never seen a way to have the toolbar immediately after the 
  menubar 
  
  I tried to move by the mouse, but remains undetached. 
  
  If it is not possible to do that, is there a shortcut to remove and 
  add the button toolbar? 

 I've just added the following commands: 

   gui-all-hide 
   gui-all-show 
   gui-iconbar-hide 
   gui-iconbar-show 
   gui-menu-hide 
   gui-menu-show 
   gui-minibuffer-hide 
   gui-minibuffer-show 
   gui-statusbar-hide 
   gui-statusbar-show 

 The minibuffer unhides itself if you attempt to use it (Alt-X). 

 Cheers -Terry 

  Thanks 
  Zoltan 
  


-- 
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.


Is there a way to move button toolbar to the continuation of the menubar?

2014-06-20 Thread Zoltan Benedek
Hi,

It would be nice if I could move the script button toolbar to the menubar, 
after the Help menu. There is a lot of free space, and I could get one more 
line for the work space.
In some office programs you can change the position of toolbars, but I have 
never seen a way to have the toolbar immediately after the menubar

I tried to move by the mouse, but remains undetached.

If it is not possible to do that, is there a shortcut to remove and add the 
button toolbar?

Thanks
Zoltan

-- 
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: Leo's git repo is ready for testing

2014-02-12 Thread Zoltan Benedek
Works out of the box. I'm used to git and now I can use the latest Leo with 
the new 'find' functionality.

Thanks a lot.
Zoltan

On Tuesday, February 11, 2014 2:08:06 PM UTC+2, Edward K. Ream wrote:

 git clone https://github.com/leo-editor/leo-editor.git

 Leo loads successfully from the new repo, so all appears to have worked.

 Please report any problems immediately.

 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 http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.


reading basics of Leo

2013-11-19 Thread Zoltan Benedek
Hi,

I discovered Leo not long time ago and now I'm learning the basics.
I think there is a mistake in the page:

http://leoeditor.com/tutorial-basics.html

Up-arrow (goto-prev-visible) selects the next visible outline node.
Down-arrow (goto-next-visible) selects the previous visible outline node.

Perhaps it should be:

Up-arrow (goto-prev-visible) selects the previous visible outline node.
Down-arrow (goto-next-visible) selects the next visible outline node.

Thanks for this great tool!

Zoltan Benedek

-- 
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.