From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Converting tags to TODO states Date: Tue, 16 Apr 2019 09:26:16 -0400 Message-ID: <87pnpm84jr.fsf@norang.ca> References: <87mukrwbxu.fsf@pc-117-162.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([209.51.188.92]:42288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGO6Z-0002CK-J4 for emacs-orgmode@gnu.org; Tue, 16 Apr 2019 09:26:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hGO6Y-0007NS-JY for emacs-orgmode@gnu.org; Tue, 16 Apr 2019 09:26:31 -0400 Received: from outbound2m.ore.mailhop.org ([54.149.155.156]:27926) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hGO6Y-0007JR-9V for emacs-orgmode@gnu.org; Tue, 16 Apr 2019 09:26:30 -0400 In-Reply-To: <87mukrwbxu.fsf@pc-117-162.i-did-not-set--mail-host-address--so-tickle-me> (garjola@garjola.net's message of "Mon, 15 Apr 2019 17:00:29 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: garjola@garjola.net Cc: emacs-orgmode@gnu.org garjola@garjola.net writes: > Hi, > > For my GTD implementation with org-mode, I have been using the :next: > tag for my next actions. I would like now to use a "NEXT" TODO keyword, > which means that I need to convert all :next: tags with "TODO" headlines > into "NEXT" headlines without the :next: tag. > > I have *a lot* of org files, so an automatic procedure is needed. Since > I am not fluent in elisp, I was going to write a python script to do > this, but maybe there is already a way to do this conversion with > org-mode itself? > > The tricky thing I see with parsing is dealing with the ":" in the case > of multiple tags (I know how to do this in python, but I don't in > elisp). > > Thanks for any hint you can provide. > > Garjola As this is a one-time change I would just use the agenda and bulk operations to fix your entries. If the files already contribute to your agenda (I assume they do) you can just run a tag match on :next: C-c a m next RET and mark all the entries returned with m (repeat for each task) then add a NEXT todo keyword B t NEXT RET and mark all the tasks again m (repeat for each task) and remove the :next: tag B - next RET and save your files. HTH, Bernt