From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hoffman <9qobl2n02@sneakemail.com> Subject: Re: Automatically move completed TODO items and checkboxes to another file Date: Tue, 07 Sep 2010 11:58:35 -0700 Message-ID: References: <87vd793r27.wl%ucecesf@ucl.ac.uk> <87vd6nwtuq.fsf@gnu.org> <87r5h8nfaq.wl%n.goaziou@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=40953 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ot3NZ-000461-G0 for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 14:58:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ot3NY-0003qc-H8 for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 14:58:49 -0400 Received: from lo.gmane.org ([80.91.229.12]:44940) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ot3NY-0003qQ-Bk for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 14:58:48 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ot3NV-0007A5-HB for emacs-orgmode@gnu.org; Tue, 07 Sep 2010 20:58:45 +0200 Received: from methionine.gs.washington.edu ([128.208.25.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Sep 2010 20:58:45 +0200 Received: from 9qobl2n02 by methionine.gs.washington.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 07 Sep 2010 20:58:45 +0200 In-Reply-To: <87r5h8nfaq.wl%n.goaziou@gmail.com> 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: emacs-orgmode@gnu.org Nicolas Goaziou wrote: > Hello, >>>>>> Michael Hoffman writes: > >> I've also tried regex-searching for something like "^ - \[ \]" -> >> "*** TODO" but it's not foolproof since the number of leading spaces >> doesn't always have something to do with the level of the previous >> header. > > It looks like you're looking for `org-list-make-subtree' (C-c C-*) and > then replacing [CBON] with DONE and [CBOFF] with TODO. > > If it's something else, could you explain it with an example? Try this: ** TODO x - [ ] x1 - [ ] x2 - [ ] x2.1 Set the region to the checkbox lines, then do C-c C-*. The result is: ** TODO x *** [ ] x1 *** [ ] x2 *** [ ] x2.1 If you set a macro to do each line individually and move down, you instead get: ** TODO x *** [ ] x1 **** [ ] x2 ***** [ ] x2.1 I would regard the correct conversion to be: ** TODO x *** [ ] x1 *** [ ] x2 **** [ ] x2.1 I'm using Emacs 23.1.3 and org-mode 6.21b.