all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ox-icalendar: Filter todo-types
@ 2024-06-22 16:33 Michaël Cadilhac
  2024-06-22 23:28 ` Jack Kamm
  0 siblings, 1 reply; 7+ messages in thread
From: Michaël Cadilhac @ 2024-06-22 16:33 UTC (permalink / raw)
  To: Org-Mode mailing list

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-24  7:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-22 16:33 ox-icalendar: Filter todo-types Michaël Cadilhac
2024-06-22 23:28 ` Jack Kamm
2024-06-23 11:27   ` Ihor Radchenko
2024-06-23 12:03     ` Michaël Cadilhac
2024-06-23 13:16       ` Ihor Radchenko
2024-06-24  6:38         ` Jack Kamm
2024-06-24  7:23           ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.