فهرست منبع

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'.
Bastien Guerry 12 سال پیش
والد
کامیت
216768531f
1فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 6 4
      lisp/org-icalendar.el

+ 6 - 4
lisp/org-icalendar.el

@@ -359,6 +359,8 @@ When COMBINE is non nil, add the category to each line."
 			(org-id-get-create)
 		      (or (org-id-get) (org-id-new)))
 		categories (org-export-get-categories)
+		alarm-time (org-entry-get nil "APPT_WARNTIME")
+		alarm-time (when alarm-time (string-to-number alarm-time))
 		alarm ""
 		deadlinep nil scheduledp nil)
 	  (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.
 	  ;; [ESF]
 	  (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))
-		(setq alarm (format "\nBEGIN:VALARM\nACTION:DISPLAY\nDESCRIPTION:%s\nTRIGGER:-P0DT0H%dM0S\nEND:VALARM" summary org-icalendar-alarm-time))
-	      (setq alarm ""))
-	    )
+		(setq alarm (format "\nBEGIN:VALARM\nACTION:DISPLAY\nDESCRIPTION:%s\nTRIGGER:-P0DT0H%dM0S\nEND:VALARM"
+				    summary (or alarm-time org-icalendar-alarm-time)))
+	      (setq alarm "")))
 	  (if (string-match org-bracket-link-regexp summary)
 	      (setq summary
 		    (replace-match (if (match-end 3)