Variable: org-link-abbrev-alist

org-link-abbrev-alist is a customizable variable defined in ol.el.gz.

Value

nil

Documentation

Alist of link abbreviations.

The car of each element is a string, to be replaced at the start of a link. The cdrs are replacement values, like ("linkkey" . REPLACE). Abbreviated links in Org buffers can have an optional tag after a double colon, e.g.,

     [[linkkey:tag][description]]

The linkkey must be a single word, starting with a letter, followed by letters, numbers, - or _.

If REPLACE is a string, the tag will simply be appended to create the link. If the string contains "%s", the tag will be inserted there. If the string contains "%h", it will cause a url-encoded version of the tag to be inserted at that point (see the function url-hexify-string). If the string contains the specifier "%(my-function)", then the custom function my-function will be invoked: this function takes the tag as its only argument and must return a string.

REPLACE may also be a function that will be called with the tag as the only argument to create the link, which should be returned as a string.

See the manual for examples.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ol.el.gz
(defcustom org-link-abbrev-alist nil
  "Alist of link abbreviations.
The car of each element is a string, to be replaced at the start of a link.
The cdrs are replacement values, like (\"linkkey\" . REPLACE).  Abbreviated
links in Org buffers can have an optional tag after a double colon, e.g.,

     [[linkkey:tag][description]]

The `linkkey' must be a single word, starting with a letter, followed
by letters, numbers, `-' or `_'.

If REPLACE is a string, the tag will simply be appended to create the link.
If the string contains \"%s\", the tag will be inserted there.  If the string
contains \"%h\", it will cause a url-encoded version of the tag to be inserted
at that point (see the function `url-hexify-string').  If the string contains
the specifier \"%(my-function)\", then the custom function `my-function' will
be invoked: this function takes the tag as its only argument and must return
a string.

REPLACE may also be a function that will be called with the tag as the
only argument to create the link, which should be returned as a string.

See the manual for examples."
  :group 'org-link
  :type '(repeat
	  (cons (string :tag "Protocol")
		(choice
		 (string :tag "Format")
		 (function))))
  :safe (lambda (val)
	  (pcase val
	    (`(,(pred stringp) . ,(pred stringp)) t)
	    (_ nil))))