External Links (Theory)

<2024-04-16 Tue>

Introduction

Org supports multiple external link types. Go here to see a full list:

External Link Types

These resemble URLs and their form is as follows:

identifier + colon + link proper

https: //www.youtube.com/channel/UCEqYjPJdmEcUVfHmQwJVM9A
file: /home/yal/Files-2024/orgmode-series
id: B7423F4D-2E8A-471B-8810-C40F074717E9
doi: 10.1000/182 (Digital Object Identifiers: a stable way to reference journal articles)
shell: ls *.org

Note: URLs have two forward slashes following their identifier and colon (standard)

For the most part one will be using external links for URLs and files.

Relevant Part of Manual

Linking to Files

File names may be remote, absolute, or relative.

One can specify additionally a line number, or even search text.

The "file" prefix is not always needed.

Main org directory

An example using Dired (M-0 w)
/home/yal/Files-2024/EmacsElements
Prefix with file:

Compare:

/home/yal/Files-2024/EmacsElements
file:/home/yal/Files-2024/EmacsElements
/home/yal/Pictures/2024-04-15_11-27.jpg
[[/home/yal/Pictures/2024-04-15_11-27.jpg]\]

One can use relative paths too in which case the directory can/but need not be specified:

file:video8-tables (current dir)
file:./video8-tables (idem)
file:../../.bashrc (parent dir)

./video8-tables

../../.bashrc

Here are examples with line numbers or search strings:

file:video8-tables::22
file:video8-tables::Example

file:sometextfile::NNN’ (jump to line number
file:projects.org
file:projects.org::some words’ (text search)2
file:projects.org::*task title’ (headline search
file:projects.org::#custom-id’ (headline search