From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Dickens <michael.dickens@affirm.com> Subject: Bug: Custom TODO fields not rendered when preceded by priority [9.1.14 (9.1.14-9-g131531-elpaplus @ /Users/michaeldickens/.emacs.d/elpa/org-plus-contrib-20181217/)] Date: Wed, 23 Oct 2019 10:29:08 -0700 Message-ID: <CABekO9jTz0UYYe1xZ8i0c_N2qf4POonc4nPgKYXcySYo3iA0gg@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bbbd27059597414e" Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org> Received: from eggs.gnu.org ([2001:470:142:3::10]:58368) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <michael.dickens@affirm.com>) id 1iNKRm-0001gO-4W for emacs-orgmode@gnu.org; Wed, 23 Oct 2019 13:29:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <michael.dickens@affirm.com>) id 1iNKRk-0008T4-LF for emacs-orgmode@gnu.org; Wed, 23 Oct 2019 13:29:21 -0400 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]:42572) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <michael.dickens@affirm.com>) id 1iNKRk-0008SR-Er for emacs-orgmode@gnu.org; Wed, 23 Oct 2019 13:29:20 -0400 Received: by mail-oi1-x235.google.com with SMTP id i185so18078033oif.9 for <emacs-orgmode@gnu.org>; Wed, 23 Oct 2019 10:29:20 -0700 (PDT) List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>, <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode> List-Post: <mailto:emacs-orgmode@gnu.org> List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>, <mailto:emacs-orgmode-request@gnu.org?subject=subscribe> Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org> To: emacs-orgmode@gnu.org --000000000000bbbd27059597414e Content-Type: text/plain; charset="UTF-8" Hi, It seems that org-mode does not correctly parse custom to-do states when they are preceded by a priority. This example org-mode file demonstrates the issue: #+TODO: TODO BLOCKED DONE * TODO [#A] this works * BLOCKED [#A] this works * [#A] TODO this works * [#A] BLOCKED this does not work On the first three lines, Emacs correctly recognizes the to-do state and renders it as a different color, and commands to cycle the state work correctly. But on the fourth line, Emacs doesn't understand that 'BLOCKED' is supposed to be a to-do state, and if I cycle the state with C-c C-t, it adds the keyword to before the priority, like this: * TODO [#A] BLOCKED this does not work To make sure it wasn't an issue with my config, I asked an Emacs-using coworker to replicate, and his didn't work either, but it behaved incorrectly on both lines 3 and 4, whereas mine behaves correctly on line 3 but not on line 4. You could argue that this is expected behavior and the priority should go after the to-do state, but IMO it should work either way because it can still be unambiguously parsed. I have some Emacs extensions that automatically put the priority before the to-do state, which then causes Emacs to parse the header incorrectly. Thanks, Michael Emacs : GNU Emacs 26.1 (build 1, x86_64-apple-darwin18.2.0, Carbon Version 158 AppKit 1671.1) of 2018-12-13 Package: Org mode version 9.1.14 (9.1.14-9-g131531-elpaplus @ /Users/michaeldickens/.emacs.d/elpa/org-plus-contrib-20181217/) --000000000000bbbd27059597414e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><span style=3D"color:rgb(0,0,0);font-family:Helvetica;font= -size:12px">Hi,</span><br style=3D"color:rgb(0,0,0);font-family:Helvetica;f= ont-size:12px"><br style=3D"color:rgb(0,0,0);font-family:Helvetica;font-siz= e:12px"><span style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12p= x">It seems that org-mode does not correctly parse custom to-do states when= </span><br style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px">= <span style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px">they = are preceded by a priority. This example org-mode file demonstrates</span><= br style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span st= yle=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px">the issue:</s= pan><br style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br= style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span clas= s=3D"gmail-Apple-converted-space" style=3D"color:rgb(0,0,0);font-family:Hel= vetica;font-size:12px">=C2=A0=C2=A0=C2=A0</span><span style=3D"color:rgb(0,= 0,0);font-family:Helvetica;font-size:12px"><span class=3D"gmail-Apple-conve= rted-space">=C2=A0</span>#+TODO: TODO BLOCKED DONE</span><br style=3D"color= :rgb(0,0,0);font-family:Helvetica;font-size:12px"><span class=3D"gmail-Appl= e-converted-space" style=3D"color:rgb(0,0,0);font-family:Helvetica;font-siz= e:12px">=C2=A0=C2=A0=C2=A0</span><span style=3D"color:rgb(0,0,0);font-famil= y:Helvetica;font-size:12px"><span class=3D"gmail-Apple-converted-space">=C2= =A0</span>* TODO [#A] this works</span><br style=3D"color:rgb(0,0,0);font-f= amily:Helvetica;font-size:12px"><span class=3D"gmail-Apple-converted-space"= style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px">=C2=A0=C2= =A0=C2=A0</span><span style=3D"color:rgb(0,0,0);font-family:Helvetica;font-= size:12px"><span class=3D"gmail-Apple-converted-space">=C2=A0</span>* BLOCK= ED [#A] this works</span><br style=3D"color:rgb(0,0,0);font-family:Helvetic= a;font-size:12px"><span class=3D"gmail-Apple-converted-space" style=3D"colo= r:rgb(0,0,0);font-family:Helvetica;font-size:12px">=C2=A0=C2=A0=C2=A0</span= ><span style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><spa= n class=3D"gmail-Apple-converted-space">=C2=A0</span>* [#A] TODO this works= </span><br style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px">= <span class=3D"gmail-Apple-converted-space" style=3D"color:rgb(0,0,0);font-= family:Helvetica;font-size:12px">=C2=A0=C2=A0=C2=A0</span><span style=3D"co= lor:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span class=3D"gmail-A= pple-converted-space">=C2=A0</span>* [#A] BLOCKED this does not work</span>= <br style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br sty= le=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span style=3D= "color:rgb(0,0,0);font-family:Helvetica;font-size:12px">On the first three = lines, Emacs correctly recognizes the to-do state and</span><br style=3D"co= lor:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span style=3D"color:r= gb(0,0,0);font-family:Helvetica;font-size:12px">renders it as a different c= olor, and commands to cycle the state work</span><br style=3D"color:rgb(0,0= ,0);font-family:Helvetica;font-size:12px"><span style=3D"color:rgb(0,0,0);f= ont-family:Helvetica;font-size:12px">correctly. But on the fourth line, Ema= cs doesn't understand that</span><br style=3D"color:rgb(0,0,0);font-fam= ily:Helvetica;font-size:12px"><span style=3D"color:rgb(0,0,0);font-family:H= elvetica;font-size:12px">'BLOCKED' is supposed to be a to-do state,= and if I cycle the state with</span><br style=3D"color:rgb(0,0,0);font-fam= ily:Helvetica;font-size:12px"><span style=3D"color:rgb(0,0,0);font-family:H= elvetica;font-size:12px">C-c C-t, it adds the keyword to before the priorit= y, like this:</span><br style=3D"color:rgb(0,0,0);font-family:Helvetica;fon= t-size:12px"><br style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:= 12px"><span class=3D"gmail-Apple-converted-space" style=3D"color:rgb(0,0,0)= ;font-family:Helvetica;font-size:12px">=C2=A0=C2=A0=C2=A0</span><span style= =3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span class=3D"g= mail-Apple-converted-space">=C2=A0</span>* TODO [#A] BLOCKED this does not = work</span><br style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12= px"><br style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><sp= an style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px">To make = sure it wasn't an issue with my config, I asked an Emacs-using</span><b= r style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span sty= le=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px">coworker to re= plicate, and his didn't work either, but it behaved</span><br style=3D"= color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span style=3D"color= :rgb(0,0,0);font-family:Helvetica;font-size:12px">incorrectly on both lines= 3 and 4, whereas mine behaves correctly on</span><br style=3D"color:rgb(0,= 0,0);font-family:Helvetica;font-size:12px"><span style=3D"color:rgb(0,0,0);= font-family:Helvetica;font-size:12px">line 3 but not on line 4.</span><br s= tyle=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br style=3D= "color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span style=3D"colo= r:rgb(0,0,0);font-family:Helvetica;font-size:12px">You could argue that thi= s is expected behavior and the priority should</span><br style=3D"color:rgb= (0,0,0);font-family:Helvetica;font-size:12px"><span style=3D"color:rgb(0,0,= 0);font-family:Helvetica;font-size:12px">go after the to-do state, but IMO = it should work either way because it</span><br style=3D"color:rgb(0,0,0);fo= nt-family:Helvetica;font-size:12px"><span style=3D"color:rgb(0,0,0);font-fa= mily:Helvetica;font-size:12px">can still be unambiguously parsed. I have so= me Emacs extensions that</span><br style=3D"color:rgb(0,0,0);font-family:He= lvetica;font-size:12px"><span style=3D"color:rgb(0,0,0);font-family:Helveti= ca;font-size:12px">automatically put the priority before the to-do state, w= hich then causes</span><br style=3D"color:rgb(0,0,0);font-family:Helvetica;= font-size:12px"><span style=3D"color:rgb(0,0,0);font-family:Helvetica;font-= size:12px">Emacs to parse the header incorrectly.</span><br style=3D"color:= rgb(0,0,0);font-family:Helvetica;font-size:12px"><br style=3D"color:rgb(0,0= ,0);font-family:Helvetica;font-size:12px"><span style=3D"color:rgb(0,0,0);f= ont-family:Helvetica;font-size:12px">Thanks,</span><br style=3D"color:rgb(0= ,0,0);font-family:Helvetica;font-size:12px"><span style=3D"color:rgb(0,0,0)= ;font-family:Helvetica;font-size:12px">Michael</span><br style=3D"color:rgb= (0,0,0);font-family:Helvetica;font-size:12px"><br style=3D"color:rgb(0,0,0)= ;font-family:Helvetica;font-size:12px"><span style=3D"color:rgb(0,0,0);font= -family:Helvetica;font-size:12px">Emacs</span><span class=3D"gmail-Apple-co= nverted-space" style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12= px">=C2=A0</span><span style=3D"color:rgb(0,0,0);font-family:Helvetica;font= -size:12px"><span class=3D"gmail-Apple-converted-space">=C2=A0</span>: GNU = Emacs 26.1 (build 1, x86_64-apple-darwin18.2.0, Carbon Version 158 AppKit 1= 671.1)</span><br style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:= 12px"><span style=3D"color:rgb(0,0,0);font-family:Helvetica;font-size:12px"= >of 2018-12-13</span><br style=3D"color:rgb(0,0,0);font-family:Helvetica;fo= nt-size:12px"><span style=3D"color:rgb(0,0,0);font-family:Helvetica;font-si= ze:12px">Package: Org mode version 9.1.14 (9.1.14-9-g131531-elpaplus @ /Use= rs/michaeldickens/.emacs.d/elpa/org-plus-contrib-20181217/)</span><br></div= > --000000000000bbbd27059597414e--