[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ox-icalendar: Filter todo-types
From: |
Michaël Cadilhac |
Subject: |
ox-icalendar: Filter todo-types |
Date: |
Sat, 22 Jun 2024 18:33:43 +0200 |
I have a task that was recurring, which I KILLED a few weeks ago. It
now looks like:
** KILLED Do the right thing
SCHEDULED: <2023-07-14 Fri +1w>
ox-icalendar still exports it every week, because I have
'event-if-not-todo in org-icalendar-use-scheduled (which is the
behavior I want for some other headers).
BEGIN:VEVENT
DTSTAMP:20240622T163042Z
UID:SC-671b3d13-f985-472a-be33-b4eeb298f2cd
DTSTART;VALUE=DATE:20230714
DTEND;VALUE=DATE:20230715
RRULE:FREQ=WEEKLY;INTERVAL=1
SUMMARY:S: KILLED Do the right thing :
CATEGORIES:todos
END:VEVENT
I do not see any way to filter on todo-type in org-calendar-entry, the
relevant bit thereof reading:
(and scheduled
(pcase todo-type
(`todo (or (memq 'event-if-todo-not-done use-scheduled)
(memq 'event-if-todo use-scheduled)))
(`done (memq 'event-if-todo use-scheduled))
(_ (memq 'event-if-not-todo use-scheduled)))
(org-icalendar--vevent
entry scheduled (concat "SC-" uid)
(concat scheduled-summary-prefix summary)
loc desc cat tz class)))
Would it be acceptable to add a variable to filter todo-types, e.g.,
with a variable org-icalendar-excluded-todo-types? More generally,
one could think of introducing a variable:
org-icalendar-entry-filter
which receives the ENTRY argument of org-icalendar-entry, and would
return non-nil if the entry is to be treated. (This is basically what
I do using an advice.)
Cheers,
Michaël
- ox-icalendar: Filter todo-types,
Michaël Cadilhac <=