[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/excorporate d43e575 58/93: Excorporate: Add an item ite
From: |
Stefan Monnier |
Subject: |
[elpa] externals/excorporate d43e575 58/93: Excorporate: Add an item iteration macro |
Date: |
Sun, 29 Nov 2020 15:43:08 -0500 (EST) |
branch: externals/excorporate
commit d43e575addf3abe9e9aa5bc3cfb8794d39f1d283
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Excorporate: Add an item iteration macro
* packages/excorporate/excorporate.el
(exco-calendar-item-iterate-general): New macro.
(exco-calendar-item-iterate): Call
exco-calendar-item-iterate-general.
---
excorporate.el | 52 ++++++++++++++++++++++++++++++++++++----------------
1 file changed, 36 insertions(+), 16 deletions(-)
diff --git a/excorporate.el b/excorporate.el
index 271f2cc..694be81 100644
--- a/excorporate.el
+++ b/excorporate.el
@@ -756,28 +756,48 @@ processing is done."
location main-invitees optional-invitees
icalendar-text)))))))
+(defmacro exco-calendar-item-iterate-general (response
+ callback &rest care-abouts)
+ "Iterate through calendar items in RESPONSE, calling CALLBACK on each.
+Return a list of results from callback. CARE-ABOUTS is a list of
+symbols representing the arguments with which CALLBACK should be
+called. Options are:
+SUBJECT, a string, the subject of the meeting.
+START, the start date and time in Emacs internal representation.
+END, the start date and time in Emacs internal representation.
+LOCATION, the location of the meeting.
+MAIN-INVITEES, a list of strings, email addresses of the required
+participants.
+OPTIONAL-INVITEES, a list of strings, email addresses of optional
+participants.
+ITEM-IDENTIFIER, a structure of the form (ItemId (Id
+. ID-STRING) (ChangeKey . CHANGEKEY-STRING))."
+ `(let ((result-list '()))
+ (exco--calendar-item-dolist
+ calendar-item (exco-extract-value '(ResponseMessages
+ FindItemResponseMessage
+ RootFolder
+ Items)
+ ,response)
+ (push (funcall ,callback ,@care-abouts)
+ result-list))
+ (nreverse result-list)))
+
(defun exco-calendar-item-iterate (response callback)
"Iterate through calendar items in RESPONSE, calling CALLBACK on each.
-Returns a list of results from callback. CALLBACK takes arguments:
+Return a list of results from callback. CALLBACK takes arguments:
SUBJECT, a string, the subject of the meeting.
START, the start date and time in Emacs internal representation.
END, the start date and time in Emacs internal representation.
LOCATION, the location of the meeting.
-MAIN-INVITEES, a list of strings representing required participants.
-OPTIONAL-INVITEES, a list of strings representing optional participants."
- (let ((result-list '()))
- (exco--calendar-item-dolist
- calendar-item (exco-extract-value '(ResponseMessages
- FindItemResponseMessage
- RootFolder
- Items)
- response)
- ;; Silence byte compiler unused warning.
- item-identifier
- (push (funcall callback subject start-internal end-internal
- location main-invitees optional-invitees)
- result-list))
- (nreverse result-list)))
+MAIN-INVITEES, a list of strings, email addresses of the required
+participants.
+OPTIONAL-INVITEES, a list of strings, email addresses of optional
+participants."
+ (exco-calendar-item-iterate-general
+ response callback
+ subject start-internal end-internal
+ location main-invitees optional-invitees))
;; Date-time utility functions.
(defun exco-extend-timezone (date-time-string)
- [elpa] externals/excorporate 556433b 54/93: excorporate: Bump required package versions, (continued)
- [elpa] externals/excorporate 556433b 54/93: excorporate: Bump required package versions, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate ba927b9 52/93: packages/excorporate: Update HTTP debugging steps, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate b37aecf 51/93: excorporate-diary: Fix percent signs in appt, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 00ef8e7 55/93: excorporate: Update HTTPS proxy and GSSAPI status in manual, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate fac0fee 56/93: packages/excorporate/excorporate.el: Add an acknowledgment, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 0080f33 62/93: Excorporate: Add item identifiers to Org buffer, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate b228664 69/93: Excorporate: Support replying to meeting requests, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate cee32a6 65/93: Excorporate: Add support for synchronous operations, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 166b417 72/93: Excorporate: Add an organizer resolver function, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 936eb4a 61/93: Excorporate: Change identifier format in Org buffer, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate d43e575 58/93: Excorporate: Add an item iteration macro,
Stefan Monnier <=
- [elpa] externals/excorporate 212c8bd 80/93: Excorporate: Rewrite exco-org functions for Org 9.1, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 24a625f 86/93: Excorporate: Add an operation arity function, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 23d19b3 79/93: Excorporate: Document API usage in manual, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate bf88ded 83/93: Excorporate: Add more API usage examples to manual, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate c72216a 92/93: Excorporate: Bump version to 0.9.1, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 98a5284 82/93: Excorporate: Do not explicitly require Org package, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 4253da4 84/93: Excorporate: Add timeout for synchronous operations, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 29bef79 87/93: Excorporate: Bump soap-client required version to 3.2.0, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 4fb4450 93/93: * .gitignore: New file, Stefan Monnier, 2020/11/29