1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-23 07:18:53 +00:00

icalendar: Make alarm duration RFC5545 compliant

* org-icalendar.el (org-print-icalendar-entries): Make alarm duration
RFC5545 compliant.

The format of alarm trigger was incorrect because "T" letter from
dur-time element was missing (see
http://tools.ietf.org/html/rfc5545#section-3.3.6). This caused some
software (such as KOrganizer) to not interpret the alarms correctly.

TINYCHANGE
This commit is contained in:
Michal Sojka 2011-08-25 19:34:27 +00:00 committed by Bastien Guerry
parent 02fad0981f
commit cd8d1b095b

View File

@ -417,7 +417,7 @@ When COMBINE is non nil, add the category to each line."
(let ((t1 (ignore-errors (org-parse-time-string ts 'nodefault))))
(if (and (> org-icalendar-alarm-time 0)
(car t1) (nth 1 t1) (nth 2 t1))
(setq alarm (format "\nBEGIN:VALARM\nACTION:DISPLAY\nDESCRIPTION:%s\nTRIGGER:-P0D0H%dM0S\nEND:VALARM" summary org-icalendar-alarm-time))
(setq alarm (format "\nBEGIN:VALARM\nACTION:DISPLAY\nDESCRIPTION:%s\nTRIGGER:-P0DT0H%dM0S\nEND:VALARM" summary org-icalendar-alarm-time))
(setq alarm ""))
)
(if (string-match org-bracket-link-regexp summary)