unhammer / org-upcoming-modeline

📅 Show upcoming org event in modeline
https://www.reddit.com/r/emacs/comments/k1e4eu/show_next_orgappointment_in_modeline/
GNU General Public License v2.0
31 stars 6 forks source link

Switch to org-element-map based finding of upcoming events #6

Closed swflint closed 3 years ago

swflint commented 3 years ago

This also a) de-propertizes the strings, b) cleanly handles "scheduled" items, and c) does everything in one fell swoop.

Note, if you use this, #4 is unnecessary. This would likely be more helpful.

unhammer commented 3 years ago

Could you give an example of what problem this solves?

swflint commented 3 years ago

I frequently have as headlines:

** <2020-12-02 Wed 12:00> Event

By default, the whole headline is shown, timestamp included. My headlines can get fairly long (due to inclusion of things like Zoom details, etc), and the inclusion of the timestamp can prevent that from being shown (particularly if I'm using my laptop).

unhammer commented 3 years ago

from what I can tell, this requires the timestamp to be on the headline? I typically use this format

** meet
    <2020-12-02 on. 12:00>

which doesn't seem to be parsed by this

swflint commented 3 years ago

Interesting. I'll see what I can do with that.

unhammer commented 3 years ago

btw https://github.com/unhammer/org-upcoming-modeline/tree/org-element-map was my attempt at rebasing if you want to work off the newest – note that the org-ql selector now uses (ts-now) so shouldn't need to check that timestamps are >=now outside the loop (we were doing ts-active :from 0 which ql turns into (ts-adjust :hour 0 minute 0 (ts-now)))

swflint commented 3 years ago

Superseded by #8