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

:with-time argument for timestamp selectors #204

Open
tenklo opened this issue Sep 26, 2021 · 2 comments
Open

:with-time argument for timestamp selectors #204

tenklo opened this issue Sep 26, 2021 · 2 comments
Assignees
Milestone

Comments

@tenklo
Copy link

tenklo commented Sep 26, 2021

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:

  • Item 1
    SCHEDULED: <2021-09-26 Sun 15:00>
  • Item 2
    SCHEDULED: <2021-09-26 Sun>

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
Copy link
Owner

Seems reasonable. It should probably follow the pattern of org-ql: alphapapa/org-ql@87b3d0b

@alphapapa alphapapa changed the title Selector to match against hour specifications in timestamps :with-time argument for timestamp selectors Sep 27, 2021
@mskorzhinskiy
Copy link

mskorzhinskiy commented Dec 27, 2021

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.

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

No branches or pull requests

3 participants