Function: org-publish-find-property
org-publish-find-property is a byte-compiled function defined in
ox-publish.el.gz.
Signature
(org-publish-find-property FILE PROPERTY PROJECT &optional BACKEND)
Documentation
Find the PROPERTY of FILE in project.
PROPERTY is a keyword referring to an export option, as defined
in org-export-options-alist or in export back-ends. In the
latter case, optional argument BACKEND has to be set to the
back-end where the option is defined, e.g.,
(org-publish-find-property file :subtitle 'latex)
Return value may be a string or a list, depending on the type of
PROPERTY, i.e. "behavior" parameter from org-export-options-alist.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-publish.el.gz
(defun org-publish-find-property (file property project &optional backend)
"Find the PROPERTY of FILE in project.
PROPERTY is a keyword referring to an export option, as defined
in `org-export-options-alist' or in export back-ends. In the
latter case, optional argument BACKEND has to be set to the
back-end where the option is defined, e.g.,
(org-publish-find-property file :subtitle \\='latex)
Return value may be a string or a list, depending on the type of
PROPERTY, i.e. \"behavior\" parameter from `org-export-options-alist'."
(let ((file (org-publish--expand-file-name file project)))
(when (and (file-readable-p file) (not (directory-name-p file)))
(let* ((org-inhibit-startup t)
(visiting (find-buffer-visiting file))
(buffer (or visiting (find-file-noselect file))))
(unwind-protect
(plist-get (with-current-buffer buffer
(if (not visiting) (org-export-get-environment backend)
;; Protect local variables in open buffers.
(org-export-with-buffer-copy
(org-export-get-environment backend))))
property)
(unless visiting (kill-buffer buffer)))))))