Re: Copying a node with clone status preserved

2014-12-10 Thread Edward K. Ream
On Tue, Dec 9, 2014 at 4:17 PM, Joon Ro wrote: > On Tuesday, December 9, 2014 6:10:29 AM UTC-6, Edward K. Ream wrote: >> >> >> ​Copy the tree, then do paste-retaining-clones. >> >> > I do not have this option in my context menu (I'm using 5.0 final). Is it > a newer functionality? > ​It's not th

Re: Need help for a Zim importer

2014-12-10 Thread Davy Cottet
Finally, it came out that excepting some eternal encoding issues, that was pretty simple to write an importer without care about external files, crosslinks... If you want to have a look on it, do not hesitate to modify it if you find some issues or potential improvements. Here it is : https://

Re: Need help for a Zim importer

2014-12-10 Thread Edward K. Ream
On Wed, Dec 10, 2014 at 5:52 AM, Davy Cottet wrote: > Finally, it came out that excepting some eternal encoding issues, that was > pretty simple to write an importer without care about external files, > crosslinks... > ​A short script. Well done! I'll look at it today with an eye to making it

Re: Problems with git submodules

2014-12-10 Thread Edward K. Ream
On Tuesday, December 9, 2014 3:01:08 PM UTC-6, Edward K. Ream wrote: > Unless I hear a convincing reason to use submodules I'll remove them tomorrow. Done at rev 5422fee. I don't expect any problems (see below), but please do report any problem, no matter how large or small. So now Leo (and g

Re: Need help for a Zim importer

2014-12-10 Thread Edward K. Ream
On Wed, Dec 10, 2014 at 5:52 AM, Davy Cottet wrote: > do not hesitate to modify it if you find some issues or potential > improvements. > ​Rev 79771e8 adds the ZimImportController (zic) class to leoImport.py. With this class your script becomes:: import leo.core.leoImport as leoImport

Re: Need help for a Zim importer

2014-12-10 Thread Edward K. Ream
On Wednesday, December 10, 2014 9:01:00 AM UTC-6, Edward K. Ream wrote: > > With this class your script becomes:: > > import leo.core.leoImport as leoImport > > leoImport.ZimImportController(c).run() > Rev 8b00234 adds the import-zim-folder command. It works exactly the same way. The co

Re: Need help for a Zim importer

2014-12-10 Thread Davy Cottet
Thanks for that, I'm gonna have a look at this and test it I've been working on a function to clean useless nodes. I'm fighting with a simple case : how to replace a node by it subnode & tree ? See last line for pos in c.all_positions(): if '@rst-no-head' in pos.h: parent = po

Re: Copying a node with clone status preserved

2014-12-10 Thread Joon Ro
Hi Edward, Thanks again for the reply. But paste-retaining-clones just make a clone, and it is not what I was talking about. I’m not sure if you saw my last email - I’m pasting it here again: Parent - Child 1 (not a clone) - Child 2 (a clone of Child 2 from somewhere else) I want

Re: Copying a node with clone status preserved

2014-12-10 Thread Edward K. Ream
On Wed, Dec 10, 2014 at 11:10 AM, Joon Ro wrote: ​> ​ Basically I want to generate a deep copy of a node, with clone status of its children retained. ​Being a clone is *not* an intrinsic property of a node (vnode). It depends on the outline in which the vnode is embedded. Edward -- You recei

Re: Need help for a Zim importer

2014-12-10 Thread Edward K. Ream
On Wed, Dec 10, 2014 at 10:58 AM, Davy Cottet wrote: ​> ​ I'm fighting with a simple case : how to replace a node by it subnode & tree ​? In general, deleting nodes in a script is more difficult than it might first appear. Any time a script contains p.doDelete it is asking for trouble. The ess

visit every parent of a clone in editing traversal.

2014-12-10 Thread Todd Mars
It would be great to have a command to simply go to next parent of any clone, to be able to traverse in succession with the command, every parent of any clone (any node, really, since a node has just a single parent) Doable and does this make sense as a need or is it already done? Todd. Of course

OT: Lawrence Lessig tells what MayOne.org learned from the 2014 elections

2014-12-10 Thread Edward K. Ream
Undeterred, even inspired, by the dismal (for MayOne.org) 2014 election results: https://mayday.us/campaigns/what-we-learned-in-2014/ Lessig is one of the world's stars: http://www.lessig.org/ (hilarious cartoon) http://en.wikipedia.org/wiki/Lawrence_Lessig -- You received this message becau

Re: Need help for a Zim importer

2014-12-10 Thread Davy Cottet
Ok for deleting, I'll study it more carefully, but what about replacing a node by its single child ? Obviously parent=child does not work... and I've not succeded to make moveToParent() working -- You received this message because you are subscribed to the Google Groups "leo-editor" grou

Re: Need help for a Zim importer

2014-12-10 Thread Davy Cottet
I finally made it worked this way. It just works on my extensive wiki tree, so I think it's conclusive... Of course I could modify it if doDelete is a problem, but for now, I don't really understand the issue of it... Now I'm happy : I've a very nice Leo/rst outline with all my last years data.

Re: Need help for a Zim importer

2014-12-10 Thread Edward K. Ream
On Wed, Dec 10, 2014 at 12:20 PM, Davy Cottet wrote: I finally made it worked this way. It just works on my extensive wiki tree, > so I think it's conclusive... > Of course I could modify it if doDelete is a problem, but for now, I don't > really understand the issue of it... > ​It probably work

Re: visit every parent of a clone in editing traversal.

2014-12-10 Thread Edward K. Ream
On Wed, Dec 10, 2014 at 11:27 AM, Todd Mars wrote: ​If you know the *position* p of a node, then p.parent() is its parent *position* and you are done. But if you just know the (v)node, then there is no such thing as *the* parent of the node. Instead, v.parents is a list of the vnodes having v a

Re: Need help for a Zim importer

2014-12-10 Thread Davy Cottet
Ok, I think I see your point. Tomorrow I'll verify more carefully that no node are lost in the process since I do delete some nodes without replacing. I'll let your know for you to include the cleaning function when it will be sure that it works without problem. -- You received this message bec

Re: Bibtex Plugin no action after double clicking

2014-12-10 Thread Juaco
Dear Edward, thanks for your unconditional support. I downloaded the last git version (Leo 5.0-final, build 20141208163902, Mon Dec 8 16:39:02 CST 2014) and it worked better. You mentioned however a modification yesterday Dec. the 09th. One can read an existing bib file. On the contrary, writin

Re: Copying a node with clone status preserved

2014-12-10 Thread Matt Wilkie
On Mon, Dec 8, 2014 at 4:30 PM, Joon Ro wrote: > Now I'm copying individual childrens separately and it is a pain .. Sometimes this can be worked around a little more smoothly by creating a temporary organizer node and putting all the children-to-remain-clones in that before copy org-node and-p

Re: Copying a node with clone status preserved

2014-12-10 Thread Joon Ro
On Wednesday, December 10, 2014 3:44:49 PM UTC-6, Matt Wilkie wrote: > > > Sometimes this can be worked around a little more smoothly by creating a > temporary organizer node and putting all the children-to-remain-clones in > that before copy org-node and-paste-as-clone. So, 2 or 3 steps instea

@auto-org-mode without automatic declarations node heading generation

2014-12-10 Thread Joon Ro
Hi, Is it be possible to turn off the automatic heading generation for the `declarations` node with `@auto-org-mode`? I'm using Leo to generate org files and then export them to other formats (e.g., using ox-rst for reStructuredText and ox-reveal for html slides), and since Leo automatically ge

Re: Copying a node with clone status preserved

2014-12-10 Thread Matt Wilkie
Thanks for the scenario. You might find the approach of using <> usable. The best intro at the moment seems to be http://leoeditor.com/tutorial-programming.html Also see recent related discussion at https://github.com/leo-editor/leo-editor/issues/109 Matt On Wed, Dec 10, 2014 at 2:04 PM, Joon