1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-15 09:47:01 +00:00

org-icalendar.el: Let APPT_WARNTIME take precedence over ̀org-icalendar-alarm-time'.

* org-icalendar.el (org-print-icalendar-entries): Let
APPT_WARNTIME take precedence over ̀org-icalendar-alarm-time'.
This commit is contained in:
Bastien Guerry 2012-08-05 11:30:23 +02:00
parent de271e3751
commit 216768531f

View File

@ -359,6 +359,8 @@ When COMBINE is non nil, add the category to each line."
(org-id-get-create) (org-id-get-create)
(or (org-id-get) (org-id-new))) (or (org-id-get) (org-id-new)))
categories (org-export-get-categories) categories (org-export-get-categories)
alarm-time (org-entry-get nil "APPT_WARNTIME")
alarm-time (when alarm-time (string-to-number alarm-time))
alarm "" alarm ""
deadlinep nil scheduledp nil) deadlinep nil scheduledp nil)
(if (looking-at re2) (if (looking-at re2)
@ -419,11 +421,11 @@ When COMBINE is non nil, add the category to each line."
;; (c) only a DISPLAY action is defined. ;; (c) only a DISPLAY action is defined.
;; [ESF] ;; [ESF]
(let ((t1 (ignore-errors (org-parse-time-string ts 'nodefault)))) (let ((t1 (ignore-errors (org-parse-time-string ts 'nodefault))))
(if (and (> org-icalendar-alarm-time 0) (if (and (or (> alarm-time 0) (> org-icalendar-alarm-time 0))
(car t1) (nth 1 t1) (nth 2 t1)) (car t1) (nth 1 t1) (nth 2 t1))
(setq alarm (format "\nBEGIN:VALARM\nACTION:DISPLAY\nDESCRIPTION:%s\nTRIGGER:-P0DT0H%dM0S\nEND:VALARM" summary org-icalendar-alarm-time)) (setq alarm (format "\nBEGIN:VALARM\nACTION:DISPLAY\nDESCRIPTION:%s\nTRIGGER:-P0DT0H%dM0S\nEND:VALARM"
(setq alarm "")) summary (or alarm-time org-icalendar-alarm-time)))
) (setq alarm "")))
(if (string-match org-bracket-link-regexp summary) (if (string-match org-bracket-link-regexp summary)
(setq summary (setq summary
(replace-match (if (match-end 3) (replace-match (if (match-end 3)