Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamps as property values don't land in timestamps table #27

Open
aviav opened this issue Aug 14, 2024 · 2 comments
Open

Timestamps as property values don't land in timestamps table #27

aviav opened this issue Aug 14, 2024 · 2 comments

Comments

@aviav
Copy link
Contributor

aviav commented Aug 14, 2024

Another day, another feature I'd like to have: Timestamps can be used in/as property values, like in

* Example
:PROPERTIES:
:EXAMPLE_TIMESTAMP: [2024-08-14 Wed 07:15]
:END:

If I implement this, my first idea would be to, in addition to parsing the timestamp and adding it to the timestamps table, add a property_timestamps table, inspired by headline_properties, since this is how org-sql tracks one-to-many relationships from what I can tell.

As always, I'd appreciate thoughts on this.

As an aside, I found a Reddit post where somebody started to catalogue places where one can use timestamps in Org Mode, and what difference the place makes to how the timestamp is interpreted.

@ndwarshuis
Copy link
Owner

This should be easy. org-element stores all node property values as strings (even timestamps), so they will need to be parsed using org-ml-from-string or similar. Other than that org-element does care and shouldn't be affected by the caveats in the reddit thread so long as the property drawer is valid

@aviav
Copy link
Contributor Author

aviav commented Aug 22, 2024

Thanks for the info! I'll look into it as soon as I encounter this as an obstacle again. I think for the use case that I had in the beginning of the week, I made into sub-headlines what I had first set out to describe using timestamp properties, which is already well-supported by org-sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants