소스 검색

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

Carsten Dominik 17 년 전
부모
커밋
da4f268b84
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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.