Extract command

74 views
Skip to first unread message

Rob

unread,
Jun 13, 2019, 10:30:03 AM6/13/19
to leo-editor
I use the Extract command frequently (Ctrl-Shift-D) to create nodes from body text; very useful command. However, I usually prefer the created node to be be the first child node, not the last, so I end up having to move the node to the first position. Is there a way to change the default behavior or to use a script that does essentially does the same thing as Extract, but places the node first?

BTW, I looked in the leoCommands.py file for some clues, but only found a small menu reference; not sure where else to look.

Rob...

Chris George

unread,
Jun 13, 2019, 11:23:11 AM6/13/19
to leo-editor
Hi Rob,

I think this is a good place to start: c_ec.extract & helpers.


insertAsLastChild() seems to be the operator but there doesn't appear to be such a thing as insertAsFirstChild() or insertAsNextChild() so I am not sure where to go from here.

HTH,

Chris

Rob

unread,
Jun 13, 2019, 11:32:29 AM6/13/19
to leo-editor
Thanks, but where would I find that (which xxx.py file)? I assume it's in the core folder somewhere?

Rob...

Chris George

unread,
Jun 13, 2019, 11:53:56 AM6/13/19
to leo-e...@googlegroups.com
Ah, it is in LeoPyRef.leo under File, Open Specific Leo File.

Chris

--
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+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/a4d9864b-0541-4b25-a37a-9c86bcc9d63b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edward K. Ream

unread,
Jun 13, 2019, 11:55:35 AM6/13/19
to leo-editor
On Thu, Jun 13, 2019 at 10:23 AM Chris George <techn...@gmail.com> wrote:
Hi Rob,

I think this is a good place to start: c_ec.extract & helpers.


insertAsLastChild() seems to be the operator but there doesn't appear to be such a thing as insertAsFirstChild() or insertAsNextChild() so I am not sure where to go from here.

p.insertAsNthChild(0)

You can discover this using Alt-0 p.insert<tab>.

Edward

Rob

unread,
Jun 13, 2019, 6:45:17 PM6/13/19
to leo-editor
Alt-0 opens up a small window with the text of the current node; no option to add anything else or interact with it in any way that I can tell. This is in Windows.

Rob...

Chris George

unread,
Jun 13, 2019, 9:43:58 PM6/13/19
to leo-e...@googlegroups.com
For me, Alt-o opens the Outline menu. Alt-0 (zero) opens the vr pane with a render of whatever is in the body.

Chris

--
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+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.

Matt Wilkie

unread,
Jun 14, 2019, 1:41:13 AM6/14/19
to leo-editor
I think I get the same as Rob. Maybe the little window is an undocked vr pane?


On Thursday, 13 June 2019 18:43:58 UTC-7, Chris George wrote:
For me, Alt-o opens the Outline menu. Alt-0 (zero) opens the vr pane with a render of whatever is in the body.

Chris

On Thu, Jun 13, 2019 at 3:45 PM Rob <lar...@gmail.com> wrote:
Alt-0 opens up a small window with the text of the current node; no option to add anything else or interact with it in any way that I can tell. This is in Windows.

Rob...

On Thursday, June 13, 2019 at 11:55:35 AM UTC-4, Edward K. Ream wrote:


On Thu, Jun 13, 2019 at 10:23 AM Chris George <techn...@gmail.com> wrote:
Hi Rob,

I think this is a good place to start: c_ec.extract & helpers.


insertAsLastChild() seems to be the operator but there doesn't appear to be such a thing as insertAsFirstChild() or insertAsNextChild() so I am not sure where to go from here.

p.insertAsNthChild(0)

You can discover this using Alt-0 p.insert<tab>.

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-e...@googlegroups.com.

Edward K. Ream

unread,
Jun 14, 2019, 2:23:21 AM6/14/19
to leo-editor
On Thu, Jun 13, 2019 at 10:55 AM Edward K. Ream <edre...@gmail.com> wrote:

You can discover this using Alt-0 p.insert<tab>.

Correction: Alt-1 toggles the autocompleter.

Edward
Reply all
Reply to author
Forward
0 new messages