Re: **Important**: keys branch merged into devel

2020-07-26 Thread Brian Theado
The git log command I shared shows the diffs for leoSettings in your keys
branch. That didn't help you?

$ git log -p cc568d628 leo/config/leoSettings.leo


Since all the history is still there, you could redo the merge locally
using temporary throwaway branches. For educational purposes, if nothing
else. But also you can use it to see what is different than if you had
resolved the merge conflicts "correctly". What follows is my transcript of
following that advice.

Create the throwaway, temporary branches

$ git branch old-keys cc568d628
$ git branch old-devel 060811435


Run the merge

$ git checkout old-devel
$ git merge old-keys
Auto-merging leo/core/leoGlobals.py
Auto-merging leo/core/leoCommands.py
Auto-merging leo/config/leoSettings.leo
CONFLICT (content): Merge conflict in leo/config/leoSettings.leo
Auto-merging leo/commands/editCommands.py
Automatic merge failed; fix conflicts and then commit the result.


The conflict looks pretty easy to resolve. New vnodes were added in the
same place in both branches. All the new vnodes should be kept

$ git diff leo/config/leoSettings.leo
diff --cc leo/config/leoSettings.leo
index 7c2977cb8,bab3e06d2..0
--- a/leo/config/leoSettings.leo
+++ b/leo/config/leoSettings.leo
@@@ -2321,7 -2319,8 +2321,12 @@@
  @bool outline-tabs-show-close =
True
  
  
++<<< HEAD
 +
++===
+ 
+ 
++>>> old-keys
  
  
  If True: Save the Leo file and all modified
derived files every time the external editor saves a modified file.


Since we want to keep all the lines, use vim to remove the "<",
"=", ">>" merge conflict cruft:


$ vim leo/config/leoSettings.leo


Commit the merge

$ git add leo/config/leoSettings.leo
$ git commit -m "Merged old-keys into old-devel"


See what changes from the keys branch still aren't in devel. Looks like
there are a few still:

$ git diff devel..old-devel leo/config/leoSettings.leo
diff --git a/leo/config/leoSettings.leo b/leo/config/leoSettings.leo
index 7c01ef527..dac0e2cbf 100644
--- a/leo/config/leoSettings.leo
+++ b/leo/config/leoSettings.leo
@@ -2321,7 +2321,9 @@
 @bool outline-tabs-show-close =
True
 
 
+
 
+
 
 
 If True: Save the Leo file and all modified
derived files every time the external editor saves a modified file.
@@ -3612,19 +3614,25 @@ delete-comments =
Ctrl-parenright # Shift-Ctrl-0
 delete-word = Ctrl-Delete
 delete-word = Keypad+Ctrl+Delete
 delete-spaces   = None
+### NEW:
 indent-region   !text = Tab
-indent-region   = ctrl-greater # Ctrl-shift-
+### OLD:
+# indent-region = Tab # Only when text is selected.
+# indent-region = ctrl-greater # Ctrl-shift-
 kill-line   = Ctrl-k
 kill-to-end-of-line = None
-newline-and-indent  = Ctrl-j
-### newline-and-indent  !text = Tab
+# newline-and-indent= Ctrl-j
+# newline-and-indent!text = Tab
 focus-to-body   !tree = Tab
 paste-text  = Ctrl-v
 reformat-paragraph  = Shift-Ctrl-p
 split-line  = None
 unformat-paragraph  = Shift-Ctrl-u
-unindent-region = ctrl-less # Ctrl-Shift-
-unindent-region = Shift-tab # Only when text is
selected.
+### NEW
+unindent-region !text = Shift-Tab
+# OLD:
+# unindent-region = ctrl-less # Ctrl-Shift-
+# unindent-region = Shift-tab # Only when text is
selected.
 yank= Ctrl-Y
 yank-pop= Alt-Y
 zap-to-character= Alt-z


Brian

On Sun, Jul 26, 2020 at 12:36 PM Edward K. Ream  wrote:

> On Sun, Jul 26, 2020 at 10:32 AM Brian Theado 
> wrote:
>
> > From https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell,
> "a branch in Git is simply a lightweight movable pointer to one of these
> commits".  So when you delete a branch, you only lose the named pointer to
> the commit. Your merge commit shows which commit the keys branch used to
> point to:
>
> Thanks for this. I'm less alarmed now :-)
>
> However, I am not happy with gitk (or git log) as a means of seeing what
> has happened. Perhaps I am missing something. Yesterday I did discover git
> views, but they haven't helped nearly as much as I would have liked.
>
> And where is the search function in gitk?
>
> Edward
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/CAMF8tS2x99q53QW%2BnGeSHRe9%2Bue9Fj02mNuY5kvJ9m3oH95zDA%40mail.gmail.com
> 

Re: I have just announced the leoAst.py project

2020-07-26 Thread Edward K. Ream
On Saturday, July 25, 2020 at 7:44:14 AM UTC-5, Edward K. Ream wrote:

> This completes #1565 
: Announce TOG 
classes, and #1440 : 
unify the ast and tokens worlds.

Guido immediately found a problem with the announcement. The link to 
leoAst.py was incorrect. This 
is 
the correct link. 

I have spent the last two days polishing the file, improving docstrings, 
usage message and adding various links.

The project is complete, for now. That may change depending on Guido's 
comments.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ba960ec5-15d1-4bb3-a86b-950c40c1917ao%40googlegroups.com.


Re: **Important**: keys branch merged into devel

2020-07-26 Thread Edward K. Ream
On Sun, Jul 26, 2020 at 10:32 AM Brian Theado 
wrote:

> From https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell,
"a branch in Git is simply a lightweight movable pointer to one of these
commits".  So when you delete a branch, you only lose the named pointer to
the commit. Your merge commit shows which commit the keys branch used to
point to:

Thanks for this. I'm less alarmed now :-)

However, I am not happy with gitk (or git log) as a means of seeing what
has happened. Perhaps I am missing something. Yesterday I did discover git
views, but they haven't helped nearly as much as I would have liked.

And where is the search function in gitk?

Edward

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


Re: **Important**: keys branch merged into devel

2020-07-26 Thread Brian Theado
Edward,

On Sun, Jul 26, 2020 at 6:52 AM Edward K. Ream  wrote:
[...]

> P. S. I am alarmed by the potential loss of data when merging git branches.
>
> When I merged the "keys" branch into devel I mistakenly resolved a merge
> conflict by taking devel's version of leoSettings.leo. That was just wrong.
>
> After deleting the "keys" branch, there seems to be no way recover the
> lost key bindings. I would have thought that the git merge would have
> preserved all previous changes to leoSettings.leo, but I was not able to
> see those changes. Fortunately, the required change could easily be deduced.
>
[...]

>From https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell,
"a branch in Git is simply a lightweight movable pointer to one of these
commits".  So when you delete a branch, you only lose the named pointer to
the commit. Your merge commit shows which commit the keys branch used to
point to:

$ git log -n1 818de411e61
commit 818de411e6130086714a2f6bcb97ab52e6182674
Merge: *cc568d628* 060811435
Author: Edward K. Ream 
Date:   Sat Jul 25 08:43:33 2020 -0500

Merge devel into keys, using devel's leoSettings.leo


Before you deleted the keys branch, it pointed to commit cc568d628 and you
can see the changes to leo settings with this command:

$ git log -p cc568d628 leo/config/leoSettings.leo


No commits are lost when you delete a branch.

A pull request from the keys branch into devel would have only helped you
in that it would not have allowed you to merge into the devel branch due to
the merge conflicts. You would have had to resolve the merge conflicts in
the *keys* branch *before* merging into devel. There, one last round of
testing might have exposed the issue, but maybe not. Or maybe inspecting
the diffs one last time through the pull request UI might have helped you
spot the issue. Either way, I don't think a PR provides any extra history
preservation. The commits are all still there.

Brian

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


Re: **Important**: keys branch merged into devel

2020-07-26 Thread Thomas Passin
This teaches me not to rush to delete a branch once it's not needed any 
more.

On Sunday, July 26, 2020 at 6:52:07 AM UTC-4, Edward K. Ream wrote:
>
> On Saturday, July 25, 2020 at 9:03:53 AM UTC-5, Edward K. Ream wrote:
>
> P. S. I am alarmed by the potential loss of data when merging git branches.
>
> When I merged the "keys" branch into devel I mistakenly resolved a merge 
> conflict by taking devel's version of leoSettings.leo. That was just wrong.
>
> After deleting the "keys" branch, there seems to be no way recover the 
> lost key bindings. I would have thought that the git merge would have 
> preserved all previous changes to leoSettings.leo, but I was not able to 
> see those changes. Fortunately, the required change could easily be deduced.
>
> Hmm. Perhaps creating a PR, as I should have done, would have fixed the 
> problem. Yes, I think so. The PR would have recorded the contents of 
> leoSettings.leo, without knowing that a conflict would have resulted.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/3db7fa80-b4d2-495e-ac56-827f707d65bbo%40googlegroups.com.


Re: **Important**: keys branch merged into devel

2020-07-26 Thread Edward K. Ream
On Saturday, July 25, 2020 at 9:03:53 AM UTC-5, Edward K. Ream wrote:

> This concludes #1269 
: refactor Leo's 
key-handling code.

Rev 64c49da6 in devel restores an important key binding that was reverted 
when merging the "keys" branch into devel. The new binding is in 
leoSettings.leo, in the node @keys EKR bindings-->@shortcuts Text operations

old: newline-and-indent = !text = Tab
new: indent-region = !text = Tab

You will probably want to make a similar change in your myLeoSettings.leo 
file if you don't use the EKR bindings.

Edward

P. S. I am alarmed by the potential loss of data when merging git branches.

When I merged the "keys" branch into devel I mistakenly resolved a merge 
conflict by taking devel's version of leoSettings.leo. That was just wrong.

After deleting the "keys" branch, there seems to be no way recover the lost 
key bindings. I would have thought that the git merge would have preserved 
all previous changes to leoSettings.leo, but I was not able to see those 
changes. Fortunately, the required change could easily be deduced.

Hmm. Perhaps creating a PR, as I should have done, would have fixed the 
problem. Yes, I think so. The PR would have recorded the contents of 
leoSettings.leo, without knowing that a conflict would have resulted.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/d35240c0-769c-4b84-8eae-89aca3028388o%40googlegroups.com.


Re: leo stops working

2020-07-26 Thread Geoff Evans
Oohhh!  So maybe after I upgraded Ubuntu I needed to "conda update 
anaconda" ??  I'll try that first and see what happens.

On Saturday, 25 July 2020 at 20:36:34 UTC-2:30 tbp1...@gmail.com wrote:

> I assumed from one of your sentences that somehow it had been provided by 
> apt.  Probably not - I'd just been thinking that apt upgraded Python, 
> really..  As I just found out, a system upgrade can require a whole new 
> installation of Leo using pip/pip3, which brings in new versions of all 
> Leo's dependencies.
>
>
> On Saturday, July 25, 2020 at 4:17:25 PM UTC-4, Geoff Evans wrote:
>>
>> Thanks, I'll try that when I'm better able to concentrate if things start 
>> going wrong.
>> One puzzle, though: you refer to the Ubuntu package manager providing it: 
>> I didn't think leo was part of the Ubuntu distribution.
>> (What I'd really love is if it was part of the Anaconda distribution :-)
>>
>> geoff
>>
>> On Saturday, 25 July 2020 at 11:24:36 UTC-2:30 tbp1...@gmail.com wrote:
>>
>>> v5.9 is very old by now.  I'm surprised that the Ubuntu package manager 
>>> is still providing it.  The chances of troubleshooting this package are 
>>> probably small at this point.
>>>
>>> I'd suggest installing the current version of Leo directly using pip.  
>>> Make sure that you have python 3.6+ on your system.  You may have to use 
>>> apt-get to get pip installed - some distros don't include it with Python, 
>>> some do, and I don't remember about Ubuntu.  It may need to be called pip3 
>>> to make sure it's the one for Python 3.x. Then install Leo:
>>>
>>> pip3 install leo  # pip3 instead of pip should make sure you are using 
>>> the Python 3.x version instead of the Python 2.7 version.
>>>
>>> Or to see which versions are available:
>>>
>>> pip3 install leo==
>>>
>>> On some systems you might need to use sudo:
>>>
>>> sudo pip3 install leo
>>>
>>> Or, if the system isn't finding the correct version of pip:
>>>
>>> python3 -m pip install leo# python3 will launch the available 
>>> version of pip for Python 3.x
>>>
>>> As of today, the latest version of Leo available this way is 6.2.1.
>>>
>>> On Saturday, July 25, 2020 at 9:30:30 AM UTC-4, Geoff Evans wrote:

 When I try to run leo now (in Ubuntu 18.04) I get:

 (base) geoff:1427>leo ogmap.leo

 setting leoID from os.getenv('USER'): 'geoff'
 Leo 5.9-b2, build 20190409061733, Tue Apr  9 06:17:32 UTC 2019
 livecode.py: can not import meta
 pip install meta
 Segmentation fault (core dumped)

 It used to work fine; all I can think of that's changed is that I've 
 done "apt-get update/upgrade": cuold that have broken a prerequisite?

 Best,   geoff

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ab2df605-0f97-44e3-9e44-6a60cae8d9a2n%40googlegroups.com.