4.4 External Links
Org supports links to files, websites, Usenet and email messages, BBDB database entries and links to both IRC conversations and their logs. External links are URL-like locators. They start with a short identifying string followed by a colon. There can be no space after the colon.
Here is the full set of built-in link types:
βfile
ββ
File links. File name may be remote, absolute, or relative.
Additionally, you can specify a line number, or a text search. In Org files, you may link to a headline name, a custom ID, or a code reference instead.
As a special case, βfile" prefix may be omitted if the file name is complete, e.g., it starts with β./
β, or β/
β.
βattachment
ββ
Same as file links but for files and folders attached to the current node (see Attachments). Attachment links are intended to behave exactly as file links but for files relative to the attachment directory.
βbbdb
ββ
Link to a BBDB record, with possible regexp completion.
βdocview
ββ
Link to a document opened with DocView mode. You may specify a page number.
βdoi
ββ
Link to an electronic resource, through its handle.
βelisp
ββ
Execute an Elisp command upon activation.
βgnus
β, βrmail
β, βmhe
ββ
Link to messages or folders from a given Emacsβ MUA.
βhelp
ββ
Display documentation of a symbol in β*Help*
β buffer.
βhttp
β, βhttps
ββ
Web links.
βid
ββ
Link to a specific headline by its ID property, in an Org file.
βinfo
ββ
Link to an Info manual, or to a specific node.
βirc
ββ
Link to an IRC channel.
βmailto
ββ
Link to message composition.
βnews
ββ
Usenet links.
βshell
ββ
Execute a shell command upon activation.
The following table illustrates the link types above, along with their options:
Link Type | Example |
---|---|
http | βhttp://staff.science.uva.nl/c.dominik/ β |
https | βhttps://orgmode.org/ β |
doi | βdoi:10.1000/182 β |
file | βfile:/home/dominik/images/jupiter.jpg β |
β/home/dominik/images/jupiter.jpg β (same as above) | |
βfile:papers/last.pdf β | |
β./papers/last.pdf β (same as above) | |
βfile:/ssh:me@some.where:papers/last.pdf β (remote) | |
β/ssh:me@some.where:papers/last.pdf β (same as above) | |
βfile:sometextfile::NNN β (jump to line number) | |
βfile:projects.org β | |
βfile:projects.org::some words β (text search)1 | |
βfile:projects.org::*task title β (headline search) | |
βfile:projects.org::#custom-id β (headline search) | |
attachment | βattachment:projects.org β |
βattachment:projects.org::some words β (text search) | |
docview | βdocview:papers/last.pdf::NNN β |
id | βid:B7423F4D-2E8A-471B-8810-C40F074717E9 β |
news | βnews:comp.emacs β |
mailto | βmailto:adent@galaxy.net β |
mhe | βmhe:folder β (folder link) |
βmhe:folder#id β (message link) | |
rmail | βrmail:folder β (folder link) |
βrmail:folder#id β (message link) | |
gnus | βgnus:group β (group link) |
βgnus:group#id β (article link) | |
bbdb | βbbdb:R.*Stallman β (record with regexp) |
irc | βirc:/irc.com/#emacs/bob β |
help | βhelp:org-store-link β |
info | βinfo:org#External links β |
shell | βshell:ls *.org β |
elisp | βelisp:(find-file "Elisp.org") β (Elisp form to evaluate) |
βelisp:org-agenda β (interactive Elisp command) |
On top of these built-in link types, additional ones are available through the βcontrib/
β directory (see Installation). For example, these links to VM or Wanderlust messages are available when you load the corresponding libraries from the βcontrib/
β directory:
βvm:folder β | VM folder link |
βvm:folder#id β | VM message link |
βvm://myself@some.where.org/folder#id β | VM on remote machine |
βvm-imap:account:folder β | VM IMAP folder link |
βvm-imap:account:folder#id β | VM IMAP message link |
βwl:folder β | Wanderlust folder link |
βwl:folder#id β | Wanderlust message link |
For information on customizing Org to add new link types, see Adding Hyperlink Types.
A link should be enclosed in double brackets and may contain descriptive text to be displayed instead of the URL (see Link Format), for example:
[[http://www.gnu.org/software/emacs/][GNU Emacs]]
If the description is a file name or URL that points to an image, HTML export (see HTML Export) inlines the image as a clickable button. If there is no description at all and the link points to an image, that image is inlined into the exported HTML file.
Org also recognizes external links amid normal text and activates them as links. If spaces must be part of the link (for example in βbbdb:R.*Stallman
β), or if you need to remove ambiguities about the end of the link, enclose the link in square or angular brackets.
- The actual behavior of the search depends on the value of the variable
org-link-search-must-match-exact-headline
. If its value isnil
, then a fuzzy text search is done. If it ist
, then only the exact headline is matched, ignoring spaces and statistic cookies. If the value isquery-to-create
, then an exact headline is searched; if it is not found, then the user is queried to create it.β©