Function: icalendar--do-create-ical-alarm
icalendar--do-create-ical-alarm is a byte-compiled function defined in
icalendar.el.gz.
Signature
(icalendar--do-create-ical-alarm ADVANCE-TIME ALARM-SPEC SUMMARY)
Documentation
Return a VALARM block.
Argument ADVANCE-TIME is a number giving the time when the alarm
fires (minutes before the respective event). Argument ALARM-SPEC
is a list which must be one of (audio), (display) or
(email (ADDRESS1 ...)), see icalendar-export-alarms. Argument
SUMMARY is a string which contains a short description for the
alarm.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/icalendar.el.gz
(defun icalendar--do-create-ical-alarm (advance-time alarm-spec summary)
"Return a VALARM block.
Argument ADVANCE-TIME is a number giving the time when the alarm
fires (minutes before the respective event). Argument ALARM-SPEC
is a list which must be one of (audio), (display) or
\(email (ADDRESS1 ...)), see `icalendar-export-alarms'. Argument
SUMMARY is a string which contains a short description for the
alarm."
(let* ((action (car alarm-spec))
(act (format "\nACTION:%s"
(cdr (assoc action '((audio . "AUDIO")
(display . "DISPLAY")
(email . "EMAIL"))))))
(tri (format "\nTRIGGER:-PT%dM" advance-time))
(des (if (memq action '(display email))
(format "\nDESCRIPTION:%s" summary)
""))
(sum (if (eq action 'email)
(format "\nSUMMARY:%s" summary)
""))
(att (if (eq action 'email)
(mapconcat (lambda (i)
(format "\nATTENDEE:MAILTO:%s" i))
(cadr alarm-spec) "")
"")))
(concat "\nBEGIN:VALARM" act tri des sum att "\nEND:VALARM")))