orgzly-android
orgzly-android copied to clipboard
Timestamps in Properties
- [x] I have searched for existing issues that may be the same as or related to mine.
(Before I start I just want to say using Org files on my phone has gotten so much better since I found Orgzly. I especially appreciate the notifications and the home page saved search widget, being able to sync with my local folders and not needing to fire up Emacs – which is great, but not ideal on mobile – for any of the core Org Mode features. Thank you!)
As far as I've been able to find out the one place that Orgzly doesn't recognise timestamps is in the properties drawer. I tend to use timestamps in properties so they're metadata (I can label what the timestamp is), when they don't fit into the convention that schedule timestamps are begin dates like deadlines are end dates.
I would guess it shouldn't be too hard to support this; given timestamps are already parsed out of two places (headline and content), and given property drawers are already parsed, I suspect it may be possible to just run each property value through the same timestamp extraction function. (Down the road the property name could even be saved with the timestamp to display in notifications or some views, but that's more presentation and not needed for functionality.)
Any concerns or requests if I'd be interested in trying to implement it and submit a PR?
What functionality exactly are you referring to? To be able to click on the timestamp and have timestamp dialog open?
Hmmm, having the datetime picker be available for plain timestamps and timestamps in properties would be nice, but for now I was just thinking of having manually written timestamps in properties be detected (send notifications, show up in searches) – like timestamps in the headline or content body already are.
I don't have much idea what's involved in getting the picker when you could be writing non-date text, regardless of whether it's in the property text field or elsewhere.
I was just thinking of having manually written timestamps in properties be detected (send notifications, show up in searches) – like timestamps in the headline or content body already are.
Oh OK, I wasn't even aware these are used in Org mode's agenda for example.
I guess they could be treated as "note events" (plain timestamps). If so, I'd start from DataRepository#insertNoteEvents().
Hi! Sorry I'm late getting back on this. It's been a hectic year so far.
I've been thinking about this request and believe it would probably not be as simple to implement as I initially assumed, because (I presume) we will want timestamps in properties not to show up in e. searches given that property search is planned eventually. (d.today or s.today or e.today or PROPERTY.today for searching all and just e.today for searching only non-property events seems more consistent than d.today or s.today or e.today for all, PROPERTY.today for only properties and <hypothetical new selector>.today for only non-property events.)
Maybe I'm wrong about that: I'd have to go back and experiment with org-mode's search syntax to find out whether we'd be deviating from how it does things (moreso than the syntax already differs, anyway).
If I'm right about that assumption, though, then I think it makes more sense to get property searches implemented so we know how timestamps are detected there, then add notifications to them.
In any case, I'm looking forward to all the other time-related improvements that have been merged lately, so please don't hold up the next release on figuring this one out! (I'm a fan of more frequent little updates, in general.)
I think this would be a fantastic addition to the project. Mind you, I'm biased, because I'm aiming to implement a tool that puts timestamps in properties (to keep it away from the user basically, so they can type whatever they want in the body and not be distracted by the timestamp): https://github.com/Trevoke/org-gtd.el/issues/118
So I truly hope this will be implemented soon <3