branch: master commit cc0d02ac2adb4f0dee9e74df03b93f2ab5f7daca Author: Thomas Fitzsimmons <fitz...@fitzsim.org> Commit: Thomas Fitzsimmons <fitz...@fitzsim.org>
Excorporate: Prompt for meeting reply messages * packages/excorporate/excorporate-org.el (exco-org--reply-to-meeting): Change PROMPT-FOR-MESSAGE to DO-NOT-PROMPT-FOR-MESSAGE. (exco-org-accept-meeting-request): Prompt for message unless a prefix argument is given. (exco-org-decline-meeting-request): Likewise. (exco-org-tentatively-accept-meeting-request): Likewise. (exco-org-delete-appointment): Take a prefix argument to force-delete a calendar item. * packages/excorporate/excorporate.texi (Usage): Move appt documentation to just after excorporate-diary-enable. Adjust exco-org- function documentation regarding prefix arguments. * packages/excorporate/excorporate.info: Regenerate. --- packages/excorporate/excorporate-org.el | 38 ++++++++++++++++++++------------- packages/excorporate/excorporate.info | 34 +++++++++++++++++------------ packages/excorporate/excorporate.texi | 32 +++++++++++++++------------ 3 files changed, 61 insertions(+), 43 deletions(-) diff --git a/packages/excorporate/excorporate-org.el b/packages/excorporate/excorporate-org.el index 5b9a3da..868fe72 100644 --- a/packages/excorporate/excorporate-org.el +++ b/packages/excorporate/excorporate-org.el @@ -116,12 +116,12 @@ operated on." (let ((inhibit-read-only t)) (apply #'delete-region region)))))) -(defun exco-org--reply-to-meeting (acceptance prompt-for-message) +(defun exco-org--reply-to-meeting (acceptance do-not-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." +`decline'. If DO-NOT-PROMPT-FOR-MESSAGE is non-nil, do not +prompt for or include a reply message, otherwise prompt for the +reply message." (let (prompt success failure) (cl-ecase acceptance (accept @@ -136,7 +136,8 @@ message." (setq prompt "Declination message: ") (setq success "declined") (setq failure "decline"))) - (let ((message (when prompt-for-message (read-from-minibuffer prompt))) + (let ((message (when (not do-not-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 @@ -147,22 +148,23 @@ message." (defun exco-org-accept-meeting-request (&optional argument) "Accept the meeting at point. -With a prefix argument, ARGUMENT, prompts for response message -text." +With a prefix argument, ARGUMENT, do not prompt for acceptance +message text, and do not send an acceptance response." (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." +With a prefix argument, ARGUMENT, do not prompt for declination +message text, and do not send a declination message." (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." +With a prefix argument, ARGUMENT, do not prompt for tentative +acceptance message text, and do not send a tentative acceptance +message." (interactive "P") (exco-org--reply-to-meeting 'tentatively-accept argument)) @@ -189,10 +191,16 @@ text." "cancelled meeting" "cancel meeting" (exco-org--remove-calendar-item))))))) -(defun exco-org-delete-appointment () - "Delete the appointment at point." - (interactive) - (when (exco-org--is-meeting) +(defun exco-org-delete-appointment (&optional argument) + "Delete the appointment at point. +With a prefix argument, ARGUMENT, force-delete this calendar item +without first checking if it is a meeting. This is required +sometimes, for example as a way to delete meetings for which one +is the organizer and the sole invitee, since the server will +refuse to send a meeting cancellation message to the organizer." + (interactive "P") + (when (and (not argument) + (exco-org--is-meeting)) (error "This looks like a meeting, try `exco-org-cancel-meeting' instead")) (let ((identifier (exco-org--connection-identifier-at-point)) (item-identifier (exco-org--item-identifier-at-point))) diff --git a/packages/excorporate/excorporate.info b/packages/excorporate/excorporate.info index 77b3867..9214a8d 100644 --- a/packages/excorporate/excorporate.info +++ b/packages/excorporate/excorporate.info @@ -121,6 +121,14 @@ this support, do: 'M-x excorporate-diary-enable' + Excorporate's diary front-end will retrieve today's meetings. +Subsequently 'appt' will pop up a reminder window several minutes prior +to each meeting. + + If you leave Emacs running overnight, at 12:01 AM 'appt' (via +Excorporate) will retrieve your meetings and display your diary so that +you see the day's events first thing in the morning. + Open the calendar with: 'M-x calendar' @@ -136,11 +144,11 @@ retrieved events. By default, 'excorporate-calendar-show-day-function' is set to 'exco-org-show-day' which displays meetings in a temporary read-only Org Mode buffer named '*Excorporate*'. - In the '*Excorporate*' buffer, you can run 'M-x + In the Org Mode '*Excorporate*' buffer, you can run 'M-x exco-org-decline-meeting-request' to decline a meeting request. To -provide a response message, 'C-u M-x exco-org-decline-meeting-request'. -Likewise for accepting ('exco-org-accept-meeting-request')or tentatively -accepting ('exco-org-accept-meeting-request') meeting requests. +accept, use ('exco-org-accept-meeting-request') or, to tentatively +accept, invoke ('exco-org-tentatively-accept-meeting-request'). Pass a +prefix argument to these functions to omit a reply message. A meeting is a calendar event to which at least one other person is invited. To cancel a meeting (or an occurence of a recurring meeting) @@ -148,18 +156,16 @@ that you organized, use 'M-x exco-org-cancel-meeting'. An appointment is a calendar item that has no invitees. To delete an appointment that you created, type 'M-x exco-org-delete-appointment'. +With a prefix argument, 'M-x exco-org-delete-appointment' can be used to +force-delete calendar items, whether they be meetings or appointments. +One example where this is necessary is when "cancelling" a meeting with +a single invitee, you, the organizer. The server will reject an attempt +to cancel such a meeting because it refuses to send the organizer a +cancellation message. If you prefer, you can install the 'calfw' package, and set 'excorporate-calendar-show-day-function' to 'exco-calfw-show-day'. - After you've retrieved today's meetings, 'appt' will warn you several -minutes before your next meeting starts by popping up a window with the -meeting details. - - If you leave Emacs running overnight, at 12:01 AM 'appt' (via -Excorporate) will retrieve your meetings and display your diary so that -you see the day's events first thing in the morning. - File: excorporate.info, Node: Troubleshooting, Next: API Usage, Prev: Usage, Up: Top @@ -729,8 +735,8 @@ Node: Reporting Bugs2399 Node: Installation2723 Node: Configuration2997 Node: Usage4017 -Node: Troubleshooting6106 -Node: API Usage8974 +Node: Troubleshooting6476 +Node: API Usage9344 End Tag Table diff --git a/packages/excorporate/excorporate.texi b/packages/excorporate/excorporate.texi index 4ea50ae..c9e943e 100644 --- a/packages/excorporate/excorporate.texi +++ b/packages/excorporate/excorporate.texi @@ -130,6 +130,14 @@ enable this support, do: @code{M-x excorporate-diary-enable} +Excorporate's diary front-end will retrieve today's meetings. +Subsequently @code{appt} will pop up a reminder window several minutes +prior to each meeting. + +If you leave Emacs running overnight, at 12:01 AM @code{appt} (via +Excorporate) will retrieve your meetings and display your diary so +that you see the day's events first thing in the morning. + @noindent Open the calendar with: @@ -148,12 +156,11 @@ view of retrieved events. By default, @code{exco-org-show-day} which displays meetings in a temporary read-only Org Mode buffer named @code{*Excorporate*}. -In the @code{*Excorporate*} buffer, you can run @kbd{M-x +In the Org Mode @code{*Excorporate*} buffer, you can run @kbd{M-x exco-org-decline-meeting-request} to decline a meeting request. To -provide a response message, @kbd{C-u M-x -exco-org-decline-meeting-request}. Likewise for accepting -(@code{exco-org-accept-meeting-request})or tentatively accepting -(@code{exco-org-accept-meeting-request}) meeting requests. +accept, use (@code{exco-org-accept-meeting-request}) or, to tentatively +accept, invoke (@code{exco-org-tentatively-accept-meeting-request}). +Pass a prefix argument to these functions to omit a reply message. A meeting is a calendar event to which at least one other person is invited. To cancel a meeting (or an occurence of a recurring meeting) @@ -161,20 +168,17 @@ that you organized, use @kbd{M-x exco-org-cancel-meeting}. An appointment is a calendar item that has no invitees. To delete an appointment that you created, type @kbd{M-x -exco-org-delete-appointment}. +exco-org-delete-appointment}. With a prefix argument, @kbd{M-x +exco-org-delete-appointment} can be used to force-delete calendar items, +whether they be meetings or appointments. One example where this is +necessary is when ``cancelling'' a meeting with a single invitee, you, +the organizer. The server will reject an attempt to cancel such a +meeting because it refuses to send the organizer a cancellation message. If you prefer, you can install the @code{calfw} package, and set @code{excorporate-calendar-show-day-function} to @code{exco-calfw-show-day}. -After you've retrieved today's meetings, @code{appt} will warn you -several minutes before your next meeting starts by popping up a window -with the meeting details. - -If you leave Emacs running overnight, at 12:01 AM @code{appt} (via -Excorporate) will retrieve your meetings and display your diary so -that you see the day's events first thing in the morning. - @node Troubleshooting @chapter Troubleshooting