docs/manual/guide/09-links.org

design-themes-widgets
orgstar/docs/manual/guide/09-links.org rendered · source · history · blame · raw

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