emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <C.Dominik@uva.nl>
To: Bernt Hansen <bernt@norang.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: Converting lists to todo items and back
Date: Wed, 21 May 2008 14:03:52 +0200	[thread overview]
Message-ID: <8BA7691E-D112-44B1-A6BF-15B3F3811526@uva.nl> (raw)
In-Reply-To: <87ve187tpg.fsf@gollum.intra.norang.ca>

Hi Bernt,

this is a relative specializes application, for example you want the  
items to be turned into, not just outline headings, but also TODO  
entries.

Org has these:

C-c *      can turn an item into a headline.

However, the heading will always be a subheading of the nearest  
heading above,
so to convert your list, you should start from te end.


C-c -      can turn an headline into an item

`C-c -' will also take an active region and turn each line into an item.

My personal solution fo things like this usually is  keyboard macro.
For example, in this case

>
> ,----[ from this ]
> | * New Task
> |   - [ ] item 1
> | 	detail goes here
> | 	- more detail
> | 	- blah
> |   - [ ] item 2
> | 	More detail here
> | 	
> | 	end of detail
> |   - [ ] item 3	
> `----


I would position the cursor in "* New Task" line and then type:

C-x (            ; start keyboard macro
C-s ] RET        ; search forward to "]"
C-SPACE          ; set the mark
C-a              ; beginning of line
C-w              ; kill region
** TODO          ; Type new headline starter
C-x )            ; End kbd macro

And then type `C-x e' as often as necessary.
You can even do `C-u 200 C-x e' to get 200 repetitions in one go.

Once you have a feeling for how to write macros so that they will
safely do things, and safely position the cursor in the location
where you want it to start the next repetition, this is a really
efficient way of doing things.

If you keep doing the exact same conversion all the time,
yes, write a special command.

HTH

- Carsten

  parent reply	other threads:[~2008-05-21 12:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-20 17:48 Converting lists to todo items and back Bernt Hansen
2008-05-20 18:04 ` Paul R
2008-05-21 12:03 ` Carsten Dominik [this message]
2008-05-21 12:54   ` Bernt Hansen
2008-05-21 13:06     ` Carsten Dominik

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=8BA7691E-D112-44B1-A6BF-15B3F3811526@uva.nl \
    --to=c.dominik@uva.nl \
    --cc=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    /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).