From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: suggestion: converting plain lists to subtrees Date: Tue, 21 Jul 2009 14:09:21 -0400 Message-ID: <87tz15zz5a.fsf@stats.ox.ac.uk> References: <4b11f87e0907211021n524f5e78vec070528f3a9092b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTJmP-0005k8-0R for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 14:09:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTJmK-0005cH-D0 for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 14:09:32 -0400 Received: from [199.232.76.173] (port=45399 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTJmK-0005c6-3s for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 14:09:28 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:55675) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTJmJ-0008D4-Ka for emacs-orgmode@gnu.org; Tue, 21 Jul 2009 14:09:27 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ilya Shlyakhter Cc: emacs-orgmode@gnu.org Ilya Shlyakhter 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