Linking notes
Denote offers several commands for linking between notes. Those use the ‘denote:’ hyperlink type. There are two types of links supported by Denote:
Direct links
A direct link points to a file inside the denote-directory. The link is constructed by using the ‘denote:’ prefix and the target file’s identifier (The file-naming scheme). This looks like ‘denote:20250328T075526’. The syntax of a link depends on the file type. For example, in Org and plain text links look like ‘[[denote:20250328T075526][The title of the target file]]’, while in Markdown they are written as ‘[The title of the target file](denote:20250328T075526)’.
Query links
The ‘denote:’ hyperlink type also supports special qualifiers that change how the target of the link is interpreted. The qualifier is a special token than tells Denote how to treat the target of the link. It is written thus ‘denote:TOKEN:QUERY’. There are two kinds of tokens: ‘query-contents’ and ‘query-filenames’. Those determine how the query terms are used. As their names suggest, these two tokens trigger a search in (i) the file contents of all readable files or (ii) in the file names only. They are, in other words, counterparts of the Unix grep and find programs, respectively.
The following sections cover all the details (Why are some Org links opening outside Emacs?).
- Add a single direct link using a file name prompt
- Add a direct link to a file whose contents include the given query
- Add a query link
- Insert links to all files matching a query in their file name
- Insert links to all files matching a query in their contents
- The
denote-open-link-functionuser option - The
denote-org-store-link-to-headinguser option - Adding direct links to files matching contents
- Insert links from marked files in Dired
- Link to an existing note or create a new one
- The backlinks’ buffer
- Writing metanotes
- Visiting linked files via the minibuffer
- Fontify links in non-Org buffers
- The
denote-link-description-formatto format link descriptions