Return hint in error if body and drawer positions cause an org-fc ID missing error

This is a very weird issue, and has repeatedly occurred whenever encountering this card.

message: condition-case: ID 023ad564-551b-4f7c-aa7e-84f5471f6a53 not found in /home/seneca/.data/org/notes/notes.org

The strange part is that when I search for this id in the file, I get the card.

card in question:

** Emacs
*** bookmark.el
**** bookmark-set
***** Description :fc:
Set bookmark at any /point/ - in org files, in code files, in PDFs.
:FC_CREATED: 2020-09-18T10:10:52Z
:FC_TYPE:  normal
:ID:       023ad564-551b-4f7c-aa7e-84f5471f6a53
| position | ease | box | interval | due                  |
| front    |  3.0 |   0 |        0 | 2020-09-18T10:10:53Z |
Set a bookmark named NAME at the current location.

If NAME is nil, then prompt the user.

I've reviewed this file at least 3 times and this issue has only occurred with this particular card.

I'm going to attempt to re-init the card and see whether this happens again. If not, let's just leave this up in case I encounter this again in the next month.

Assigned to
3 years ago
2 years ago

~l3kn 3 years ago

I think the problem is that your heading has some text before the :PROPERTIES: block, so it's not parsed correctly (on the side of org mode).

~xyank 3 years ago*

I tested it - you are right.

That's a crazy "gotcha" to be honest - at least for me, I didn't expect text based parsers to behave like this. Can we add a hint to this in the error function's output? Or maybe a message that gives a hint regarding this issue.

~l3kn 3 years ago

I've not seen it mentioned in the org-mode docs, but the functions for reading headline properties only work when the property drawer immediately follows the heading.

The awk parser doesn't care about that, as long as the properties block is inside the heading. I think that the awk parser should match the behaviour of org mode, a hint in the error output is a good idea.

Register here or Log in to comment, or comment via email.