docs/manual/guide/09-links.org

614 lines · 34757 bytes

  1#+TITLE: Links
  2#+DESCRIPTION: Link syntax, the link types orgstar follows, storing and inserting links, IDs, backlinks and inline images.
  3#+LEDE: Write links as Org does, follow them with a key or a click, and see which headings link to the one you are reading.
  4
  5* Link syntax
  6
  7orgstar reads links the way =org-element-link-parser= does. There are three forms.
  8
  9| Form          | Example                                   | Notes                                                       |
 10|---------------+-------------------------------------------+-------------------------------------------------------------|
 11| Bracket link  | =[[https://orgmode.org][Org website]]=    | Any link type. The description after =][= is optional.     |
 12| Angle link    | =<https://orgmode.org>=                   | For =http=, =https=, =mailto=, =file=, =id=, =doi=, =ftp=, =news=, =shell=, =elisp=, =info=, =help= and =attachment=. |
 13| Plain link    | =https://orgmode.org=                     | Only =https://=, =http://=, =mailto:= and =file:= are recognized in running text. |
 14
 15Inside a bracket link, a target that starts with =/=, =~=, =./= or =../= is a file
 16link. A target in parentheses, =(name)=, is a coderef. One that starts with =#= is a
 17custom ID. Anything without a known =type:= prefix is a search for text in the
 18current file (a "fuzzy" link). A link may run over a line break; the break and
 19surrounding blanks read as one space.
 20
 21Backslashes before brackets are escaped as in =org-link-escape=: when orgstar writes
 22a link it doubles backslashes that come before a bracket or the end, and it reads them
 23back the same way.
 24
 25* How links display
 26
 27With View ▸ Show Markup off (the default, =⇧⌘M= toggles it), a link with a
 28description shows only its description, and its brackets and target are hidden. This
 29is =org-link-descriptive=. The full text appears on the line that holds the caret, so
 30you can edit it. With Show Markup on, every link shows as written. The setting is
 31=show-markup= under =[orgstar]= in the config file (see
 32[[file:13-configuration.org][Configuration]]).
 33
 34Links without a description show their target, with the brackets hidden in the same
 35way. Radio targets (=<<<words>>>=) turn every other occurrence of those words in the
 36file into a link, matched case-insensitively, as in Org.
 37
 38* Following links
 39
 40=org-open-at-point= follows the link at the caret, or opens the agenda for a timestamp.
 41
 42| Preset | Key                                                                                   |
 43|--------+---------------------------------------------------------------------------------------|
 44| Emacs  | =C-c C-o=                                                                             |
 45| Mac    | =⌃⌘O=                                                                                 |
 46| Doom   | =C-c C-o= in any state; =RET= in normal state follows a link before doing anything else |
 47| All    | =⌘=-click on the link; =o= at the start of a heading line when speed commands are on   |
 48
 49A message in the echo area explains a link that can't be followed.
 50
 51** What each link type does
 52
 53| Link                                         | Example                              | Result                                                                                     |
 54|----------------------------------------------+--------------------------------------+--------------------------------------------------------------------------------------------|
 55| =http=, =https=, =ftp=, =news=, =mailto=     | =[[mailto:me@example.com]]=          | Opened by macOS in your default browser or mail app.                                       |
 56| =doi=                                        | =[[doi:10.1000/182]]=                | Opens =https://doi.org/= followed by the DOI.                                              |
 57| =file= (also =file+sys:=, =file+emacs:=)     | =[[file:notes.org::*Ideas]]=         | See /File links/ below.                                                                 |
 58| =id=                                         | =[[id:6a3c…]]=                       | Opens the file with the heading whose =ID= property matches, and moves to the heading.     |
 59| Custom ID                                    | =[[#setup]]=                         | Moves to the heading in this file whose =CUSTOM_ID= property is =setup=.                   |
 60| Heading                                      | =[[*Weekly review]]=                 | Moves to the heading in this file with that title.                                         |
 61| Text                                         | =[[budget table]]=                   | Searches this file: a =<<budget table>>= target, then =#+NAME: budget table=, then a heading. |
 62| Coderef                                      | =[[(ref)]]=                          | Moves to the label =(ref:ref)= in a src or example block; see /Code references/ below.      |
 63| Regexp                                       | =[[/TODO.*soon/]]=                   | Shows a sparse tree of the regular expression's matches, as =org-occur=; iOS moves to the first match. |
 64| =shell=, =elisp=                             | =[[shell:ls]]=                       | Not run. orgstar never executes these links.                                               |
 65| =attachment=                                 | =[[attachment:scan.pdf]]=            | Opens the file in the entry's attachment folder; see /Attachment links/ below.             |
 66| Radio link                                   | Text matching a =<<<radio target>>>= | Moves to the radio target.                                                                 |
 67| =info=, =help=, others                       |                                      | Not followed. The echo area says orgstar can't open the type.                              |
 68
 69The text search follows =org-link-search=. A dedicated =<<target>>= matches its words
 70case-insensitively, with any run of blanks between them. A heading matches when its
 71title, with statistics cookies such as =[2/5]= and a leading =COMMENT= removed, has the
 72same words as the link, ignoring case. A search that starts with =*= looks at headings
 73only. A regular-expression search (=/re/=) shows a sparse tree of its matches on the
 74Mac, as =org-occur= does, and moves to the first match on iOS.
 75
 76Following a radio link moves to its =<<<radio target>>>=, matching the words without
 77regard to case, as =org-link--search-radio-target= does. When the target is gone, the
 78echo area shows =No match for radio target:= and the text.
 79
 80** File links
 81
 82A relative path is resolved against the folder of the file that holds the link, as
 83Org does; =~= is your home folder; an absolute path is used as written. Links between
 84files in different sidebar folders work the same way, for example
 85=[[file:../work/projects.org]]= or =[[file:~/Documents/org/inbox.org]]=.
 86
 87What happens depends on the file:
 88
 89- An =.org= or =.org_archive= file opens as a buffer in orgstar.
 90- Another text file opens in orgstar as a plain buffer.
 91- Anything else (images, PDFs, archives, media) is handed to macOS, which opens it in
 92  the default app for that type.
 93
 94If the file doesn't exist, the echo area shows =No file= and the path.
 95
 96After =::=, a file link can carry a search option:
 97
 98| Option          | Example                          | Moves to                                    |
 99|-----------------+----------------------------------+---------------------------------------------|
100| A number        | =[[file:log.txt::120]]=          | Line 120.                                   |
101| =*Title=        | =[[file:notes.org::*Ideas]]=     | The heading with that title.                |
102| =#custom-id=    | =[[file:notes.org::#setup]]=     | The heading with that =CUSTOM_ID=.          |
103| Other text      | =[[file:notes.org::budget]]=     | A target, a =#+NAME= or a heading, as above. |
104
105** Attachment links
106
107An =attachment:= link names a file in the attachment folder of the entry that holds
108the link (see [[file:04-outlines.org][Outlines]] for the attachment commands). Relative folders are resolved
109against the folder of the file that holds the link:
110
1111. When the entry has a =DIR= property, or the older =ATTACH_DIR=, that folder.
1122. Otherwise, for an entry with an =ID=, the first of these folders that exists:
113   =org-attach-id-dir= (=data/=) followed by the ID's first two characters, =/= and
114   the rest of the ID; followed by its first six characters, =/= and the rest;
115   =__/=, the ID's first character, =/= and the whole ID. When =org-attach-id-dir= is
116   something else, the same folders under =data/= are found too.
117
118=org-attach-use-inheritance= decides whether =DIR= and =ID= may come from an ancestor.
119
120When the folder does not exist, the path is relative to the file's own folder. The file then opens as a =file:= link would, and
121a search option after =::= works the same way.
122
123** id links
124
125=id:= links are resolved through the index, so the target heading must be in a file
126under one of your sidebar folders. An =ID= in the property drawer before a file's first
127heading names the file, as org-roam's file nodes do, and the link opens the file. A link
128to an ID that isn't indexed shows =No heading has the ID= followed by the ID.
129
130** denote links
131
132=denote:= links name a Denote note by its identifier, as in
133=[[denote:20261119T120000][A note]]=. The note is the indexed file whose name has the
134identifier, at its start or after =@@=; an Org file comes before others with the same
135identifier, such as a PDF. A search after =::=, such as =::#custom-id= or =::*Heading=,
136works as in a =file:= link. Backlinks list =denote:= links to a file, and to a heading when
137the link searches for it.
138
139** Timestamps
140
141=C-c C-o= (Mac =⌃⌘O=) or =⌘=-click on a timestamp opens the agenda on that day, as
142=org-follow-timestamp-link= does. On a date range such as
143=<2026-10-05 Mon>--<2026-10-09 Fri>=, the agenda shows the whole span. See
144[[file:07-agenda.org][Agenda]].
145
146* Inserting and editing links
147
148=org-insert-link= asks for a link and a description in the echo area.
149
150| Preset | Key                          |
151|--------+------------------------------|
152| Emacs  | =C-c C-l=                    |
153| Mac    | =⌘K=                         |
154| Doom   | =SPC m l l=, or =C-c C-l=    |
155
156The first prompt reads =Insert link:=, or =Insert link (default …):= when you have
157stored links. It completes from:
158
159- your stored links, most recent first, and their descriptions;
160- the link abbreviations defined in the file (see /Link abbreviations/);
161- the link types =attachment=, =id=, =eww=, =rmail=, =mhe=, =irc=, =info=, =gnus=, =docview=,
162  =bibtex=, =bbdb=, =w3m=, =doi=, =file+sys=, =file+emacs=, =shell=, =news=, =mailto=,
163  =https=, =http=, =ftp=, =shortdoc=, =help=, =file= and =elisp=, each followed by =:=.
164
165Pressing Return on an empty answer inserts the most recent stored link. Choosing a
166description inserts the link it belongs to. If you choose a bare type such as =https:=,
167a second prompt, =Link (no completion support):=, asks for the rest.
168
169The next prompt, =Description:=, offers the stored link's description, or the
170selected text if you selected some before running the command. An empty description
171inserts a link without one. With text selected, the link replaces the selection.
172
173When the caret is on an existing link, the same command edits it: the =Link:= prompt
174starts with the current target and =Description:= with the current description.
175
176A stored link that you insert is removed from the stored list, as with
177=org-link-keep-stored-after-insertion= set to nil.
178
179** File paths in inserted links
180
181When the inserted link is a =file:= link, orgstar rewrites it as
182=org-link-make-string-for-buffer= does:
183
184- A link to a heading or target in the file you are editing loses its =file:= part
185  and keeps only the search, for example =[[*Ideas]]=.
186- A path under the current file's folder becomes relative to it.
187- Any other path is written with =~= for your home folder.
188
189** Completion while typing
190
191You can also type a link by hand. With the caret right after =[[=, completion at point
192offers =attachment:=, =doi:=, =file:=, =http:=, =https:=, =id:= and =mailto:=, plus
193the file's link abbreviations. After =[[*=, it offers the headings of the current file.
194Completion at point is =C-M-i= in the Emacs preset and =C-SPC= in Doom's insert state;
195see [[file:02-the-editor.org][The editor]].
196
197* Storing links
198
199=org-store-link= remembers a link to where the caret is, for a later Insert Link.
200
201| Preset | Key                                   |
202|--------+---------------------------------------|
203| Emacs  | =C-c l=                               |
204| Mac    | =⌃⌘L=                                 |
205| Doom   | =SPC m l s= or =SPC n l=              |
206
207The stored link is a =file:= link to the current file, written with =~= for your home
208folder, followed by a search option chosen as Org does with
209=org-link-context-for-files= on:
210
2111. If the caret touches a =<<target>>= on its line, the link points at the target.
2122. Otherwise, if text is selected, the link searches for that text.
2133. Otherwise, if the caret is in an element with a =#+NAME=, the link uses the name.
2144. Otherwise, inside a heading's entry, the link uses =#custom-id= if the heading has a
215   =CUSTOM_ID= property, and =*Title= if not. The title becomes the description.
2165. Before the first heading, the link searches for the text of the current line.
217
218The echo area shows =Stored:= and the description or link. Storing the same link again
219moves it to the front of the list. Stored links last until you quit orgstar; they
220aren't saved between sessions, as in Emacs.
221
222* IDs
223
224Org identifies headings across files with an =ID= property. Two commands manage it.
225
226| Command               | Org function                          | Keys                              |
227|-----------------------+---------------------------------------+-----------------------------------|
228| Org ▸ Create ID       | =org-id-get-create=                   | No default key                    |
229| Org ▸ Store ID Link   | =org-id-get-create= + =org-id-store-link= | Doom =SPC m l i=; no key in Emacs or Mac |
230
231Create ID gives the heading at the caret an =ID= property if it doesn't have one. The
232ID is a new UUID in lower case, for example =6a3c2f9e-…=, as =org-id-uuid= makes them. Before the first heading,
233the property goes into the file-level property drawer.
234
235Store ID Link does the same, then stores an =id:= link to the heading with its title
236as the description. Before the first heading, the description is the =#+TITLE=, or
237the file name. If the caret is on a target or named element inside the entry, the
238link carries that search, as =id:…::search=, which mirrors =org-id-link-use-context=.
239
240=CUSTOM_ID= is a property you set yourself, with the property commands in
241[[file:04-outlines.org][Outlines]]. Link to it with =[[#name]]= in the same file or
242=[[file:other.org::#name]]= from another. Store Link uses it when the heading has one.
243
244* Targets and radio targets
245
246=<<target>>= marks a place in the text that a link with the same words reaches:
247=[[target]]=. Store Link with the caret on a target stores a link to it.
248
249=<<<radio target>>>= makes every other occurrence of its words in the file a link,
250matched case-insensitively and between non-word characters. Radio links are
251highlighted as links and exported as links to the target (see
252[[file:12-export.org][Export]]). Following one moves to the radio target.
253
254* Link abbreviations
255
256A =#+LINK:= line defines an abbreviation, as =org-link-abbrev-alist-local= does:
257
258#+BEGIN_SRC org
259,#+LINK: gh https://github.com/%s
260,#+LINK: search https://duckduckgo.com/?q=%h
261,#+LINK: wiki https://en.wikipedia.org/wiki/
262
263[[gh:orgmode/org-mode]]   → https://github.com/orgmode/org-mode
264[[search:org tables]]     → https://duckduckgo.com/?q=org%20tables
265[[wiki:Org-mode]]         → https://en.wikipedia.org/wiki/Org-mode
266#+END_SRC
267
268In the template, =%s= is replaced by the text after the colon, =%h= by the same text
269percent-encoded, and a template with neither has the text appended. Function
270templates (=%(…)=) are not supported. Abbreviations from a =#+SETUPFILE= count too.
271When a key is defined twice, the first definition wins.
272
273* The backlinks pane
274
275View ▸ Show or Hide Backlinks shows a pane under the outline pane of an org file. It
276has two sections:
277
278- *Links to* the heading at the caret, named after that heading.
279- *Links to this file*.
280
281Each row shows the linking heading, the line the link is on with links shown as they read
282and this one in bold, and the file name; a link in the text before a file's first heading is
283listed under the file's name. Click a row to open it. The
284pane is shown by default, orgstar remembers whether it is shown, and it updates as
285you move the caret and edit.
286
287The pane looks at every org file in your sidebar folders, including unsaved changes
288in open buffers. A link counts when following it would lead to the heading or the
289file:
290
291- =id:= links to the heading's =ID=, or to the file's own =ID= for the file section;
292- =file:= links and plain paths (=./=, =../=, =/=, =~/=) to the file, with no search
293  option for the file section, or with =::*Title=, =::#custom-id= or =::Title= for a
294  heading;
295- within the same file, =[[*Title]]=, =[[#custom-id]]= and =[[Title]]=.
296
297Links to targets, names and line numbers are not counted. A heading's links to itself
298are left out.
299
300* Nodes and daily notes
301
302orgstar works with notes kept the org-roam way: headings and files with an =ID= are
303/nodes/, linked with =id:= links, and a daily note is a file a day. It reads them from
304the index, without org-roam's database.
305
306| Command | Emacs | Doom | What it does |
307|-+-+-+-|
308| Find Node… | =C-c n f= | =SPC n r f= | Asks for a node by title and opens it (=org-roam-node-find=). |
309| Insert Node Link… | =C-c n i= | =SPC n r i= | Asks for a node and inserts =[[id:…][Title]]=; with a selection, the selection is the description (=org-roam-node-insert=). |
310| Go to Today's, Yesterday's, Tomorrow's Daily Note | =C-c n d d=, =y=, =t= | =SPC n r d t=, =y=, =m= | Opens the day's note, making it if missing (=org-roam-dailies-goto-today= and the others). |
311| Go to Daily Note for Date… | =C-c n d c= | =SPC n r d d= | Asks for a date, then opens its note. |
312| Capture to Today's Daily Note (and Yesterday's, Tomorrow's, for Date…) | =C-c n j=, =C-c n d n=, =C-c n d v= | =SPC n r d n=, =T=, =Y=, =M=, =D= | Files the entry template at the end of the day's note and opens it at =%?= (=org-roam-dailies-capture-today= and the others). |
313| Next Daily Note, Previous Daily Note | =C-c n d f=, =b= | =SPC n r d f=, =b= | From a daily note, opens the next or previous one there is (=org-roam-dailies-goto-next-note=). |
314
315The keys are the ones org-roam's manual suggests for Emacs and Doom's. Titles that
316repeat show their file's name. A file node's title is its =#+TITLE=, or its name.
317
318A title that no node has makes a new node, as org-roam's default capture template does: a file named =%<%Y%m%d%H%M%S>-${slug}.org= in =org-roam-directory= (the first folder unless it is set), starting with an =ID= property drawer and =#+title:= and the title. Find Node… opens it; Insert Node Link… links to it. The slug is the title in lower case, accents dropped, with everything but letters and digits as one =_=, as =org-roam-node-slugify= makes it.
319
320Daily notes are in =org-roam-dailies-directory= (=daily/=) under =org-roam-directory=,
321which is the first sidebar folder unless set. A new note is named and started as
322org-roam's default daily template does it, with an =ID= like every new org-roam file:
323
324#+BEGIN_SRC org
325,:PROPERTIES:
326,:ID:       5f0c1e2a-…
327,:END:
328,#+title: 2026-10-11
329#+END_SRC
330
331=org-roam-dailies-file= (="%<%Y-%m-%d>.org"=), =org-roam-dailies-head=
332(="#+title: %<%Y-%m-%d>\n"=) and =org-roam-dailies-entry= (="* %?"=) change the file name,
333what a new note starts with, and what capturing adds; =%<…>= formats the note's date as
334=format-time-string= does. The entry is an org-capture template; its date escapes
335(=%t=, =%U= and the like) use the note's day. Import from Emacs reads them from the first of
336=org-roam-dailies-capture-templates=. See [[file:13-configuration.org][Configuration]].
337
338** Denote
339
340With =notes-package = "denote"= in =config.toml=, the same commands follow Denote:
341
342- Find Node… and Insert Node Link… list the Org files whose names have a Denote
343  identifier, titled by their =#+title:=, and Insert Node Link… inserts
344  =[[denote:…][Title]]=.
345- A title no note has makes a note in =denote-directory= (the first folder unless set),
346  after the questions =denote-prompts= lists, in its order. The default is
347  ="title keywords"=; the title is always the one typed.
348  - =keywords=: separated by commas or spaces, offering the keywords in existing file
349    names.
350  - =subdirectory=: a folder under =denote-directory= (=.= for itself) to put the note in.
351  - =date=: the note's date, read as =org-read-date= reads one; without a time, the time
352    is now's.
353  - =template=: a key of =[denote-templates]=, whose text goes after the front matter.
354  - =signature=: put in the name after ~==~, in lower case with ~=~ between words, and
355    in a =#+signature:= line.
356
357  =file-type= and =identifier= are not asked: notes are Org, and the identifier is the
358  date's, or the first second after it no file under =denote-directory= has. With the
359  default prompts:
360
361  #+BEGIN_SRC org
362  ,#+title:      Field Notes
363  ,#+date:       [2026-11-19 Thu 12:00]
364  ,#+filetags:   :ideas:work:
365  ,#+identifier: 20261119T120000
366  #+END_SRC
367
368  named =20261119T120000--field-notes__ideas_work.org=: the title in lower case without
369  punctuation, words joined by =-=; the keywords sorted, each one word, joined by =_=.
370- The daily-note commands work on denote-journal's entries: notes in
371  =denote-journal-directory= (=journal=, under =denote-directory=) with the
372  =denote-journal-keyword= (=journal=). With =denote-journal-interval= (=daily=), one entry
373  lasts a day, a week (Monday to Sunday), a month or a year, and the entry for a date is
374  the one whose identifier's date is in that stretch. denote-journal itself takes a date
375  outside the current week, month or year as today; orgstar uses the date's own. A new
376  entry is titled by =denote-journal-title-format= (="%A %-e %B %Y %H:%M"=). Capturing
377  adds =org-roam-dailies-entry= as for org-roam.
378- Store Link in a Denote note stores =[[denote:ID][Title]]=, or =denote:ID::#custom-id=
379  in an entry with a =CUSTOM_ID=, as Denote does with =denote-org-store-link-to-heading=
380  nil.
381
382=denote-directory= can hold several folders, separated by =:=. New notes go in the first;
383the =subdirectory= question offers all of them and their folders, and identifiers are
384kept unique across them.
385
386*** Renaming
387
388- Rename Note… (=denote-rename-file=) asks the questions =denote-prompts= has among
389  =title=, =keywords=, =signature= and =date=, each starting with the current value, then
390  renames the file in its folder and rewrites its front matter. Empty answers remove a
391  part. A file without an identifier gets one from its modification time; a file
392  without front matter gets it added at the top.
393- Rename Note from Front Matter renames the open file from its =#+title:=,
394  =#+filetags:= and =#+signature:=, keeping its identifier, as
395  =denote-rename-file-using-front-matter= does. A missing line leaves that part out of
396  the name, and the keywords keep their order.
397- Rename Notes in Folder from Front Matter… does that for every Denote note in a
398  folder of =denote-directory=, as =denote-dired-rename-marked-files-using-front-matter=
399  does with them all marked.
400
401Links keep working after a rename, as they use the identifier.
402
403*** Query links
404
405=[[denote:query-contents:REGEXP]]= and =[[denote:query-filenames:REGEXP]]= offer the
406notes whose text, or name, the Emacs regexp matches, ignoring case, and open the one
407chosen. In the iOS reader they list the matches.
408
409*** Silos
410
411New Note in Silo… and Find Note in Silo… (denote-silo) ask for a folder of
412=denote-silo-directories= (=denote-directory='s folders unless set, separated by =:=)
413and work as if it were =denote-directory=. Find Note in Silo… lists the notes in the
414sidebar folders that are under it.
415
416*** Capture
417
418A capture template with =denote = true= and no =file= puts its entry in a new note, as
419=denote-org-capture= does: it asks for the title and the =denote-prompts= questions before
420its own. See [[file:08-capture.org][Capture]].
421
422#+BEGIN_SRC toml
423[[template]]
424key = "n"
425name = "New note"
426denote = true
427type = "plain"
428template = "%i\n%?"
429#+END_SRC
430
431*** Dynamic blocks
432
433denote-org's dynamic blocks update with =C-c C-c= on their =#+BEGIN:= line or Update
434Dynamic Block, over the files in =denote-directory=:
435
436| Block | What it lists |
437|-------+---------------|
438| =denote-links= | Links to the notes whose names (relative to =denote-directory=) match =:regexp= |
439| =denote-missing-links= | The same, without the notes this file links to already |
440| =denote-backlinks= | Links to the notes that link to this one |
441| =denote-files= | The text of the notes matching =:regexp= |
442| =denote-files-as-headings= | The same, each note's title a heading and its headings one level down |
443| =denote-sequence= | A note's descendants, =:depth= levels deep, indented; with =:sequence ""= every note with a sequence |
444
445Insert Denote Links Block, Insert Denote Missing Links Block, Insert Denote Backlinks Block,
446Insert Denote Files Block, Insert Denote Files as Headings Block and Insert Denote Sequence
447Block (=denote-org-dblock-insert-links= and the others) ask what denote-org asks (the
448regexp; for files, the sort component; for a sequence, the note and the depth, 2 by
449default), then insert the block with all its parameters and fill it.
450
451They take denote-org's parameters: =:not-regexp=, =:sort-by-component= (=title=,
452=keywords=, =signature=, =identifier=, =last-modified=, =random=), =:reverse-sort=,
453=:id-only=, =:include-date=, =:block-name=, and for =denote-files= =:no-front-matter=,
454=:add-links= and =:file-separator=, for =denote-files-as-headings= =:add-links= and
455=:exclude-tags=. =:excluded-dirs-regexp=, =:this-heading-only= and =rx= forms aren't
456supported.
457
458#+BEGIN_SRC org
459,#+BEGIN: denote-links :regexp "_emacs" :sort-by-component title
460,#+END:
461#+END_SRC
462
463*** Sequences
464
465denote-sequence numbers notes in a hierarchy through their signatures, in the scheme
466=denote-sequence-scheme= sets: =numeric= (~1~, ~1=1~, ~1=1=2~), =alphanumeric= (~1~,
467~1a~, ~1a2~) or =alphanumeric-delimited= (~1~, ~1=a~, ~1=a2~). New sequences come out
468as denote-sequence 0.3 gives them.
469
470| Command | denote-sequence |
471|---------+-----------------|
472| New Sequence Note… | =denote-sequence-new-parent= |
473| New Child Sequence Note…, New Sibling Sequence Note… | =denote-sequence-new-child=, =-new-sibling= |
474| New Child of This Note…, New Sibling of This Note… | =denote-sequence-new-child-of-current=, =-new-sibling-of-current= |
475| Find Sequence Relatives… | =denote-sequence-find=: all parents, the parent, siblings, children or all children |
476| Next Sibling Note, Previous Sibling Note | =denote-sequence-find-next-sibling=, =-previous-sibling= |
477| Reparent Note…, Reparent Note with Descendants… | =denote-sequence-reparent=, =-reparent-recursive= |
478| Rename Note as Sequence Parent | =denote-sequence-rename-as-parent= |
479| Convert Note Sequence Scheme | =denote-sequence-convert= to =denote-sequence-scheme= |
480| Insert Sequence Link… | =denote-sequence-link= |
481| Sequence Hierarchy… | =denote-sequence-view-hierarchy=, as a list to open a note from |
482
483A new sequence note asks for its title and the =denote-prompts= questions other than
484=signature=, which is the sequence.
485
486*** Importing and limits
487
488Import from Emacs reads =denote-directory= (a folder or a list), =denote-prompts=,
489=denote-templates=, =denote-silo-directories=, =denote-sequence-scheme=,
490=denote-journal-directory=, =denote-journal-keyword=, =denote-journal-interval= and
491=denote-journal-title-format=. Templates that are functions, and Denote notes in
492Markdown or plain text, are not supported.
493
494* Inline images
495
496=org-toggle-inline-images= shows image links as images.
497
498| Preset | Key                                          |
499|--------+----------------------------------------------|
500| Emacs  | =C-c C-x C-v=                                |
501| Mac    | Org ▸ Show or Hide Inline Images             |
502| Doom   | =C-c C-x C-v=                                |
503
504The echo area reports how many images are shown, or that inline display is off.
505
506A line shows an image when it holds nothing but a bracket link, without a description,
507to a file ending in =.png=, =.jpg=, =.jpeg=, =.gif=, =.svg=, =.webp=, =.tif=, =.tiff=,
508=.bmp=, =.heic= or =.avif= (in any case):
509
510#+BEGIN_SRC org
511[[file:images/diagram.png]]
512[[./photo.jpg]]
513#+END_SRC
514
515Relative paths are resolved against the file's folder, and =attachment:= links against the
516entry's attachment folder. The link text is hidden while the image is shown, except on the
517line that holds the caret, where the image is drawn under the link.
518
519** Pasting and dropping images
520
521Paste (⌘V, or Edit ▸ Paste on iOS) with an image on the clipboard and no text runs
522=yank-media=, as in Emacs 29 and later: the image is saved as =org-yank-image-save-method=
523says and a link to it is inserted at the caret. M-x =yank-media= does the same on the Mac.
524
525| =org-yank-image-save-method= | Where the image goes                                                     | Link                    |
526|------------------------------+--------------------------------------------------------------------------+-------------------------|
527| =attach= (the default)       | The entry's attachment folder, as =org-attach-attach= puts it            | =[[attachment:NAME]]=   |
528| a folder, such as ="images/"= | That folder, relative to the file's folder unless absolute; made if missing | =[[file:images/NAME]]= |
529
530The name is Org's: =clipboard-= and the time, as in =clipboard-20261011T232238.png=; a
531second image in the same second gets =-2=. PNG, JPEG and GIF are saved as they are, and
532other image types as PNG. Before the first heading, =attach= gives the file a file-level
533=ID=, as Emacs does.
534
535Files dropped on the editor on the Mac, or pasted after copying them in Finder, are handled
536as =org-yank-dnd-method= says: =attach= copies them into the entry's attachment folder (an
537image goes to the =org-yank-image-save-method= folder when that is a folder), =file-link=
538links to them where they are, =open= opens them, and =ask=, the default, asks which. An
539image dragged in without a file, such as one from a browser, is pasted as above. On iOS,
540dropped files are always attached, since what a drop hands over is a copy. Attach Photo or
541Video… and Take Photo… also insert their links at the caret.
542
543Two things differ from Emacs, so that a pasted image shows at once: the link has no
544description (Org writes =[[attachment:NAME][NAME]]=, which inline display skips), and it
545goes on a line of its own, breaking the line around the caret when it holds text.
546
547** Remote images
548
549Images at =http= and =https= links show as =org-display-remote-inline-images= in
550=config.toml= says:
551
552| Value      | Remote images                                                                |
553|------------+------------------------------------------------------------------------------|
554| =skip=     | Not shown; the default                                                       |
555| =download= | Fetched the first time they're shown, and kept until orgstar quits           |
556| =cache=    | Fetched once and kept on disk, in the app's cache folder, for later launches |
557
558#+BEGIN_SRC org
559[[https://example.com/chart.png]]
560#+END_SRC
561
562An image is fetched in the background; the link shows as text until it arrives. A link
563that can't be fetched stays text, and isn't tried again until orgstar starts again. This
564applies to the editor on the Mac and iOS and to the iOS reader. Emacs's =download=
565fetches the image each time it's displayed; orgstar keeps it for the session instead.
566
567** Sizing
568
569An image is drawn at its own width, up to the width of the text area. To set a width,
570put =#+ATTR_ORG: :width= with a number of points among the keywords above the link:
571
572#+BEGIN_SRC org
573,#+CAPTION: Network layout
574,#+ATTR_ORG: :width 300
575[[file:images/network.png]]
576#+END_SRC
577
578The height follows the image's proportions. =#+ATTR_HTML= and other exporters'
579attributes don't affect the editor.
580
581** Showing images when a file opens
582
583The config key =org-startup-with-inline-images= (default =false=) shows images in
584every file when it opens. In a file, =#+STARTUP: inlineimages= or
585=#+STARTUP: noinlineimages= overrides it.
586
587* org-protocol store-link
588
589orgstar handles =org-protocol://store-link= URLs, in the new form
590~org-protocol://store-link?url=…&title=…~ and the old form
591=org-protocol://store-link:/URL/TITLE=. The URL is added to your stored links with
592the title as its description, and is also copied to the clipboard. Insert it with
593Insert Link. Setting up a browser bookmarklet, and =org-protocol://capture=, are in
594[[file:08-capture.org][Capture]].
595
596* On iOS
597
598The iOS app follows links: tap a link in the reader. Org files open in the app, and
599web, mail and other files go to the system. The iOS editor shows inline images as the
600Mac does; the reader doesn't. In the editor, Store Link, Store ID Link and Insert Link…
601are in Commands, and on a hardware keyboard the Emacs keys run them; they work as
602described above, and stored links last until the app quits. =org-protocol://store-link=
603links opened on the device are stored and copied too. More ▸ Backlinks lists the same
604links as the Mac's backlinks pane, for the heading at the caret and the file. See
605[[file:14-ios.org][iOS]].
606
607* Code references
608
609A label at the end of a line in a src or example block, =(ref:name)= by default, is a code reference, and =[[(name)]]= links to it. Following the link moves to the label. A block's =-l "<<%s>>"= switch changes the label's form for that block; =%s= is the name.
610
611In export, the label is taken off the line. A block with =-n= numbers its lines from 1, or =-n 10= from 10; =+n= goes on from the numbers of the blocks before it. =-r= leaves the label out of the exported line, and then the link shows the line's number instead of the name; =-k= with =-n= keeps the label while the link still shows the number. A link's description may contain =%s= for the name or number: =[[(call)][line %s]]=. In HTML, the line with the label is the link's target, =coderef-name=.
612
613A regexp link, or a =file:…::/regexp/= search, exports as its description, or its text when it has none.
614