Closed jmay closed 5 months ago
This is valid for those examples too.
* Monday, 22 January 2024
:PROPERTIES:
:CREATED: [2024-01-22 Mon]
:END:
* Monday, 22 January 2024
:PROPERTIES:
:CREATED: [2024-01-22 Mon]
:END:
* Monday, 22 January 2024
:PROPERTIES:
:CREATED: [2024-01-22 Mon]
:END:
Hmm, is more an org-mode bug IMHO.
(org-entry-get (point) "CREATED")
on the CREATED
property returns nil
in all three cases.
Verified. This is definitely an org-mode bug. I don't see a strong reason to address this specifically for org-journal. I'll wait a few days for other comments, otherwise I'll close this.
I've learned about org-lint
. Perhaps we could incorporate this into the org-journal
process somewhere. Instead of a confusing "user-error" message in the minibuffer we could open the *Org Lint*
buffer in these cases which might be a better guide to resolving such problems.
@jmay Good point! Hmm, should we report this behavior to org
? Can you create a new issue for org-lint
and close this, thank you ❤️
I got a response from the org
team. Unlikely that they will fix this.
My plan is to add something to org-journal
that detects this condition and delivers a more useful error message: instead of "user-error blah blah properties etc" it should say "There's something wrong with the PROPERTIES in file xxxx.org. Please run org-lint
to resolve."
Closing this issue. I'll submit a PR later with details.
Describe the bug
org-journal-new-entry
does not know how to deal with unexpected contents insidePROPERTIES
drawers. Should be more forgiving of bad input, maybe with warnings but not aborting.Might be related to other issues with treatment of timestamps found in unexpected formats.
To Reproduce I've experienced this with per-year journal files.
Steps to reproduce the behavior:
PROPERTIES
drawer, insert a blank line above or below theCREATED
timestamp line, save file.org-journal-new-entry
Expected behavior Should create a new journal entry in the expected place.
Optional behavior: Log some warnings to an appropriate place (
*Messages*
or*Warnings*
or anorg-journal
-specific buffer) and possible print a notification in the minibuffer.Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Your Emacs Configuration The part relevant to org-journal.
46146e7
anda306f76