]> code.delx.au - gnu-emacs/commitdiff
Merge branch 'uj-icalendar-bug#5433'
authorUlf Jasper <ulf.jasper@web.de>
Mon, 17 Nov 2014 20:00:24 +0000 (21:00 +0100)
committerUlf Jasper <ulf.jasper@web.de>
Mon, 17 Nov 2014 20:00:24 +0000 (21:00 +0100)
1  2 
lisp/ChangeLog
lisp/calendar/icalendar.el
test/ChangeLog
test/automated/icalendar-tests.el

diff --cc lisp/ChangeLog
index c30a2dd9b4d4a93ea8b10cbffb31af830ec5a8ad,2bca643199f05a23add9930c2058470be5d667f4..b232210f3c75d35bbb7515cb53928f7c8febbaea
@@@ -1,70 -1,16 +1,79 @@@
+ 2014-11-17  Ulf Jasper  <ulf.jasper@web.de>
+       * calendar/icalendar.el (icalendar-export-alarms): New
+       customizable variable.
+       (icalendar-export-region): Export alarms as specified in
+       `icalendar-export-alarms'.
+       (icalendar--create-ical-alarm, icalendar--do-create-ical-alarm):
+       New functions for exporting alarms.
 +2014-11-17  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Port new time stamp handling to old Emacs and to XEmacs.
 +      This is needed for Gnus, which copies time-date.el and which
 +      runs on older Emacs implementations.
 +      * calendar/time-date.el (with-decoded-time-value):
 +      Handle 'nil' and floating-point arg more compatibly with new Emacs.
 +      (encode-time-value, with-decoded-time-value):
 +      Obsolete only if new Emacs.
 +      (time-add, time-subtract, time-less-p): Define if not new Emacs.
 +
 +      Improve time stamp handling, and be more consistent about it.
 +      This implements a suggestion made in:
 +      http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00587.html
 +      Among other things, this means timer.el no longer needs to
 +      autoload the time-date module.
 +      * allout-widgets.el (allout-elapsed-time-seconds): Doc fix.
 +      * arc-mode.el (archive-ar-summarize):
 +      * calendar/time-date.el (seconds-to-time, days-to-time, time-since):
 +      * emacs-lisp/timer.el (timer-relative-time, timer-event-handler)
 +      (run-at-time, with-timeout-suspend, with-timeout-unsuspend):
 +      * net/tramp.el (tramp-time-less-p, tramp-time-subtract):
 +      * proced.el (proced-time-lessp):
 +      * timezone.el (timezone-time-from-absolute):
 +      * type-break.el (type-break-schedule, type-break-time-sum):
 +      Simplify by using new functionality.
 +      * calendar/cal-dst.el (calendar-next-time-zone-transition):
 +      Do not return time values in obsolete and undocumented (HI . LO)
 +      format; use (HI LO) instead.
 +      * calendar/time-date.el (with-decoded-time-value):
 +      Treat 'nil' as current time.  This is mostly for XEmacs.
 +      (encode-time-value, with-decoded-time-value): Obsolete.
 +      (time-add, time-subtract, time-less-p): Use no-op autoloads, for
 +      XEmacs.  Define only if XEmacs, as they're now C builtins in Emacs.
 +      * ldefs-boot.el: Update to match new time-date.el
 +      * proced.el: Do not require time-date.
 +
 +2014-11-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/eww.el (eww-mode): Make the buffer read-only.
 +      (eww-form-text): Inhibit read-only-ness in text input fields
 +      (bug#16476).
 +
 +2014-11-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 +
 +      * simple.el (execute-extended-command--shorter): Cut search here.
 +      (execute-extended-command): Instead of here.
 +
 +2014-11-16  Fabián Ezequiel Gallina  <fgallina@gnu.org>
 +
 +      * progmodes/python.el (python-mode): Avoid use of set-local to
 +      keep Emacs 24.x compatibility.
 +
 +2014-11-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 +
 +      * net/shr.el (shr): Move to the new defgroup `web'.
 +
 +      * net/eww.el (eww): Ditto.
 +
 +      * simple.el (execute-extended-command): Don't show the help
 +      message if the binding isn't significantly shorter than the
 +      M-x command the user typed (bug#19013).
 +
  2014-11-16  Ulf Jasper  <ulf.jasper@web.de>
  
 -      * calendar/icalendar.el (icalendar--convert-tz-offset): Return
 -      complete cons when offsets of standard time and daylight saving
 +      * calendar/icalendar.el (icalendar--convert-tz-offset):
 +      Return complete cons when offsets of standard time and daylight saving
        time are equal.
        (icalendar-export-region): Fix unbound variable warning.
  
Simple merge
diff --cc test/ChangeLog
index 47bbfb36a1020b2f51e77295df315bc83db80e4a,5290ef30b42fa02b5a6de9a60967be1dcfa53c82..6e350cf8ec1865263210f4fdc341ab88ab3b89f3
@@@ -1,10 -1,11 +1,18 @@@
+ 2014-11-17  Ulf Jasper  <ulf.jasper@web.de>
+       * automated/icalendar-tests.el (icalendar-tests--test-export): New
+       optional parameter `alarms'.
+       (icalendar-export-alarms): New test for exporting icalendar
+       alarms.
+       (icalendar-tests--test-cycle): Let `icalendar-export-alarms' be nil.
 +2014-11-17  Ulf Jasper  <ulf.jasper@web.de>
 +
 +      * automated/icalendar-tests.el (icalendar-tests--test-import):
 +      Mention timezone in doc string.  Clean up.
 +      (icalendar-real-world): Add another test case for no-dst
 +      timezones.
 +
  2014-11-16  Ulf Jasper  <ulf.jasper@web.de>
  
        * automated/icalendar-tests.el (icalendar--parse-vtimezone): Add
index b45806e97775acb5c4db6fa2d803b55184422d63,ddff15544b33ce136cd0d5fc39ec14552d98c545..54546722c8cdca937a43d69386b02cd0d91c4b25
@@@ -753,6 -755,97 +755,97 @@@ RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20010
  SUMMARY:block no end time
  "))
  
 -  
+ (ert-deftest icalendar-export-alarms ()
+   "Perform export test with different settings for exporting alarms."
+   ;; no alarm
+   (icalendar-tests--test-export
+    "2014 Nov 17 19:30 no alarm"
+    "17 Nov 2014 19:30 no alarm"
+    "Nov 17 2014 19:30 no alarm"
+    "DTSTART;VALUE=DATE-TIME:20141117T193000
+ DTEND;VALUE=DATE-TIME:20141117T203000
+ SUMMARY:no alarm
+ "
+    nil)
+     ;; 10 minutes in advance, audio
+     (icalendar-tests--test-export
+      "2014 Nov 17 19:30 audio alarm"
+      "17 Nov 2014 19:30 audio alarm"
+      "Nov 17 2014 19:30 audio alarm"
+      "DTSTART;VALUE=DATE-TIME:20141117T193000
+ DTEND;VALUE=DATE-TIME:20141117T203000
+ SUMMARY:audio alarm
+ BEGIN:VALARM
+ ACTION:AUDIO
+ TRIGGER:-PT10M
+ END:VALARM
+ "
+      '(10 ((audio))))
+     ;; 20 minutes in advance, display
+     (icalendar-tests--test-export
+      "2014 Nov 17 19:30 display alarm"
+      "17 Nov 2014 19:30 display alarm"
+      "Nov 17 2014 19:30 display alarm"
+      "DTSTART;VALUE=DATE-TIME:20141117T193000
+ DTEND;VALUE=DATE-TIME:20141117T203000
+ SUMMARY:display alarm
+ BEGIN:VALARM
+ ACTION:DISPLAY
+ TRIGGER:-PT20M
+ DESCRIPTION:display alarm
+ END:VALARM
+ "
+      '(20 ((display))))
+     ;; 66 minutes in advance, email
+     (icalendar-tests--test-export
+      "2014 Nov 17 19:30 email alarm"
+      "17 Nov 2014 19:30 email alarm"
+      "Nov 17 2014 19:30 email alarm"
+      "DTSTART;VALUE=DATE-TIME:20141117T193000
+ DTEND;VALUE=DATE-TIME:20141117T203000
+ SUMMARY:email alarm
+ BEGIN:VALARM
+ ACTION:EMAIL
+ TRIGGER:-PT66M
+ DESCRIPTION:email alarm
+ SUMMARY:email alarm
+ ATTENDEE:MAILTO:att.one@email.com
+ ATTENDEE:MAILTO:att.two@email.com
+ END:VALARM
+ "
+      '(66 ((email ("att.one@email.com" "att.two@email.com")))))
+     ;; 2 minutes in advance, all alarms
+     (icalendar-tests--test-export
+      "2014 Nov 17 19:30 all alarms"
+      "17 Nov 2014 19:30 all alarms"
+      "Nov 17 2014 19:30 all alarms"
+      "DTSTART;VALUE=DATE-TIME:20141117T193000
+ DTEND;VALUE=DATE-TIME:20141117T203000
+ SUMMARY:all alarms
+ BEGIN:VALARM
+ ACTION:EMAIL
+ TRIGGER:-PT2M
+ DESCRIPTION:all alarms
+ SUMMARY:all alarms
+ ATTENDEE:MAILTO:att.one@email.com
+ ATTENDEE:MAILTO:att.two@email.com
+ END:VALARM
+ BEGIN:VALARM
+ ACTION:AUDIO
+ TRIGGER:-PT2M
+ END:VALARM
+ BEGIN:VALARM
+ ACTION:DISPLAY
+ TRIGGER:-PT2M
+ DESCRIPTION:all alarms
+ END:VALARM
+ "
+      '(2 ((email ("att.one@email.com" "att.two@email.com")) (audio) (display)))))
++
  ;; ======================================================================
  ;; Import tests
  ;; ======================================================================