[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/excorporate ff4e272 74/93: Excorporate: Simplify organi
From: |
Stefan Monnier |
Subject: |
[elpa] externals/excorporate ff4e272 74/93: Excorporate: Simplify organizer handling in Org backend |
Date: |
Sun, 29 Nov 2020 15:43:12 -0500 (EST) |
branch: externals/excorporate
commit ff4e2720b1bd2379f7c33fb139743416fc8d894b
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Excorporate: Simplify organizer handling in Org backend
* packages/excorporate/excorporate-org.el
(exco-org-insert-meeting): Use simpler organizer argument.
(exco-org-insert-meetings): Simplify organizer argument.
(exco-org-insert-meeting-headline): Adjust item-identifier
documentation.
---
excorporate-org.el | 47 ++++++++++++++++-------------------------------
1 file changed, 16 insertions(+), 31 deletions(-)
diff --git a/excorporate-org.el b/excorporate-org.el
index 25b7986..a03ebff 100644
--- a/excorporate-org.el
+++ b/excorporate-org.el
@@ -180,8 +180,8 @@ operated on."
"Insert and schedule a meeting.
SUBJECT is the meeting's subject, START-TIME and END-TIME are the
meeting's start and end times in the same format as is returned
-by `current-time'. ITEM-IDENTIFIER is the item identifier in the
-form (ItemId (Id . ID-STRING) (ChangeKey . CHANGEKEY-STRING))."
+by `current-time'. ITEM-IDENTIFIER is the opaque item
+identifier."
(let* ((now (current-time))
(keyword (if (time-less-p now end-time)
"TODO"
@@ -219,43 +219,26 @@ form (ItemId (Id . ID-STRING) (ChangeKey .
CHANGEKEY-STRING))."
(defun exco-org-insert-meeting (subject start end location
main-invitees optional-invitees
- &optional item-identifier organizer identifier)
+ &optional item-identifier organizer)
"Insert a scheduled meeting.
SUBJECT is a string, the subject of the meeting. START is the
meeting start time in Emacs internal date time format, and END is
the end of the meeting in the same format. LOCATION is a string
representing the location. MAIN-INVITEES and OPTIONAL-INVITEES
-are the requested participants. ITEM-IDENTIFIER is the item
-identifier in the form
-\(ItemId (Id . ID-STRING) (ChangeKey . CHANGEKEY-STRING)).
-ORGANIZER is a string containing the organizer of the meeting, in
-server-internal form. IDENTIFIER is the connection identifier."
- ;; The Organizer email is in the server's internal format. Resolve
- ;; it synchronously, for simplicity.
- (let ((organizer-email-address
- (exco-extract-value
- '(ResponseMessages
- ResolveNamesResponseMessage
- ResolutionSet
- Resolution
- Mailbox
- EmailAddress)
- (with-timeout
- (1 (error "Server did not respond in time"))
- (exco-operate-synchronously
- identifier "ResolveNames"
- `(((UnresolvedEntry . ,organizer)) nil nil nil))))))
- (exco-org-insert-meeting-headline subject start end item-identifier)
+are the requested participants. ITEM-IDENTIFIER is the opaque
+item identifier. ORGANIZER is a string, the email address of the
+meeting organizer."
+ (exco-org-insert-meeting-headline subject start end item-identifier)
(insert (format "+ Duration: %d minutes\n"
(round (/ (float-time (time-subtract end start)) 60.0))))
(insert (format "+ Location: %s\n" location))
- (insert (format "+ Organizer: %s\n" organizer-email-address))
+ (insert (format "+ Organizer: %s\n" organizer))
(when main-invitees
(insert "+ Invitees:\n")
(exco-org-insert-invitees main-invitees))
(when optional-invitees
(insert "+ Optional invitees:\n")
- (exco-org-insert-invitees optional-invitees))))
+ (exco-org-insert-invitees optional-invitees)))
(defun exco-org-insert-meetings (identifier response)
"Insert the connection IDENTIFIER's meetings from RESPONSE."
@@ -271,12 +254,14 @@ server-internal form. IDENTIFIER is the connection
identifier."
response (lambda (&rest arguments)
(with-current-buffer (exco-org--identifier-buffer identifier)
(org-mode)
- (apply #'exco-org-insert-meeting
- ;; Gross, but keeps exco-org-insert-meeting
- ;; signature backward compatible.
- (append arguments (list identifier)))))
+ (let ((new-arguments arguments))
+ (setf (nth 7 new-arguments)
+ (exco-organizer-smtp-email-address
+ identifier organizer-structure))
+ (apply #'exco-org-insert-meeting new-arguments))))
subject start-internal end-internal
- location main-invitees optional-invitees item-identifier organizer)
+ location main-invitees optional-invitees item-identifier
+ organizer-structure)
(goto-char (point-min))
(if (save-excursion (org-goto-first-child))
(org-sort-entries t ?s)
- [elpa] externals/excorporate 618d12c 18/93: packages/excorporate: Bump version to 0.7.5, (continued)
- [elpa] externals/excorporate 618d12c 18/93: packages/excorporate: Bump version to 0.7.5, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 8279180 20/93: packages/excorporate: Bump url-http-ntlm required version to 2.0.3, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 90532e9 29/93: packages/excorporate: Support retrieving meeting details, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate f5abc2a 36/93: packages/excorporate: Fix comment typo., Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate d7b3ef3 48/93: packages/excorporate: Bump version to 0.8.2, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 4b975b2 45/93: Excorporate: Support multiple connections, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate d6176ca 66/93: Excorporate: Provide organizer to iterators, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate a7e0cd3 53/93: packages/excorporate: Bump version to 0.8.3, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 5e44589 60/93: Excorporate: Avoid trailing newline in Org buffer, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate ebbf99a 78/93: Excorporate: Document new interactive functions, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate ff4e272 74/93: Excorporate: Simplify organizer handling in Org backend,
Stefan Monnier <=
- [elpa] externals/excorporate 0d014c7 64/93: Excorporate: Support appointment creation, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate de50497 75/93: Excorporate: Support replying to meeting requests in Org buffer, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate ebf91e4 50/93: excorporate-diary: Update warning message, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 5bd2608 59/93: Excorporate: Support appointment deletion, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 064e34d 57/93: packages/excorporate/excorporate.el: Adjust case in example URL, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 6487138 70/93: Excorporate: Adjust some documentation strings, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate da3898b 85/93: Excorporate: Rename a function, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 96a76cd 90/93: Excorporate: Adjust some URLs in the manual, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 47d2698 32/93: packages/excorporate: Support diary on Emacs 24.1, 24.2, 24.3, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate 77030b3 37/93: packages/excorporate: Fix generated whitespace issue, Stefan Monnier, 2020/11/29