alphapapa / org-super-agenda

Supercharge your Org daily/weekly agenda by grouping items
GNU General Public License v3.0
1.35k stars 107 forks source link

:with-time argument for timestamp selectors #204

Open tenklo opened 3 years ago

tenklo commented 3 years ago

Frist of all: This is another really great package. Thank you for your hard work!

There is the :date selector, which gives you the options to group items with or without a date. Correspondingly it would be great to have some kind of :hour (or any other name) selector to group by items with hour specifications. Meaning ':hour t' would match Item 1 and ignore Item 2, while ':hour nil' would ignore Item 1 and match Item 2:

My solution is this predicate function, in case anybode else needs something similar for now.

(defun my-org-hour-specification-p (item)
  (s-matches? "[0-9][0-9]?:[0-9][0-9]" item))

(let ((org-super-agenda-groups
       '((:pred my-org-hour-specification-p))))
  (org-agenda-list))

Still, in my opinion this would be a nice enhancement to have built in.

alphapapa commented 3 years ago

Seems reasonable. It should probably follow the pattern of org-ql: https://github.com/alphapapa/org-ql/commit/87b3d0bd972c357d5d80005e99e012209e6c0d2f

mskorzhinskiy commented 2 years ago

I am personally do the following in my groups:

                   (:name "Agenda"      :order 2
                    :regexp ,org-scheduled-time-hour-regexp)

Would be nice if org-super-agenda would support the :with-time too.