alphapapa / org-super-agenda

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

Separating Deadline and Scheduled entries of the same task #238

Open real-or-random opened 1 year ago

real-or-random commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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.