emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2019-10-23 17:29 Michael Dickens
  2020-02-02  7:42 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Dickens @ 2019-10-23 17:29 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]

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/)

[-- Attachment #2: Type: text/html, Size: 7297 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 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/)]
  2019-10-23 17:29 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/)] Michael Dickens
@ 2020-02-02  7:42 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2020-02-02  7:42 UTC (permalink / raw)
  To: Michael Dickens; +Cc: emacs-orgmode

Hi Michael,

Michael Dickens <michael.dickens@affirm.com> writes:

> 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.

Org sets a few syntactic rules, the position of the priority cookie
right _after_ the TODO keyword is one of them which we don't want to
change, as it makes it easier for everyone to read Org files.

Well, because a different syntax can be unambiguously parsed does not
mean we should use this different syntax.

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-02  7:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-23 17:29 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/)] Michael Dickens
2020-02-02  7:42 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).