[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] turn headline(s) into plain list?
From: |
Matt Lundin |
Subject: |
Re: [O] turn headline(s) into plain list? |
Date: |
Sat, 07 May 2011 10:20:06 -0400 |
User-agent: |
Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) |
Matt Lundin <address@hidden> writes:
> Gary Oberbrunner <address@hidden> writes:
>
>> Is there any way to turn a headline (and its subtree) into a plain
>> list (and nested list items)? Or better yet, turn all level N and
>> below headlines into plain lists at the corresponding level?
>
> For the latter, you could use org-map-entries:
>
> (defun org-convert-low-levels-to-list (level)
> "Convert headings in file equal or greater than LEVEL to lists.
> A numeric prefix argument can be used to set the level. The
> default level is three"
> (interactive "P")
> (let ((level (number-to-string (or level 3))))
> (org-map-entries 'org-ctrl-c-minus
> (concat "+LEVEL>=" level) 'file)))
>
As an example, the function above converts the following:
--8<---------------cut here---------------start------------->8---
* One
** Two
*** Three
**** Four
***** Five
****** Six
******* Seven
****** Six
***** Five
**** Four
*** Three
** Two
* One
--8<---------------cut here---------------end--------------->8---
To this:
--8<---------------cut here---------------start------------->8---
* One
** Two
- Three
- Four
- Five
- Six
- Seven
- Six
- Five
- Four
- Three
** Two
* One
--8<---------------cut here---------------end--------------->8---
Best,
Matt