Variable: org-link-file-path-type

org-link-file-path-type is a customizable variable defined in ol.el.gz.

Value

adaptive

Documentation

How the path name in file links should be stored.

Valid values are:

relative Relative to the current directory, i.e. the directory of the file
          into which the link is being inserted.
absolute Absolute path, if possible with ~ for home directory.
noabbrev Absolute path, no abbreviation of home directory.
adaptive Use relative path for files in the current directory and sub-
          directories of it. For other files, use an absolute path.

Alternatively, users may supply a custom function that takes the filename in the link as an argument and returns the path.

This variable was added, or its default value changed, in Org version
9.5.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ol.el.gz
(defcustom org-link-file-path-type 'adaptive
  "How the path name in file links should be stored.
Valid values are:

relative  Relative to the current directory, i.e. the directory of the file
          into which the link is being inserted.
absolute  Absolute path, if possible with ~ for home directory.
noabbrev  Absolute path, no abbreviation of home directory.
adaptive  Use relative path for files in the current directory and sub-
          directories of it.  For other files, use an absolute path.

Alternatively, users may supply a custom function that takes the
filename in the link as an argument and returns the path."
  :group 'org-link
  :type '(choice
	  (const relative)
	  (const absolute)
	  (const noabbrev)
	  (const adaptive)
	  (function))
  :package-version '(Org . "9.5")
  :safe #'symbolp)