Browse Source

New hook that is called before saving an exported iCalendar file.

Carsten Dominik 17 years ago
parent
commit
da4f268b84
1 changed files with 5 additions and 0 deletions
  1. 5 0
      lisp/org-exp.el

+ 5 - 0
lisp/org-exp.el

@@ -3901,12 +3901,17 @@ file and store it under the name `org-combined-agenda-icalendar-file'."
 	    (when (or (and combine (not files)) (not combine))
 	    (when (or (and combine (not files)) (not combine))
 	      (org-finish-icalendar-file)
 	      (org-finish-icalendar-file)
 	      (set-buffer ical-buffer)
 	      (set-buffer ical-buffer)
+	      (run-hooks 'org-before-save-iCalendar-file-hook)
 	      (save-buffer)
 	      (save-buffer)
 	      (run-hooks 'org-after-save-iCalendar-file-hook)
 	      (run-hooks 'org-after-save-iCalendar-file-hook)
 	      (and (boundp 'org-wait) (numberp org-wait) (sit-for org-wait))
 	      (and (boundp 'org-wait) (numberp org-wait) (sit-for org-wait))
 	      ))))
 	      ))))
       (org-release-buffers org-agenda-new-buffers))))
       (org-release-buffers org-agenda-new-buffers))))
 
 
+(defvar org-before-save-iCalendar-file-hook nil
+  "Hook run before  an iCalendar file has been saved.
+This can be used to modify the result of the export.")
+
 (defvar org-after-save-iCalendar-file-hook nil
 (defvar org-after-save-iCalendar-file-hook nil
   "Hook run after an iCalendar file has been saved.
   "Hook run after an iCalendar file has been saved.
 The iCalendar buffer is still current when this hook is run.
 The iCalendar buffer is still current when this hook is run.