瀏覽代碼

org-icalendar.el: Fix bug.

* org-icalendar.el (org-icalendar-print-entries): Fix bug:
when `org-icalendar-use-plain-timestamp' is nil, scheduled and
deadline items should not be ignored.

Thanks to Friedrich Delgado for reporting this.
Bastien Guerry 12 年之前
父節點
當前提交
7d8f69068e
共有 1 個文件被更改,包括 7 次插入10 次删除
  1. 7 10
      lisp/org-icalendar.el

+ 7 - 10
lisp/org-icalendar.el

@@ -361,24 +361,21 @@ When COMBINE is non nil, add the category to each line."
 		alarm-time (if alarm-time (string-to-number alarm-time) 0)
 		alarm ""
 		deadlinep nil scheduledp nil)
+	  (setq tmp (buffer-substring (max (point-min) (- pos org-ds-keyword-length)) pos)
+		deadlinep (string-match org-deadline-regexp tmp)
+		scheduledp (string-match org-scheduled-regexp tmp)
+		todo (org-get-todo-state))
+	  ;; donep (org-entry-is-done-p)
 	  (if (looking-at re2)
 	      (progn
 		(goto-char (match-end 0))
 		(setq ts2 (match-string 1)
 		      inc (not (string-match "[0-9]\\{1,2\\}:[0-9][0-9]" ts2))))
-	    (setq tmp (buffer-substring (max (point-min)
-					     (- pos org-ds-keyword-length))
-					pos)
-		  ts2 (if (string-match "[0-9]\\{1,2\\}:[0-9][0-9]-\\([0-9]\\{1,2\\}:[0-9][0-9]\\)" ts)
+	    (setq ts2 (if (string-match "[0-9]\\{1,2\\}:[0-9][0-9]-\\([0-9]\\{1,2\\}:[0-9][0-9]\\)" ts)
 			  (progn
 			    (setq inc nil)
 			    (replace-match "\\1" t nil ts))
-			ts)
-		  deadlinep (string-match org-deadline-regexp tmp)
-		  scheduledp (string-match org-scheduled-regexp tmp)
-		  todo (org-get-todo-state)
-		  ;; donep (org-entry-is-done-p)
-		  ))
+			ts)))
 	  (when (and (not org-icalendar-use-plain-timestamp)
 		     (not deadlinep) (not scheduledp))
 	    (throw :skip t))