Am Freitag, 2. November 2012 19:46:52 UTC+1 schrieb Terry:

>
> It would be easy to write a tiny script that copied the body to the 
> headline with linebreaks.  This test 
>
> p.h = 'test\nthis' 
>

Thanks for the hint, this works! I was just hoping that there is a way to 
put line breaks directly in headline edit mode so that I can do 
Shift-Return and have a line break inserted. But that would be a little 
more work I guess?
 

> which creates a two line headline, shows that the tree can handle 
> multiline headlines. 
>
> In fact I guess the tiny script would be 
>
> p.h = p.b 
>

I created two commands, edit-head-in-body and write-body-to-head and bound 
it to Alt-Shift-E and Alt-Shift-F

p.b = p.h.strip ()
c.executeMinibufferCommand ( "focus-to-body" )

and

p.h = p.b.strip ()
p.b = ""
c.executeMinibufferCommand ( "focus-to-tree" )

I tried mapping Alt-Shift-E to both commands in different panes like

edit-head-in-body ! tree = Alt-Shift-E
write-body-to-head ! body = Alt-Shift-E

But that throws a shortcut conflict error. Isn't that possible? The return 
key is mapped in a similar way in leoSettings.leo.

Stefan

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/leo-editor/-/HbmJlTpdYrkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to