[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/excorporate de50497 75/93: Excorporate: Support replyin
From: |
Stefan Monnier |
Subject: |
[elpa] externals/excorporate de50497 75/93: Excorporate: Support replying to meeting requests in Org buffer |
Date: |
Sun, 29 Nov 2020 15:43:12 -0500 (EST) |
branch: externals/excorporate
commit de50497193948587a2a3f16ee2650f947a369114
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Commit: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Excorporate: Support replying to meeting requests in Org buffer
* packages/excorporate/excorporate-org.el
(exco-org--reply-to-meeting): New function.
(exco-org-accept-meeting-request): Likewise.
(exco-org-decline-meeting-request): Likewise.
(exco-org-tentatively-accept-meeting-request): Likewise.
---
excorporate-org.el | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/excorporate-org.el b/excorporate-org.el
index a03ebff..f6edc05 100644
--- a/excorporate-org.el
+++ b/excorporate-org.el
@@ -110,6 +110,57 @@ operated on."
(begin (org-element-property :begin element))
(end (org-element-property :end element)))
(delete-region begin end)))))
+
+(defun exco-org--reply-to-meeting (acceptance prompt-for-message)
+ "Reply to a meeting.
+ACCEPTANCE is a symbol, one of `accept', `tentatively-accept', or
+`decline'. PROMPT-FOR-MESSAGE is non-nil to prompt the user for
+a message to include in the reply or nil to not include a
+message."
+ (let (prompt success failure)
+ (cl-ecase acceptance
+ (accept
+ (setq prompt "Acceptance message: ")
+ (setq success "accepted")
+ (setq failure "accept"))
+ (tentatively-accept
+ (setq prompt "Tentative acceptance message: ")
+ (setq success "accepted tentatively")
+ (setq failure "accept tentatively"))
+ (decline
+ (setq prompt "Declination message: ")
+ (setq success "declined")
+ (setq failure "decline")))
+ (let ((message (when prompt-for-message (read-from-minibuffer prompt)))
+ (identifier (exco-org--connection-identifier-at-point))
+ (item-identifier (exco-org--item-identifier-at-point)))
+ (exco-calendar-item-meeting-reply
+ identifier item-identifier message acceptance
+ (lambda (identifier response)
+ (exco-org--handle-response response CreateItemResponseMessage
+ success failure))))))
+
+(defun exco-org-accept-meeting-request (&optional argument)
+ "Accept the meeting at point.
+With a prefix argument, ARGUMENT, prompts for response message
+text."
+ (interactive "P")
+ (exco-org--reply-to-meeting 'accept argument))
+
+(defun exco-org-decline-meeting-request (&optional argument)
+ "Decline the meeting at point.
+With a prefix argument, ARGUMENT, prompts for response message
+text."
+ (interactive "P")
+ (exco-org--reply-to-meeting 'decline argument))
+
+(defun exco-org-tentatively-accept-meeting-request (&optional argument)
+ "Tentatively accept the meeting at point.
+With a prefix argument, ARGUMENT, prompts for response message
+text."
+ (interactive "P")
+ (exco-org--reply-to-meeting 'tentatively-accept argument))
+
(defun exco-org-cancel-meeting ()
"Cancel the meeting at point, prompting for a cancellation message."
(interactive)
- [elpa] externals/excorporate 90532e9 29/93: packages/excorporate: Support retrieving meeting details, (continued)
- [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, 2020/11/29
- [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 <=
- [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
- [elpa] externals/excorporate 7849d8f 42/93: excorporate-diary: Add feature idea comment, Stefan Monnier, 2020/11/29
- [elpa] externals/excorporate f3888e1 77/93: Excorporate: Require Org 9.0 or newer, Stefan Monnier, 2020/11/29