Skip Menu |

This queue is for tickets about the Org-Parser CPAN distribution.

Report information
The Basics
Id: 98375
Status: resolved
Priority: 0/
Queue: Org-Parser

People
Owner: Nobody in particular
Requestors: bernt.budde [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: TODO states are not reset with repeated calls to parse -- even for new Org::Parser objects
Date: Thu, 28 Aug 2014 06:23:33 +0300
To: "bug-Org-Parser [...] rt.cpan.org" <bug-Org-Parser [...] rt.cpan.org>
From: Bernt Budde <bernt.budde [...] gmail.com>
Hi, Me again! :-) $ perl -MData::Dumper -MOrg::Parser -E \ '$op=Org::Parser->new(); $doc = $op->parse("#+TODO: TODO FOO | DONE\n* FOO DUH"); say Dumper $doc; say "-" x 70; $doc= $op->parse("#+TODO: TODO BAR | DONE\n* BAR duh"); say Dumper $doc;' The first document is OK, the second one fails to set BAR as TODO state. For the first document it is: 'text' => 'DUH', For the second document it is: 'text' => 'BAR duh', That is, it seems to only set the TODO states once in a call. It doesn't even help if you create a new parse object with an added $op=Org::Parser->new(); before the second call to parse(). (This took some time to find since I read through my own code a few times first; it is getting light outside again, so I won't go over your code and find the problem. :-) If you haven't fixed this when I have time next, I'll look more at it myself.) Thanks, /Bernt Budde PS As you might remember, I'm trying to make a simple web subset of an Org editor with Org::Parser. While checking out TODO:s I almost fell over backwards when I saw this: https://www.gnu.org/software/emacs/manual/html_node/org/Per_002dfile-keywords.html Look at the "A setup for using several sets in parallel would be:" part. I.e., Org Mode allows several sets of todo keywords and switching _inside_ a given subset! Totally new to me. Really cool. The problem is that my todo list for my editor seems to be longer than my present code. :-) DS
On Wed Aug 27 23:23:44 2014, bernt.budde@gmail.com wrote: Show quoted text
> Hi, > > Me again! :-) > > $ perl -MData::Dumper -MOrg::Parser -E \ > '$op=Org::Parser->new(); $doc = $op->parse("#+TODO: TODO FOO | > DONE\n* > FOO DUH"); say Dumper $doc; say "-" x 70; $doc= $op->parse("#+TODO: > TODO > BAR | DONE\n* BAR duh"); say Dumper $doc;' > > The first document is OK, the second one fails to set BAR as TODO > state. > > For the first document it is: > 'text' => > 'DUH', > For the second document it is: > 'text' => > 'BAR > duh', > > That is, it seems to only set the TODO states once in a call. > > It doesn't even help if you create a new parse object with an added > $op=Org::Parser->new(); before the second call to parse(). > > (This took some time to find since I read through my own code a few > times > first; it is getting light outside again, so I won't go over your code > and > find the problem. :-) If you haven't fixed this when I have time next, > I'll > look more at it myself.) > > Thanks, > > /Bernt Budde > > > PS > As you might remember, I'm trying to make a simple web subset of an > Org > editor with Org::Parser. > > While checking out TODO:s I almost fell over backwards when I saw > this: > > https://www.gnu.org/software/emacs/manual/html_node/org/Per_002dfile- > keywords.html > > Look at the "A setup for using several sets in parallel would be:" > part. > > I.e., Org Mode allows several sets of todo keywords and switching > _inside_ > a given subset! Totally new to me. Really cool.
Welcome back! :) I've fixed the persistent todo states (and priorities too) problem. It was caused by the use of /o regex modifier. The newly released 0.40 contains this fix. Thanks for the heads up on the parallel todo set ('parallel' is a bit confusing terminology, but oh well). I didn't know about it too, seems rather new. It would really be useful, as I often find myself annoyedly cycle between too many todo states. I have bugs as well as normal todo items in my todo file, and it would be nice to only cycle between (BUG - CANTREPRO - NOTBUG - WONTFIX - FIXED) for bugs, for example. Show quoted text
> The problem is that my todo list for my editor seems to be longer than > my > present code. :-) > DS
All the more reason to work on your editor so you can manage that todo list with it :-) Regards, Steven