Re: Leo in 2017

2016-12-27 Thread ne1uno
I had opportunity to use the mercurial shelf in TortoiseHG today.
say you want to revert the working tip but don't want to commit.
you have a patch for a file or a few files and shelve them
revert update then un-shelve the patches and back in business.

I see clamoring for multiple body's in Leo
what about multiple outlines? or is that already being done?

obviously lots of work comparing two revisions and then somehow applying
the patches. even for the one file I was working on with 3 minor changes
I managed to lose 2 of the edits by the time I got to apply the patch.
you can get the diffs but files can radically change as you go back in time.
maybe if such a tool existed you would find ways to use it?

is code coverage checking a done deal in python? any language?
a test outline on the left and source outline on the right
uncovered code highlighted. maybe more tests generated.
https://wiki.python.org/moin/CodeCoverage

don't forget the substantial non programmer Leo user population!
there might be a use for test driven writing? create an outline
then analyze the nodes, do they make sense.
going the other way, take a bunch of text and generate
headlines. is a free form text importer possible? useful?


On Saturday, December 24, 2016 at 6:16:41 AM UTC-5, Edward K. Ream 
wrote:The last two years have seen @clean and the clone-find commands.  
Both are game changers. My *goal *for the new year is create something 
similar.

The *strategy *will be to focus on problems that we have learning or using 
Leo.  Some possibilities:



*Learning about Leo*The Programming with Leo 
 tutorial must be 
rewritten, following the "less said the better" principle. I'll start with 
motivating @file and @others.  Everything else is details.

I am considering a series of "Looking over Edward's shoulder" tutorials.  
Instead of slideshows or videos, it may be more effective to throw out a 
few haiku-like invitations for discovery, following the how to learn Leo 
post . 
Yes, Leo has a gazillion features, but the basics of Leo are simple, and 
there aren't many of them.

*Editing*

Leo might benefit from a temporary vim mode.  This should be easy to do, 
and it might be useful in some situations.  Leo might also benefit from a 
vim-like "dot" command.

I am having my doubts that a super-duper outline-based diff 
 is going 
to be useful. The only time I ever use git diff is when creating a checkin 
log. Still, I'll investigate a bit further.

As always, I'll be looking for ways to better integrate Leo with vim, 
emacs, jupyter, etc.

*Testing*

The TDD advances 
, have 
stimulated further thoughts. More improvements may follow.

Leo is a uniquely friendly environment for unit testing.  For example, one 
could imagine a short script that would generate unit tests for all 
commands, or all methods in a file or class.

*Design and checking*

After spending considerable time writing the make-stub-files 
 script, I have never used 
mypy . I'll probably play around with checking next 
year.  Programmers have not begun to use big data to validate/improve their 
programs...

*Understanding*

The biggest payoff may come from enhancing Leo's unique strength, namely 
understanding computer programs, or other complex data.  Advances in this 
arena will be difficult (impossible) to duplicate in other programs.

That's all for now.  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: Bookmarks pane disappears

2016-12-27 Thread lewis
As requested here is the full log from loading another of my leo files, 
with messages about Unpickling errors:

Leo Log Window
Leo 5.4, build 20161226191821, Mon Dec 26 19:18:21 CST 2016
Git repo info: branch = master, commit = 0cf49992c997
Python 2.7.13, PyQt version 4.8.7
Windows 10 AMD64 (build 10.0.14393) 
loadOnePlugin: can not load enabled plugin: leo.plugins.stickynotes_plus
Unpickling error - Python 3 data accessed from Python 2?
Unpickling error - Python 3 data accessed from Python 2?
Unpickling error - Python 3 data accessed from Python 2?
reading: N:\leo\Scripting_tutorial.leo
Unpickling error - Python 3 data accessed from Python 2?
reading: @file hello.py
Unpickling error - Python 3 data accessed from Python 2?
Unpickling error - Python 3 data accessed from Python 2?
reading: @auto-md Python for Leo code academy
Unpickling error - Python 3 data accessed from Python 2?

Internal Leo error in bodyString
not unicode: '@others\n\nWarning: this node is ignored when writing this 
file.\n\n@language md\n@tabwidth -4\n'
Called from writeFile,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Internal Leo error in bodyString
not unicode: ''
Called from makeCacheList,makeCacheList,__get_b,bodyString
Please report this error to Leo's developers

Interna

Re: Bookmarks pane disappears

2016-12-27 Thread lewis
Ran alt-x clear-all-caches
I thought this command would clear all caches. It only cleared the cache of 
the file currently open, on a per file basis. 
Output to log is 




*clearing cache at 
directory...C:\Users\lewis\.leo\db\workbook.leo_16f42a527a16b5a0203701b0b93b1da6clearing
 
cache at 
directory...C:\Users\lewis\.leo\db\workbook.leo_4a6694c973447ee8ff01c0da5d57cf4cdone*

When I reloaded my leo file:
1. all the bookmarks were cleared
2. the saved layout names were not deleted, and still available to reload

I'm not quite sure what you mean by better or worse. If 'clear-all-cahes' 
simulates the effect of switching from python 3 to 2, and considering the 
saved layout names were still available to reload, then things are probably 
better :)





*Leo Log WindowLeo 5.4, build 20161226191821, Mon Dec 26 19:18:21 CST 
2016Git repo info: branch = master, commit = 0cf49992c997Python 2.7.13, 
PyQt version 4.8.7Windows 10 AMD64 (build 10.0.14393) *

Regards
Lewis

On Tuesday, December 27, 2016 at 7:32:27 PM UTC+11, Edward K. Ream wrote:
>
> ​
> Lewis, does the clear-all-caches command make the problem better or worse?
>
> 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: Bookmarks pane disappears

2016-12-27 Thread Edward K. Ream
On Mon, Dec 26, 2016 at 8:30 PM, 'Terry Brown' via leo-editor <
leo-editor@googlegroups.com> wrote:

>
> I think we were both basically on track, although the exact problem is
> a bit simpler than Py 2/3 having different file paths or hashes thereof
> for a particular file.  It's this line:
>
> https://github.com/leo-editor/leo-editor/blob/4d28c69/leo/
> core/leoCache.py#L405
>

​Excellent sleuthing, Terry.
​


> So the solution would be a hard coded constant of 2 in place of
> pickle.HIGHEST_PROTOCOL there.
>

​This seems like the simplest and best solution. I appreciate your
attention to detail in rev 0cf4999.

As you say later, we could write Python 3 code to recursively convert all
the pickles in ~/.leo/db/ to protocol 2, but for now there seems to be no
great need to do that.

Lewis, does the clear-all-caches command make the problem better or worse?

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.