Function: diary-icalendar-sexp-to-nodes
diary-icalendar-sexp-to-nodes is a byte-compiled function defined in
diary-icalendar.el.gz.
Signature
(diary-icalendar-sexp-to-nodes SEXP &optional VTIMEZONE)
Documentation
Convert a diary S-expression SEXP to a list of iCalendar property nodes.
The fully supported S-expressions are:
diary-anniversary
diary-block
diary-cyclic
diary-date
diary-float
diary-remind
diary-rrule
diary-time-block
There is partial support for diary-offset S-expressions; see
diary-icalendar-offset-to-nodes.
Other S-expressions are only supported via enumeration. Their
recurrences are enumerated for
diary-icalendar-export-sexp-enumeration-days starting from the current
date; see diary-icalendar-other-sexp-to-recurrence. If
diary-icalendar-export-sexp-enumerate-all is non-nil, all
S-expressions are enumerated rather than converted to recurrence rules.
VTIMEZONE, if specified, should be an icalendar-vtimezone. Times in
SEXP will be reinterpreted as local to VTIMEZONE, as UTC, or as floating
times according to diary-icalendar-time-zone-export-strategy.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/diary-icalendar.el.gz
(defun di:sexp-to-nodes (sexp &optional vtimezone)
"Convert a diary S-expression SEXP to a list of iCalendar property nodes.
The fully supported S-expressions are:
`diary-anniversary'
`diary-block'
`diary-cyclic'
`diary-date'
`diary-float'
`diary-remind'
`diary-rrule'
`diary-time-block'
There is partial support for `diary-offset' S-expressions; see
`diary-icalendar-offset-to-nodes'.
Other S-expressions are only supported via enumeration. Their
recurrences are enumerated for
`diary-icalendar-export-sexp-enumeration-days' starting from the current
date; see `diary-icalendar-other-sexp-to-recurrence'. If
`diary-icalendar-export-sexp-enumerate-all' is non-nil, all
S-expressions are enumerated rather than converted to recurrence rules.
VTIMEZONE, if specified, should be an `icalendar-vtimezone'. Times in
SEXP will be reinterpreted as local to VTIMEZONE, as UTC, or as floating
times according to `diary-icalendar-time-zone-export-strategy'."
(if di:export-sexp-enumerate-all ;; see Bug#7911 for motivation
(di:other-sexp-to-recurrence sexp)
(cl-case (car sexp)
(diary-anniversary (di:anniversary-sexp-to-recurrence sexp))
(diary-block (di:block-sexp-to-recurrence sexp))
(diary-cyclic (di:cyclic-sexp-to-recurrence sexp))
(diary-date (di:date-sexp-to-recurrence sexp))
(diary-float (di:float-sexp-to-recurrence sexp))
(diary-offset (di:offset-sexp-to-nodes sexp))
(diary-rrule (di:rrule-sexp-to-recurrence sexp vtimezone))
(diary-time-block (di:time-block-sexp-to-start-end sexp vtimezone))
;; For `diary-remind' we only handle the inner sexp:
(diary-remind (di:sexp-to-nodes (nth 1 sexp) vtimezone))
(t (di:other-sexp-to-recurrence sexp)))))