From mboxrd@z Thu Jan 1 00:00:00 1970 From: garjola@garjola.net Subject: Re: Converting tags to TODO states Date: Tue, 16 Apr 2019 18:36:51 +0200 Message-ID: <871s21ewkc.fsf@pc-117-162.i-did-not-set--mail-host-address--so-tickle-me> References: <87mukrwbxu.fsf@pc-117-162.i-did-not-set--mail-host-address--so-tickle-me> <87pnpm84jr.fsf@norang.ca> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:55726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGR50-0007kV-In for emacs-orgmode@gnu.org; Tue, 16 Apr 2019 12:37:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hGR4z-0004aD-KB for emacs-orgmode@gnu.org; Tue, 16 Apr 2019 12:37:06 -0400 Received: from 4.mo178.mail-out.ovh.net ([46.105.49.171]:53375) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hGR4z-0004XI-Bl for emacs-orgmode@gnu.org; Tue, 16 Apr 2019 12:37:05 -0400 Received: from player787.ha.ovh.net (unknown [10.109.143.216]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id 0229A5BFE4 for ; Tue, 16 Apr 2019 18:36:55 +0200 (CEST) In-Reply-To: <87pnpm84jr.fsf@norang.ca> (Bernt Hansen's message of "Tue, 16 Apr 2019 09:26:16 -0400") 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: Bernt Hansen Cc: emacs-orgmode@gnu.org On Tue 16-Apr-2019 at 15:26:16 +02, Bernt Hansen wrote: > 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 Hi Bernt, You just made me discover that one can change tags on bulk. I have used bulk operations for rescheduling, but not for this. That's great! Thanks! --