Function: org-publish-file-relative-name

org-publish-file-relative-name is a byte-compiled function defined in ox-publish.el.gz.

Signature

(org-publish-file-relative-name FILENAME INFO)

Documentation

Convert FILENAME to be relative to current project's base directory.

INFO is the plist containing the current export state. The function does not change relative file names.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-publish.el.gz
(defun org-publish-file-relative-name (filename info)
  "Convert FILENAME to be relative to current project's base directory.
INFO is the plist containing the current export state.  The
function does not change relative file names."
  (let ((base (plist-get info :base-directory)))
    (if (and base
	     (file-name-absolute-p filename)
	     (file-in-directory-p filename base))
	(file-relative-name filename base)
      filename)))