Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Edward K. Ream
On Wednesday, June 14, 2017 at 9:31:43 AM UTC-5, Edward K. Ream wrote: This suggests several straightforward changes to Leo: > > 1. Add a front-end to git diff that would create, say, "Git Diff" nodes > having roughly the same format as "Recovered Nodes" nodes. > I spent time yesterday and today

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Terry Brown
On Thu, 15 Jun 2017 06:17:43 -0700 (PDT) "Edward K. Ream" wrote: > Of course, all this assumes that there will be a way to make > gitpython easily available. > > Perhaps there is an easier way of getting the job done? Any ideas? You're aware of https://docs.python.org/2/library/difflib.html

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Terry Brown
On Thu, 15 Jun 2017 08:33:07 -0500 Terry Brown wrote: > Also I have some Leo code for recursive tree comparisons that seems to > be not working currently, will see if I can get it working again. Actually it is working, I just wasn't using it right. I've posted it here: https://github.com/leo-ed

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Edward K. Ream
On Thursday, June 15, 2017 at 8:33:12 AM UTC-5, Terry Brown wrote: You're aware of > > https://docs.python.org/2/library/difflib.html > The question is how to get the "raw material" for difflib. I have just answered my second stack overflow

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Edward K. Ream
On Thursday, June 15, 2017 at 9:11:14 AM UTC-5, Edward K. Ream wrote: > So now I can pass s1 and s2 to difflib. Mission accomplished. Hehe. The infamous words "Mission accomplished" should have been a warning :-) Sure, we can use git diff to give us a list of changed blobs (fragments), but t

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Edward K. Ream
On Thursday, June 15, 2017 at 8:46:18 AM UTC-5, Terry Brown wrote: > > > > Also I have some Leo code for recursive tree comparisons... > https://github.com/leo-editor/snippets/blob/master/utils/diff_trees.py Thanks for this. Iirc, there is other tree comparison code somewhere in Leo. It will b

Re: Aha/Doh! Recovered nodes are the the desired outline diffs

2017-06-15 Thread Edward K. Ream
On Thu, Jun 15, 2017 at 9:20 AM, Edward K. Ream wrote: > On Thursday, June 15, 2017 at 9:11:14 AM UTC-5, Edward K. Ream wrote: > > > So now I can pass s1 and s2 to difflib. Mission accomplished. > > Sure, we can use git diff to give us a list of changed blobs (fragments), > but the task of relat

The design of Leo's git diff interface

2017-06-15 Thread Edward K. Ream
The actual programming/diffing part of showing git diffs within Leo seems well within reach. However, that's not the most important task at hand. We could imagine adding a git-diff command to Leo. This command would show the outline-oriented diff of the selected @ tree against the last commit.

Re: The design of Leo's git diff interface

2017-06-15 Thread Edward K. Ream
On Thursday, June 15, 2017 at 11:55:05 AM UTC-5, Edward K. Ream wrote: > I'm going to study the gitk sources (part of the git distro) to see how they work. That may give me ideas for bypassing gitpython. Meh. They are written in tcl and Leo doesn't have an importer for that. For now, using git

Re: The design of Leo's git diff interface

2017-06-15 Thread Edward K. Ream
On Thursday, June 15, 2017 at 12:13:55 PM UTC-5, Edward K. Ream wrote: > I wonder whether git can deliver (the contents of) blobs by file name and commit. Well, of course it can: git show HEAD~2:./leo/core/commit_timestamp.json produces: { "asctime": "Wed Jun 14 05:08:29 CDT 2017",

Re: The design of Leo's git diff interface

2017-06-15 Thread Edward K. Ream
On Thursday, June 15, 2017 at 12:23:15 PM UTC-5, Edward K. Ream wrote: > > I wonder whether git can deliver (the contents of) blobs by file name and commit. > Well, of course it can: git show HEAD~2:./leo/core/commit_timestamp.json ... > If this output can be piped into Leo we won't need gitpytho

Ammending, or Subclassing LeoQTTextBrowser

2017-06-15 Thread Adrian
Hi, I have been trying to look at various methods for implementing my own code suggestion popups. There are various tutorials on the QCompleter class I have looked into, as well as other things. I have looked at the ctags plugin also, but I am not sure that is quite what I am trying to do eit

print-settings traceback

2017-06-15 Thread lewis
I see this traceback using the 'print-settings' command: Traceback (most recent call last): File "N:\git\leo-editor\leo\core\leoGlobals.py", line 2309, in wrapper func(self, event=event) File "N:\git\leo-editor\leo\commands\helpCommands.py", line 1121, in printSettings self.c.config.p