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

Separating Deadline and Scheduled entries of the same task #238

Open
real-or-random opened this issue Dec 31, 2022 · 3 comments
Open

Separating Deadline and Scheduled entries of the same task #238

real-or-random opened this issue Dec 31, 2022 · 3 comments

Comments

@real-or-random
Copy link

Is there a way to match the "type" of an item, i.e., "Scheduled:" vs "Deadline:"?

I often have tasks that appear both as "Scheduled:" and as "Deadline:" entries, and I'd like to keep the both entries, but show the "Scheduled:" type under (say) "Do Today", and the "Deadline:" type under "Due Soon:".

(Of course, I could set org-agenda-skip-deadline-prewarning-if-scheduled or a similar variable to have only one of the two entries but I'd prefer to have them both.)

@alphapapa
Copy link
Owner

Hi Tim,

Probably the easiest way to do this would be to use the :pred selector. Please see this example: https://github.com/alphapapa/org-super-agenda/blob/master/examples.org#by-predicate If you use, e.g. string-prefix-p, that should be good enough.

@real-or-random
Copy link
Author

Thanks, that works, e.g.:

  (defun tim/is-future-deadline-entry-p (item)
    (string-prefix-p "  In " item))

Do you think it would make sense to add pre-defined selectors for this kind of matching?

@alphapapa
Copy link
Owner

I'm open to the idea, sure. It might be difficult to design it in such a way that it would be easy for users to distinguish between these and the existing deadline and scheduled selectors, but we could probably figure something out.

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

2 participants