Function: org-icalendar-export-to-ics
org-icalendar-export-to-ics is an autoloaded, interactive and
byte-compiled function defined in ox-icalendar.el.gz.
Signature
(org-icalendar-export-to-ics &optional ASYNC SUBTREEP VISIBLE-ONLY BODY-ONLY)
Documentation
Export current buffer to an iCalendar file.
If narrowing is active in the current buffer, only export its narrowed part.
If a region is active, export that region.
A non-nil optional argument ASYNC means the process should happen
asynchronously. The resulting file should be accessible through
the org-export-stack interface.
When optional argument SUBTREEP is non-nil, export the sub-tree at point, extracting information from the headline properties first.
When optional argument VISIBLE-ONLY is non-nil, don't export contents of hidden elements.
When optional argument BODY-ONLY is non-nil, only write code between "BEGIN:VCALENDAR" and "END:VCALENDAR".
Return ICS file name.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-icalendar.el.gz
;;; Interactive Functions
;;;###autoload
(defun org-icalendar-export-to-ics
(&optional async subtreep visible-only body-only)
"Export current buffer to an iCalendar file.
If narrowing is active in the current buffer, only export its
narrowed part.
If a region is active, export that region.
A non-nil optional argument ASYNC means the process should happen
asynchronously. The resulting file should be accessible through
the `org-export-stack' interface.
When optional argument SUBTREEP is non-nil, export the sub-tree
at point, extracting information from the headline properties
first.
When optional argument VISIBLE-ONLY is non-nil, don't export
contents of hidden elements.
When optional argument BODY-ONLY is non-nil, only write code
between \"BEGIN:VCALENDAR\" and \"END:VCALENDAR\".
Return ICS file name."
(interactive)
(let ((file (buffer-file-name (buffer-base-buffer))))
(when (and file org-icalendar-store-UID)
(org-icalendar-create-uid file 'warn-user)))
;; Export part. Since this back-end is backed up by `ascii', ensure
;; links will not be collected at the end of sections.
(let ((outfile (org-export-output-file-name ".ics" subtreep)))
(org-export-to-file 'icalendar outfile
async subtreep visible-only body-only
'(:ascii-charset utf-8 :ascii-links-to-notes nil)
'(lambda (file)
(run-hook-with-args 'org-icalendar-after-save-hook file) nil))))