diff options
author | Bastien Guerry <bzg@altern.org> | 2012-08-22 02:41:18 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-08-22 02:41:18 +0200 |
commit | 7d8f69068e2ba01ff7e744f981755b1dc6d50cff (patch) | |
tree | ee54352f2e3c2f0d296ee7c8e7e19c240ab3cafa | |
parent | 655c7fb3607a2f2cc1cd20f6e27b3d368d7971e7 (diff) | |
download | org-mode-7d8f69068e2ba01ff7e744f981755b1dc6d50cff.tar.gz |
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.
-rw-r--r-- | lisp/org-icalendar.el | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lisp/org-icalendar.el b/lisp/org-icalendar.el index bab366f..568cd20 100644 --- a/lisp/org-icalendar.el +++ b/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)) |