diff options
| -rw-r--r-- | lisp/calendar/diary-icalendar.el | 8 | ||||
| -rw-r--r-- | lisp/calendar/icalendar-ast.el | 2 | ||||
| -rw-r--r-- | lisp/calendar/icalendar-macs.el | 17 | ||||
| -rw-r--r-- | lisp/calendar/icalendar-parser.el | 10 | ||||
| -rw-r--r-- | lisp/calendar/icalendar-recur.el | 6 | ||||
| -rw-r--r-- | lisp/calendar/icalendar-shortdoc.el | 273 | ||||
| -rw-r--r-- | lisp/calendar/icalendar-utils.el | 2 | ||||
| -rw-r--r-- | lisp/calendar/icalendar.el | 14 |
8 files changed, 309 insertions, 23 deletions
diff --git a/lisp/calendar/diary-icalendar.el b/lisp/calendar/diary-icalendar.el index 42102291298..994258dedd4 100644 --- a/lisp/calendar/diary-icalendar.el +++ b/lisp/calendar/diary-icalendar.el | |||
| @@ -24,8 +24,12 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; This file is a replacement for icalendar.el that uses a new parser | 27 | ;; For an overview of the iCalendar library, see icalendar-shortdoc.el. |
| 28 | ;; and offers more features. | 28 | |
| 29 | ;; This file is a replacement for the diary import/export features | ||
| 30 | ;; previously provided by icalendar.el. It uses a new parser and offers | ||
| 31 | ;; more flexibility and features than the old implementation. It is | ||
| 32 | ;; documented in the Emacs manual. | ||
| 29 | 33 | ||
| 30 | ;;; Code: | 34 | ;;; Code: |
| 31 | 35 | ||
diff --git a/lisp/calendar/icalendar-ast.el b/lisp/calendar/icalendar-ast.el index cfbc6c7cac8..fc8f23a3a27 100644 --- a/lisp/calendar/icalendar-ast.el +++ b/lisp/calendar/icalendar-ast.el | |||
| @@ -24,6 +24,8 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; For an overview of the iCalendar library, see icalendar-shortdoc.el. | ||
| 28 | |||
| 27 | ;; This file defines the abstract syntax tree representation for | 29 | ;; This file defines the abstract syntax tree representation for |
| 28 | ;; iCalendar data. The AST is based on `org-element-ast' (which see; | 30 | ;; iCalendar data. The AST is based on `org-element-ast' (which see; |
| 29 | ;; that feature will eventually be renamed and moved out of the Org tree | 31 | ;; that feature will eventually be renamed and moved out of the Org tree |
diff --git a/lisp/calendar/icalendar-macs.el b/lisp/calendar/icalendar-macs.el index 033fea94527..b216d8dc141 100644 --- a/lisp/calendar/icalendar-macs.el +++ b/lisp/calendar/icalendar-macs.el | |||
| @@ -24,10 +24,19 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; This file defines the macros `ical:define-type', `ical:define-param', | 27 | ;; For an overview of the iCalendar library, see icalendar-shortdoc.el. |
| 28 | ;; `ical:define-property' and `ical:define-component', used in | 28 | |
| 29 | ;; icalendar-parser.el to define the particular value types, parameters, | 29 | ;; This file defines the macros `icalendar-define-type', |
| 30 | ;; properties and components in the standard as type symbols. | 30 | ;; `icalendar-define-param', `icalendar-define-property' and |
| 31 | ;; `icalendar-define-component', used in icalendar-parser.el to define | ||
| 32 | ;; the particular value types, parameters, properties and components in | ||
| 33 | ;; the standard as type symbols. It also defines the following macros | ||
| 34 | ;; for binding values in iCalendar syntax nodes: | ||
| 35 | ;; `icalendar-with-component' | ||
| 36 | ;; `icalendar-with-property' | ||
| 37 | ;; `icalendar-with-property-of' | ||
| 38 | ;; `icalendar-with-param' | ||
| 39 | ;; `icalendar-with-param-of' | ||
| 31 | 40 | ||
| 32 | ;; TODOs: | 41 | ;; TODOs: |
| 33 | ;; - in the define* macros, :default needs rethinking. | 42 | ;; - in the define* macros, :default needs rethinking. |
diff --git a/lisp/calendar/icalendar-parser.el b/lisp/calendar/icalendar-parser.el index a2ce4b2362f..86dbcff1ce3 100644 --- a/lisp/calendar/icalendar-parser.el +++ b/lisp/calendar/icalendar-parser.el | |||
| @@ -24,6 +24,8 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; For an overview of the iCalendar library, see icalendar-shortdoc.el. | ||
| 28 | |||
| 27 | ;; This file defines regular expressions, constants and functions that | 29 | ;; This file defines regular expressions, constants and functions that |
| 28 | ;; implement the iCalendar grammar according to RFC5545. | 30 | ;; implement the iCalendar grammar according to RFC5545. |
| 29 | ;; | 31 | ;; |
| @@ -4350,7 +4352,7 @@ during printing will be logged in the buffer returned by | |||
| 4350 | 4352 | ||
| 4351 | ;;; High-level parsing and printing functions. | 4353 | ;;; High-level parsing and printing functions. |
| 4352 | (defun ical:parse (&optional buffer) | 4354 | (defun ical:parse (&optional buffer) |
| 4353 | "Parse an `icalendar-vcalendar' object in BUFFER (default: current buffer). | 4355 | "Parse an iCalendar VCALENDAR object in BUFFER (default: current buffer). |
| 4354 | 4356 | ||
| 4355 | An unfolded copy of BUFFER (see `icalendar-unfolded-buffer-from-buffer') | 4357 | An unfolded copy of BUFFER (see `icalendar-unfolded-buffer-from-buffer') |
| 4356 | will first be obtained if necessary. Parsing will begin at the first | 4358 | will first be obtained if necessary. Parsing will begin at the first |
| @@ -4359,9 +4361,9 @@ occurrence of \"BEGIN:VCALENDAR\" in the unfolded buffer. | |||
| 4359 | The buffer may be tidied up by user functions before parsing begins; see | 4361 | The buffer may be tidied up by user functions before parsing begins; see |
| 4360 | `icalendar-pre-unfolding-hook' and `icalendar-pre-parsing-hook'. | 4362 | `icalendar-pre-unfolding-hook' and `icalendar-pre-parsing-hook'. |
| 4361 | 4363 | ||
| 4362 | If parsing is successful, the VCALENDAR object is returned. Otherwise, | 4364 | If parsing is successful, an `icalendar-vcalendar' object is returned. |
| 4363 | nil is returned, a warning is issued, and errors are logged in the | 4365 | Otherwise, nil is returned, a warning is issued, and errors are logged |
| 4364 | buffer returned by `icalendar-error-buffer'." | 4366 | in the buffer returned by `icalendar-error-buffer'." |
| 4365 | (let* ((buf (or buffer (current-buffer))) | 4367 | (let* ((buf (or buffer (current-buffer))) |
| 4366 | (unfolded (cond ((ical:unfolded-p buf) buf) | 4368 | (unfolded (cond ((ical:unfolded-p buf) buf) |
| 4367 | ((buffer-file-name buf) | 4369 | ((buffer-file-name buf) |
diff --git a/lisp/calendar/icalendar-recur.el b/lisp/calendar/icalendar-recur.el index c01116fc5a7..cf751c83184 100644 --- a/lisp/calendar/icalendar-recur.el +++ b/lisp/calendar/icalendar-recur.el | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | 23 | ||
| 24 | ;;; Commentary: | 24 | ;;; Commentary: |
| 25 | 25 | ||
| 26 | ;; For an overview of the iCalendar library, see icalendar-shortdoc.el. | ||
| 27 | |||
| 26 | ;; This is a sub-library for working with recurrence rules and time | 28 | ;; This is a sub-library for working with recurrence rules and time |
| 27 | ;; zones, as defined by RFC5545 (see especially Secs. 3.3.10 and | 29 | ;; zones, as defined by RFC5545 (see especially Secs. 3.3.10 and |
| 28 | ;; 3.8.5.3, which are required reading before you make any changes to | 30 | ;; 3.8.5.3, which are required reading before you make any changes to |
| @@ -1387,7 +1389,7 @@ UTC offsets local to that time zone." | |||
| 1387 | 1389 | ||
| 1388 | (defun icr:recurrences-in-window-w/end-times | 1390 | (defun icr:recurrences-in-window-w/end-times |
| 1389 | (lower upper component &optional vtimezone) | 1391 | (lower upper component &optional vtimezone) |
| 1390 | "Like `icalendar-recurrences-in-window', but returns end times. | 1392 | "Like `icalendar-recur-recurrences-in-window', but returns end times. |
| 1391 | 1393 | ||
| 1392 | The return value is a list of (START END) pairs representing the start | 1394 | The return value is a list of (START END) pairs representing the start |
| 1393 | and end time of each recurrence of COMPONENT in the window defined by | 1395 | and end time of each recurrence of COMPONENT in the window defined by |
| @@ -2111,7 +2113,7 @@ observance." | |||
| 2111 | (null dst-ends-time)))))) | 2113 | (null dst-ends-time)))))) |
| 2112 | 2114 | ||
| 2113 | (defun icr:current-tz-to-vtimezone (&optional tz tzid start-year) | 2115 | (defun icr:current-tz-to-vtimezone (&optional tz tzid start-year) |
| 2114 | "Convert TZ to an `icalendar-vtimezone'. | 2116 | "Convert TZ (default: current time zone) to an `icalendar-vtimezone'. |
| 2115 | 2117 | ||
| 2116 | TZ defaults to the output of `calendar-current-time-zone'; if specified, | 2118 | TZ defaults to the output of `calendar-current-time-zone'; if specified, |
| 2117 | it should be a list of the same form as that function returns. | 2119 | it should be a list of the same form as that function returns. |
diff --git a/lisp/calendar/icalendar-shortdoc.el b/lisp/calendar/icalendar-shortdoc.el new file mode 100644 index 00000000000..ef6f23cdfb9 --- /dev/null +++ b/lisp/calendar/icalendar-shortdoc.el | |||
| @@ -0,0 +1,273 @@ | |||
| 1 | ;;; icalendar-shortdoc.el --- Short documentation for iCalendar -*- lexical-binding: t; -*- | ||
| 2 | |||
| 3 | ;; Copyright (C) 2026 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Richard Lawrence <rwl@recursewithless.net> | ||
| 6 | ;; Created: April 2026 | ||
| 7 | ;; Keywords: calendar, help | ||
| 8 | ;; Human-Keywords: calendar, iCalendar | ||
| 9 | |||
| 10 | ;; This file is part of GNU Emacs. | ||
| 11 | |||
| 12 | ;; This file is free software: you can redistribute it and/or modify | ||
| 13 | ;; it under the terms of the GNU General Public License as published by | ||
| 14 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 15 | ;; (at your option) any later version. | ||
| 16 | |||
| 17 | ;; This file is distributed in the hope that it will be useful, | ||
| 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | ;; GNU General Public License for more details. | ||
| 21 | |||
| 22 | ;; You should have received a copy of the GNU General Public License | ||
| 23 | ;; along with this file. If not, see <https://www.gnu.org/licenses/>. | ||
| 24 | |||
| 25 | ;;; Commentary: | ||
| 26 | |||
| 27 | ;; This file defines a short documentation group for the main functions | ||
| 28 | ;; of the iCalendar API. It does not aim to cover every function in the | ||
| 29 | ;; library; it is a guide to the high-level functions for Lisp | ||
| 30 | ;; programmers who want to interpret or produce iCalendar data. | ||
| 31 | |||
| 32 | ;; To read this documentation, do: | ||
| 33 | ;; M-x load-libraray RET icalendar-shortdoc RET | ||
| 34 | ;; M-x shortdoc RET icalendar RET | ||
| 35 | |||
| 36 | |||
| 37 | ;;; Code: | ||
| 38 | (require 'shortdoc) | ||
| 39 | (require 'icalendar-macs) | ||
| 40 | (require 'icalendar-parser) | ||
| 41 | (require 'icalendar-utils) | ||
| 42 | (require 'icalendar-ast) | ||
| 43 | (require 'icalendar-recur) | ||
| 44 | |||
| 45 | (define-short-documentation-group icalendar | ||
| 46 | "Parsing and printing VCALENDAR objects" | ||
| 47 | (icalendar-parse | ||
| 48 | :no-manual t | ||
| 49 | :no-eval* (icalendar-parse) | ||
| 50 | :result-string "(icalendar-vcalendar ...)") | ||
| 51 | (icalendar-parse-and-index | ||
| 52 | :no-manual t | ||
| 53 | :no-eval* (icalendar-parse-and-index) | ||
| 54 | :result (vcalendar index)) | ||
| 55 | (icalendar-index-get | ||
| 56 | :args (index &rest kwargs) | ||
| 57 | :no-manual t | ||
| 58 | :no-eval (icalendar-index-get index :uid "some-event-UID") | ||
| 59 | :eg-result-string "(icalendar-vevent ...)" | ||
| 60 | :no-eval (icalendar-index-get index :date '(5 28 2026)) | ||
| 61 | :eg-result-string "((icalendar-vevent ...) ...)" | ||
| 62 | :no-eval (icalendar-index-get index :tzid "Europe/Vienna") | ||
| 63 | :eg-result-string "(icalendar-vtimezone ...)") | ||
| 64 | (icalendar-parse-from-string | ||
| 65 | :no-eval | ||
| 66 | (icalendar-parse-from-string 'icalendar-rrule "RRULE:FREQ=WEEKLY\n") | ||
| 67 | :result-string "(icalendar-rrule ...)") | ||
| 68 | (icalendar-print-calendar-node | ||
| 69 | :no-manual t | ||
| 70 | :no-eval (icalendar-print-calendar-node vcalendar) | ||
| 71 | :result "BEGIN:VCALENDAR...") | ||
| 72 | "Constructing syntax nodes" | ||
| 73 | (icalendar-make-vcalendar | ||
| 74 | :no-manual t | ||
| 75 | :no-eval | ||
| 76 | "(icalendar-make-vcalendar | ||
| 77 | some-vtimezone | ||
| 78 | (@ list-of-vevents) | ||
| 79 | ...)" | ||
| 80 | :result-string "(icalendar-vcalendar ...)") | ||
| 81 | (icalendar-make-vevent | ||
| 82 | :no-manual t | ||
| 83 | :no-eval | ||
| 84 | "(icalendar-make-vevent | ||
| 85 | (icalendar-summary \"Party\") | ||
| 86 | (icalendar-location \"Robot House\") | ||
| 87 | (icalendar-organizer \"mailto:bender@mars.edu\" | ||
| 88 | (icalendar-cnparam \"Bender B. Rodriguez\")) | ||
| 89 | (icalendar-attendee \"mailto:philip.j.fry@mars.edu\" | ||
| 90 | (icalendar-partstatparam \"ACCEPTED\")) | ||
| 91 | (icalendar-dtstart '(3 13 3003)) | ||
| 92 | (icalendar-rrule '((FREQ MONTHLY))))" | ||
| 93 | :result-string "(icalendar-vevent ...)") | ||
| 94 | (icalendar-make-vtodo | ||
| 95 | :no-manual t | ||
| 96 | :no-eval | ||
| 97 | "(icalendar-make-vtodo | ||
| 98 | (icalendar-summary \"Sell another doomsday device\") | ||
| 99 | (icalendar-description \"Need funds for electronium hat experiment.\") | ||
| 100 | (icalendar-due '(6 6 3002)))" | ||
| 101 | :result-string "(icalendar-vtodo ...)") | ||
| 102 | (icalendar-make-vjournal | ||
| 103 | :no-manual t | ||
| 104 | :no-eval | ||
| 105 | "(icalendar-make-vjournal | ||
| 106 | (icalendar-summary \"Results: Electronium Hat Experiment\") | ||
| 107 | (icalendar-description \"How do you like them bananas?\") | ||
| 108 | (icalendar-dtstart '(8 6 3002)))" | ||
| 109 | :result-string "(icalendar-vjournal ...)") | ||
| 110 | "Binding values in syntax nodes" | ||
| 111 | (icalendar-with-component | ||
| 112 | :args (node bindings &rest body) | ||
| 113 | :no-manual t | ||
| 114 | :no-eval | ||
| 115 | "(icalendar-with-component vevent | ||
| 116 | ((icalendar-summary :value summary) | ||
| 117 | (icalendar-location :value location)) | ||
| 118 | (format \"%s @ %s\" summary location))" | ||
| 119 | :eg-result "Party @ Robot House") | ||
| 120 | (icalendar-with-property | ||
| 121 | :args (node bindings &rest body) | ||
| 122 | :no-manual t | ||
| 123 | :no-eval "(icalendar-with-property location-node nil | ||
| 124 | (downcase value))" | ||
| 125 | :eg-result "robot house") | ||
| 126 | (icalendar-with-property-of | ||
| 127 | :args (component property-type bindings &rest body) | ||
| 128 | :no-manual t | ||
| 129 | :no-eval | ||
| 130 | "(icalendar-with-property-of vevent 'icalendar-location nil | ||
| 131 | (downcase value))" | ||
| 132 | :eg-result "robot house") | ||
| 133 | (icalendar-with-param | ||
| 134 | :args (parameter &rest body) | ||
| 135 | :no-manual t | ||
| 136 | :no-eval "(icalendar-with-param cnparam-node | ||
| 137 | (upcase value))" | ||
| 138 | :eg-result "BENDER B. RODRIGUEZ") | ||
| 139 | (icalendar-with-param-of | ||
| 140 | :args (property param-type &rest body) | ||
| 141 | :no-manual t | ||
| 142 | :no-eval "(icalendar-with-param-of organizer-node 'icalendar-cnparam | ||
| 143 | (upcase value))" | ||
| 144 | :eg-result "BENDER B. RODRIGUEZ") | ||
| 145 | "Time zones" | ||
| 146 | (icalendar-recur-current-tz-to-vtimezone | ||
| 147 | :no-manual t | ||
| 148 | :no-eval (icalendar-recur-current-tz-to-vtimezone) | ||
| 149 | :result-string "(icalendar-vtimezone ...)") | ||
| 150 | (icalendar-recur-tz-decode-time | ||
| 151 | :no-manual t | ||
| 152 | :no-eval (icalendar-recur-tz-decode-time timestamp vtimezone) | ||
| 153 | :eg-result (0 0 11 11 11 2024 1 nil 3600)) | ||
| 154 | (icalendar-recur-tz-set-zone | ||
| 155 | :no-eval (icalendar-recur-tz-set-zone '(0 0 11 11 11 2024 1 -1 nil) vtimezone) | ||
| 156 | :eg-result (0 0 11 11 11 2024 1 nil 3600)) | ||
| 157 | "Dates and date-times" | ||
| 158 | (icalendar-make-date-time | ||
| 159 | :no-manual t | ||
| 160 | :args (&rest kwargs) | ||
| 161 | :no-eval | ||
| 162 | "(icalendar-make-date-time :year 2024 :month 12 :day 11 | ||
| 163 | :hour 10 :minute 0 :second 0 | ||
| 164 | :tz vtimezone)" | ||
| 165 | :eg-result (0 0 10 11 12 2024 3 -1 3600)) | ||
| 166 | (icalendar-date/time<= | ||
| 167 | :eval (icalendar-date/time<= '(12 15 2024) '(12 11 2024)) | ||
| 168 | :eval "(icalendar-date/time<= '(0 0 8 11 11 2024 1 nil 3600) | ||
| 169 | '(0 0 10 11 11 2024 3 nil 3600))" | ||
| 170 | :no-manual t) | ||
| 171 | (icalendar-date/time< | ||
| 172 | :no-manual t | ||
| 173 | :eval (icalendar-date/time< '(12 15 2024) '(12 15 2024))) | ||
| 174 | (icalendar-date/time-min | ||
| 175 | :no-manual t | ||
| 176 | :eval (icalendar-date/time-min '(12 15 2024) '(11 15 2024) '(12 1 2024)) | ||
| 177 | :eval | ||
| 178 | "(icalendar-date/time-min '(0 0 8 11 12 2024 3 nil 3600) | ||
| 179 | '(0 0 9 11 12 2024 3 nil 3600) | ||
| 180 | '(0 0 10 11 12 2024 3 nil 3600))") | ||
| 181 | (icalendar-date/time-max | ||
| 182 | :no-manual t | ||
| 183 | :eval (icalendar-date/time-max '(12 15 2024) '(11 15 2024) '(12 1 2024)) | ||
| 184 | :eval | ||
| 185 | "(icalendar-date/time-max '(0 0 8 11 12 2024 3 nil 3600) | ||
| 186 | '(0 0 9 11 12 2024 3 nil 3600) | ||
| 187 | '(0 0 10 11 12 2024 3 nil 3600))") | ||
| 188 | (icalendar-date/time-add | ||
| 189 | :no-manual t | ||
| 190 | :eval (icalendar-date/time-add '(11 11 2024) :month 2) | ||
| 191 | :eval (icalendar-date/time-add '(0 0 10 11 11 2024 1 -1 nil) :hour -3)) | ||
| 192 | (icalendar-date/time-add-duration | ||
| 193 | :no-manual t | ||
| 194 | :eval "(icalendar-date/time-add-duration '(12 11 2024) | ||
| 195 | (make-decoded-time :day 4))" | ||
| 196 | :eval "(icalendar-date/time-add-duration '(0 0 10 11 12 2024 3 -1 nil) | ||
| 197 | (make-decoded-time :hour 2 :minute 30))") | ||
| 198 | (icalendar-date/time-year | ||
| 199 | :no-manual t | ||
| 200 | :eval (icalendar-date/time-year '(12 11 2024)) | ||
| 201 | :eval (icalendar-date/time-year '(0 0 10 11 12 2024 3 nil 3600))) | ||
| 202 | (icalendar-date/time-month | ||
| 203 | :no-manual t | ||
| 204 | :eval (icalendar-date/time-month '(12 11 2024)) | ||
| 205 | :eval (icalendar-date/time-month '(0 0 10 11 12 2024 3 nil 3600))) | ||
| 206 | (icalendar-date/time-monthday | ||
| 207 | :no-manual t | ||
| 208 | :eval (icalendar-date/time-monthday '(12 11 2024)) | ||
| 209 | :eval (icalendar-date/time-monthday '(0 0 10 11 12 2024 3 nil 3600))) | ||
| 210 | (icalendar-date/time-weekday | ||
| 211 | :no-manual t | ||
| 212 | :eval (icalendar-date/time-weekday '(12 11 2024)) | ||
| 213 | :eval (icalendar-date/time-weekday '(0 0 10 11 12 2024 3 nil 3600))) | ||
| 214 | (icalendar-date/time-weekno | ||
| 215 | :no-manual t | ||
| 216 | :eval (icalendar-date/time-weekno '(12 11 2024)) | ||
| 217 | :eval (icalendar-date/time-weekno '(0 0 10 11 12 2024 3 nil 3600))) | ||
| 218 | (icalendar-date/time-hour | ||
| 219 | :no-manual t | ||
| 220 | :eval (icalendar-date/time-hour '(12 11 2024)) | ||
| 221 | :eval (icalendar-date/time-hour '(0 0 10 11 12 2024 3 nil 3600))) | ||
| 222 | (icalendar-date/time-minute | ||
| 223 | :no-manual t | ||
| 224 | :eval (icalendar-date/time-minute '(12 11 2024)) | ||
| 225 | :eval (icalendar-date/time-minute '(0 0 10 11 12 2024 3 nil 3600))) | ||
| 226 | (icalendar-date/time-second | ||
| 227 | :no-manual t | ||
| 228 | :eval (icalendar-date/time-second '(12 11 2024)) | ||
| 229 | :eval (icalendar-date/time-second '(0 0 10 11 12 2024 3 nil 3600))) | ||
| 230 | (icalendar-date/time-zone | ||
| 231 | :no-manual t | ||
| 232 | :eval (icalendar-date/time-zone '(12 11 2024)) | ||
| 233 | :eval (icalendar-date/time-zone '(0 0 10 11 12 2024 3 nil 3600))) | ||
| 234 | "Recurrence rules and recurrences" | ||
| 235 | (icalendar-recur-recurrences-in-window | ||
| 236 | :no-manual t | ||
| 237 | :no-eval | ||
| 238 | "(icalendar-recur-recurrences-in-window '(1 1 2026) '(12 31 2026) | ||
| 239 | vevent)" | ||
| 240 | :eg-result-string "((1 10 2026) (2 10 2026) ...)") | ||
| 241 | (icalendar-recur-recurrences-in-window-w/end-times | ||
| 242 | :no-manual t | ||
| 243 | :no-eval | ||
| 244 | "(icalendar-recur-recurrences-in-window-w/end-times | ||
| 245 | '(0 0 0 1 1 2026 4 -1 nil) '(0 0 0 1 2 2026 1 -1 nil) | ||
| 246 | vevent)" | ||
| 247 | :eg-result-string | ||
| 248 | "(((0 0 10 10 1 2026 4 -1 nil) (0 0 11 10 1 2026 4 -1 nil)) ...)") | ||
| 249 | (icalendar-recur-recurrences-to-count | ||
| 250 | :no-manual t | ||
| 251 | :no-eval | ||
| 252 | "(icalendar-recur-recurrences-to-count '(1 1 2026) '(12 31 2026) | ||
| 253 | vevent)" | ||
| 254 | :eg-result-string "((1 10 2026) (2 10 2026) (3 10 2026))") | ||
| 255 | (icalendar-recur-freq | ||
| 256 | :eval | ||
| 257 | (icalendar-recur-freq '((FREQ MONTHLY) (INTERVAL 3) (BYDAY ((5 . -1)))))) | ||
| 258 | (icalendar-recur-interval-size | ||
| 259 | :eval (icalendar-recur-interval-size '((FREQ MONTHLY) (BYDAY ((5 . -1))))) | ||
| 260 | :eval (icalendar-recur-interval-size '((FREQ MONTHLY) (INTERVAL 3)))) | ||
| 261 | (icalendar-recur-count | ||
| 262 | :eval (icalendar-recur-count '((FREQ MONTHLY) (INTERVAL 2) (COUNT 6)))) | ||
| 263 | (icalendar-recur-until | ||
| 264 | :eval (icalendar-recur-until '((FREQ WEEKLY) (UNTIL (12 31 2026))))) | ||
| 265 | (icalendar-recur-by* | ||
| 266 | :eval (icalendar-recur-by* 'BYDAY '((FREQ MONTHLY) (BYDAY ((5 . -1)))))) | ||
| 267 | (icalendar-recur-weekstart | ||
| 268 | :eval | ||
| 269 | (icalendar-recur-weekstart '((FREQ WEEKLY) (UNTIL (12 31 2026)) (WKST 0))) | ||
| 270 | :eval | ||
| 271 | (icalendar-recur-weekstart '((FREQ WEEKLY) (UNTIL (12 31 2026)))))) | ||
| 272 | |||
| 273 | (provide 'icalendar-shortdoc) | ||
diff --git a/lisp/calendar/icalendar-utils.el b/lisp/calendar/icalendar-utils.el index e877cb85637..565901940f0 100644 --- a/lisp/calendar/icalendar-utils.el +++ b/lisp/calendar/icalendar-utils.el | |||
| @@ -23,6 +23,8 @@ | |||
| 23 | 23 | ||
| 24 | ;;; Commentary: | 24 | ;;; Commentary: |
| 25 | 25 | ||
| 26 | ;; For an overview of the iCalendar library, see icalendar-shortdoc.el. | ||
| 27 | |||
| 26 | ;; This file contains a variety of utility functions to work with | 28 | ;; This file contains a variety of utility functions to work with |
| 27 | ;; iCalendar data which are used throughout the rest of the iCalendar | 29 | ;; iCalendar data which are used throughout the rest of the iCalendar |
| 28 | ;; library. Most of the functions here deal with calendar and clock | 30 | ;; library. Most of the functions here deal with calendar and clock |
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 4956dc82f09..d439d4ed2e3 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el | |||
| @@ -27,21 +27,13 @@ | |||
| 27 | ;;; Commentary: | 27 | ;;; Commentary: |
| 28 | 28 | ||
| 29 | ;; Most of the code in this file is now obsolete and has been marked as such. | 29 | ;; Most of the code in this file is now obsolete and has been marked as such. |
| 30 | ;; For an overview of the new iCalendar library, see icalendar-shortdoc.el. | ||
| 30 | ;; For the new implementation of diary import/export, see diary-icalendar.el. | 31 | ;; For the new implementation of diary import/export, see diary-icalendar.el. |
| 31 | ;; Error handling code, global variables, and user options relevant for the | 32 | ;; Error handling code, global variables, and user options relevant for the |
| 32 | ;; entire iCalendar library remain in this file. | 33 | ;; entire iCalendar library remain in this file. |
| 33 | 34 | ||
| 34 | ;; This package is documented in the Emacs Manual. | 35 | ;; The diary-icalendar feature is documented in the Emacs Manual. |
| 35 | 36 | ||
| 36 | ;; Please note: | ||
| 37 | ;; - Diary entries which have a start time but no end time are assumed to | ||
| 38 | ;; last for one hour when they are exported. | ||
| 39 | ;; - Weekly diary entries are assumed to occur the first time in the first | ||
| 40 | ;; week of the year 2000 when they are exported. | ||
| 41 | ;; - Yearly diary entries are assumed to occur the first time in the year | ||
| 42 | ;; 1900 when they are exported. | ||
| 43 | ;; - Float diary entries are assumed to occur the first time on the | ||
| 44 | ;; day when they are exported. | ||
| 45 | 37 | ||
| 46 | ;;; History: | 38 | ;;; History: |
| 47 | 39 | ||