Re: [Orgmode] suggestion: converting plain lists to subtrees

2009-07-25 Thread Bastien
Ilya Shlyakhter ilya_...@alum.mit.edu writes:

 A suggestion for a simple but useful command: convert a plain list to
 a full-blown org subtree.

I have implemented this.

C-c C-* will convert the plain list at point into a subtree, projecting 
the structure of the list into the hierarchy of the tree.

Of course, this calls for a C-c C-- function that will do the opposite:
convert a subtree into a list.  I plan to do this using a new version of
the parser I've been working on.

Thanks for this idea!

-- 
 Bastien


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] suggestion: converting plain lists to subtrees

2009-07-21 Thread Ilya Shlyakhter
A suggestion for a simple but useful command: convert a plain list to
a full-blown org subtree.
Sometimes I start with a plain list and later realize that it is
getting complex and a full-fledged hierarchy is needed.
Converting by hand is a pain.   It would be great if this could be automated.
Thanks,
ilya


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] suggestion: converting plain lists to subtrees

2009-07-21 Thread Dan Davison
Ilya Shlyakhter ilya_...@alum.mit.edu writes:

 A suggestion for a simple but useful command: convert a plain list to
 a full-blown org subtree.

Have you seen org-toggle-heading? (C-c * when not in a table).

However, it seems that it doesn't preserve any list hierarchical
structure when converting to headlines.

Bastien -- I think C-c * could do with a mention in the manual section
on Plain Lists. Here's a patch which just copies the section on C-c *
from the Structure Editing section.

Dan

diff --git a/doc/org.texi b/doc/org.texi
index 3dc329e..75d9c79 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -1435,6 +1435,15 @@ region when calling this, all lines will be converted to 
list items.  If the
 first line already was a list item, any item markers will be removed from the
 list.  Finally, even without an active region, a normal line will be
 converted into a list item.
+...@kindex C-c *
+...@item C-c *
+Turn a normal line or plain list item into a headline (so that it
+becomes a subheading at its location). Also turn a headline into a
+normal line by removing the stars. If there is an active region, turn
+all lines in the region into headlines. If the first line in the
+region was an item, turn only the item lines into headlines. Finally,
+if the first line is a headline, remove the stars from all headlines
+in the region.
 @kindex s...@key{left}
 @kindex s...@key{right}
 @item s...@key{left}/@key{right}



 Sometimes I start with a plain list and later realize that it is
 getting complex and a full-fledged hierarchy is needed.
 Converting by hand is a pain.   It would be great if this could be automated.
 Thanks,
 ilya


 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] suggestion: converting plain lists to subtrees

2009-07-21 Thread Bastien
Dan Davison davi...@stats.ox.ac.uk writes:

 Ilya Shlyakhter ilya_...@alum.mit.edu writes:

 A suggestion for a simple but useful command: convert a plain list to
 a full-blown org subtree.

 Have you seen org-toggle-heading? (C-c * when not in a table).

 However, it seems that it doesn't preserve any list hierarchical
 structure when converting to headlines.

Yes, Ilya suggestion makes sense, I will work on this.

 Bastien -- I think C-c * could do with a mention in the manual section
 on Plain Lists. Here's a patch which just copies the section on C-c *
 from the Structure Editing section.

Applied, thanks!

-- 
 Bastien


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode