Function: org-attach-check-absolute-path

org-attach-check-absolute-path is a byte-compiled function defined in org-attach.el.gz.

Signature

(org-attach-check-absolute-path DIR)

Documentation

Check if we have enough information to root the attachment directory.

When DIR is given, check also if it is already absolute. Otherwise, assume that it will be relative, and check if org-attach-id-dir is absolute, or if at least the current buffer has a file name. Throw an error if we cannot root the directory.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-attach.el.gz
(defun org-attach-check-absolute-path (dir)
  "Check if we have enough information to root the attachment directory.
When DIR is given, check also if it is already absolute.  Otherwise,
assume that it will be relative, and check if `org-attach-id-dir' is
absolute, or if at least the current buffer has a file name.
Throw an error if we cannot root the directory."
  (or (and dir (file-name-absolute-p dir))
      (file-name-absolute-p org-attach-id-dir)
      (buffer-file-name (buffer-base-buffer))
      (error "Need absolute `org-attach-id-dir' to attach in buffers without filename")))