Re: ENB: Changing branches safely

2018-04-24 Thread Edward K. Ream
On Tuesday, April 24, 2018 at 3:32:34 PM UTC-5, Edward K. Ream wrote: > 1. [New principle]: The *only *proper way to resolve clone conflicts is to give priority to clones within @ trees. Why did this principle never occur to me before? > 3. [New principle]: When resolving a clone conflict, Leo

ENB: Changing branches safely

2018-04-24 Thread Edward K. Ream
Recent work on paste-retaining-clones suggests straightforward principles needed to fix #863: Serious problems changing branches : 1. [New principle]: The *only *proper way to resolve clone conflicts is to give priority to clones within @ tre

Re: ENB: Why I think keyword args are benign

2018-04-24 Thread Matt Wilkie
> > We will also need a paste-as-xml command, so that people can paste the > xml-version of an outline into an external editor. But there would be no > need to read copied xml back into Leo itself. > No, at least not for that reason. "Leo >> Copy node" ... "Notepad >> Paste" already pastes XM

Re: ENB: Why I think keyword args are benign

2018-04-24 Thread Edward K. Ream
On Tue, Apr 24, 2018 at 8:34 AM, Terry Brown wrote: > On Tue, 24 Apr 2018 07:38:35 -0500 > "Edward K. Ream" wrote: > > ​​ > > It looks like json.dumps may have problems with p.v.unknownAttributes > > fields. > > In theory yes, in practice not so much, although still a potential > ​ ​ > problem.

Re: Bug in the paste-retaining-clones prototype

2018-04-24 Thread Edward K. Ream
On Tue, Apr 24, 2018 at 8:10 AM, vitalije wrote: > > The createOutline function does not take into account changes to cloned >> nodes that occur between copy-json and paste-rc. For example: >> >> I thought it is what user would expect. > ​I'm not sure what the user should expect ;-) Heh. You

Re: ENB: Why I think keyword args are benign

2018-04-24 Thread Terry Brown
On Tue, 24 Apr 2018 07:38:35 -0500 "Edward K. Ream" wrote: > It looks like json.dumps may have problems with p.v.unknownAttributes > fields. In theory yes, in practice not so much, although still a potential problem. The leo_cloud plugin stores outlines (well, subtrees, without expansion info.

Re: Bug in the paste-retaining-clones prototype

2018-04-24 Thread vitalije
On Tuesday, April 24, 2018 at 2:30:18 PM UTC+2, Edward K. Ream wrote: > > The createOutline function does not take into account changes to cloned > nodes that occur between copy-json and paste-rc. For example: > > > I thought it is what user would expect. I would be surprised if for example pa

Viewing the json created by Vitalize's prototype code

2018-04-24 Thread Edward K. Ream
A recent change in "devel" improves how g.printObj handles multi-line strings. With the new code, you can see the json created by @button copy-json as follows: 1. Paste the clipboard into any new body. 2. Replace the body by g.printObj(the old body) 3. Add this line as the first body lin

Re: Bug in the paste-retaining-clones prototype

2018-04-24 Thread Edward K. Ream
On Tuesday, April 24, 2018 at 7:30:18 AM UTC-5, Edward K. Ream wrote: The createOutline function does not take into account changes to cloned > nodes that occur between copy-json and paste-rc. > In another thread Terry points out that the following will probably fail for some uA's. def copyOu

Re: ENB: Why I think keyword args are benign

2018-04-24 Thread Edward K. Ream
On Tue, Apr 24, 2018 at 7:11 AM, Terry Brown wrote: I haven't been following the code, just the discussion. I'm in favor of > incremental simplification where ever practical. ​I am especially interested in your opinion about supporting json as an alternative format for .leo files.​ > Remembe

Bug in the paste-retaining-clones prototype

2018-04-24 Thread Edward K. Ream
The createOutline function does not take into account changes to cloned nodes that occur between copy-json and paste-rc. For example: 1. Select @button copy-json. 2. Press the copy-json button. 3. Add a new node as a child of any "common code" node. 4. Press the paste-rc button. 5. The newly-cre

Re: ENB: Why I think keyword args are benign

2018-04-24 Thread Terry Brown
On April 24, 2018 4:58:52 AM CDT, "Edward K. Ream" wrote: >On Mon, Apr 23, 2018 at 1:46 PM, vitalije wrote: > >Terry, do you have any comments? I haven't been following the code, just the discussion. I'm in favor of incremental simplification where ever practical. Remember json's limitations,

Re: ENB: Why I think keyword args are benign

2018-04-24 Thread Edward K. Ream
On Tue, Apr 24, 2018 at 6:17 AM, rengel wrote: That made me wonder: Do you plan sometime in the future to make the code > PEP8-compliant? > ​Probably not in the sense you might be thinking of. ​ > Does Leo have any kind of 'style guide' or naming conventions? > ​New classes should follow the

Re: ENB: Why I think keyword args are benign

2018-04-24 Thread rengel
On Monday, April 23, 2018 at 10:58:08 AM UTC+2, Edward K. Ream wrote: > > ... a discussion about programming style ... > ... 2. The meaning of each kwarg is clear: - reassignIndices: distinguishes between paste-node and paste-retaining clones. - redrawFlag: suppresses calls to c.redraw when F

Re: ENB: Why I think keyword args are benign

2018-04-24 Thread Edward K. Ream
On Mon, Apr 23, 2018 at 1:46 PM, vitalije wrote: ​> ​ here is a complete code in experimental outline. ​ ​Superb code. Many thanks for it.​ > ​> ​ Perhaps you can do better job regarding the undo/redo functionality. I can't dive into undoer code right now so I have re-implemented everything f