emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dan Davison <davison@stats.ox.ac.uk>
To: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: suggestion: converting plain lists to subtrees
Date: Tue, 21 Jul 2009 14:09:21 -0400	[thread overview]
Message-ID: <87tz15zz5a.fsf@stats.ox.ac.uk> (raw)
In-Reply-To: 4b11f87e0907211021n524f5e78vec070528f3a9092b@mail.gmail.com

Ilya Shlyakhter <ilya_shl@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

  reply	other threads:[~2009-07-21 18:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 17:21 suggestion: converting plain lists to subtrees Ilya Shlyakhter
2009-07-21 18:09 ` Dan Davison [this message]
2009-07-21 20:23   ` Bastien
2009-07-24  8:03     ` Christian Egli
2009-07-25 11:57       ` Bastien
2009-07-25 22:12 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tz15zz5a.fsf@stats.ox.ac.uk \
    --to=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=ilya_shl@alum.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).