summaryrefslogtreecommitdiff
path: root/lisp/calendar
diff options
context:
space:
mode:
authorUlf Jasper <ulf.jasper@web.de>2011-07-26 17:36:04 +0200
committerUlf Jasper <ulf.jasper@web.de>2011-07-26 17:36:04 +0200
commit68575ab00b802b29b0bc74ebb3780a81a7550698 (patch)
tree62ba205f221522f676a14ef6f3d4527a32dd6586 /lisp/calendar
parentd6f0886cf1d99d80c45a8a57a7bcce42dc623c3c (diff)
downloademacs-68575ab00b802b29b0bc74ebb3780a81a7550698.tar.gz
icalendar: Take care of multiple vcalendars in a single file.
lisp/ChangeLog: * calendar/icalendar.el (icalendar--all-events): Take care of multiple vcalendars in a single file. (icalendar--convert-float-to-ical): checkdoc fixes. * automated/icalendar-tests.el (icalendar-tests--compare-strings): Removed, simply use string=. (icalendar--diarytime-to-isotime) (icalendar--datetime-to-diary-date) (icalendar--datestring-to-isodate) (icalendar--format-ical-event) (icalendar--parse-summary-and-rest) (icalendar-tests--do-test-import) (icalendar-tests--do-test-cycle) : Changed argument order of string= to EXPECTED ACTUAL. (icalendar--import-format-sample) (icalendar--format-ical-event) (icalendar-import-non-recurring) (icalendar-import-rrule) (icalendar-import-duration) (icalendar-import-bug-6766) (icalendar-real-world): Adjusted to string= instead of icalendar-tests--compare-strings. (icalendar-import-multiple-vcalendars): New.
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/icalendar.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index 03456ba36f2..3ffd55db18d 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -412,10 +412,15 @@ children."
(setq result subresult)))))
result))
- ; private
+;; private
(defun icalendar--all-events (icalendar)
"Return the list of all existing events in the given ICALENDAR."
- (icalendar--get-children (car icalendar) 'VEVENT))
+ (let ((result '()))
+ (mapc (lambda (elt)
+ (setq result (append (icalendar--get-children elt 'VEVENT)
+ result)))
+ (nreverse icalendar))
+ result))
(defun icalendar--split-value (value-string)
"Split VALUE-STRING at ';='."
@@ -1571,8 +1576,8 @@ entries. ENTRY-MAIN is the first line of the diary entry."
(n (nth 3 sexp))
(day (nth 4 sexp))
(summary
- (replace-regexp-in-string
- "\\(^\s+\\|\s+$\\)" ""
+ (replace-regexp-in-string
+ "\\(^\s+\\|\s+$\\)" ""
(buffer-substring (point) (point-max)))))
(when day
@@ -1590,7 +1595,7 @@ entries. ENTRY-MAIN is the first line of the diary entry."
(null (let ((date (calendar-current-date))
(entry entry-main))
(diary-float month dayname n)))
- (concat
+ (concat
"\nEXDATE;VALUE=DATE:"
(format-time-string "%Y%m%d" (current-time))))
"\nRRULE:"