gnus-icalendar can update org entry for canceled appointments.
authorJan Tatarik <jan.tatarik@gmail.com>
Wed, 13 Nov 2013 16:02:50 +0000 (17:02 +0100)
committerAdam Sjøgren <asjo@koldfront.dk>
Wed, 13 Nov 2013 20:41:11 +0000 (21:41 +0100)
* gnus-icalendar.el (gnus-icalendar-event:sync-to-org)
(gnus-icalendar-event:inline-org-buttons): Allow for appointment
cancellations to be synced to org if the original appt has an org
outline.

lisp/ChangeLog
lisp/gnus-icalendar.el

index 6e98f8f..45af3d8 100644 (file)
@@ -1,3 +1,10 @@
+2013-11-13  Jan Tatarik  <jan.tatarik@gmail.com>
+
+       * gnus-icalendar.el (gnus-icalendar-event:sync-to-org)
+       (gnus-icalendar-event:inline-org-buttons): Allow for appointment
+       cancellations to be synced to org if the original appt has an org
+       outline.
+
 2013-11-13  Jan Tatarik  <jan.tatarik@gmail.com>
 
        * gnus-icalendar.el (gnus-icalendar--format-summary-line)
index cbb2855..064ba84 100644 (file)
@@ -546,7 +546,7 @@ is searched."
       (gnus-icalendar--update-org-event event reply-status)
     (gnus-icalendar:org-event-save event reply-status)))
 
-(defmethod gnus-icalendar-event:sync-to-org ((event gnus-icalendar-event-cancel))
+(defmethod gnus-icalendar-event:sync-to-org ((event gnus-icalendar-event-cancel) reply-status)
   (when (gnus-icalendar-find-org-event-file event)
     (gnus-icalendar--cancel-org-event event)))
 
@@ -723,6 +723,18 @@ is searched."
                (when org-entry-exists-p
                  `("Show Org Entry" gnus-icalendar--show-org-event ,event))))))
 
+
+(defmethod gnus-icalendar-event:inline-org-buttons ((event gnus-icalendar-event-cancel))
+  (let ((org-entry-exists-p (gnus-icalendar-find-org-event-file event)))
+
+    (delq nil (list
+               `("Show Agenda" gnus-icalendar-show-org-agenda ,event)
+               (when org-entry-exists-p
+                 `("Update Org Entry" gnus-icalendar-sync-event-to-org ,event))
+               (when org-entry-exists-p
+                 `("Show Org Entry" gnus-icalendar--show-org-event ,event))))))
+
+
 (defun gnus-icalendar-mm-inline (handle)
   (let ((event (gnus-icalendar-event-from-handle handle gnus-icalendar-identities)))