mirror of
https://github.com/org-roam/org-roam
synced 2025-08-15 13:23:32 -05:00
2954 lines
147 KiB
HTML
2954 lines
147 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
<!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
<!-- Copyright (C) 2020-2022 Jethro Kuan <jethrokuan95@gmail.com>
|
||
|
||
You can redistribute this document and/or modify it under the terms
|
||
of the GNU General Public License as published by the Free Software
|
||
Foundation, either version 3 of the License, or (at your option) any
|
||
later version.
|
||
|
||
This document is distributed in the hope that it will be useful,
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
General Public License for more details.
|
||
-->
|
||
<title>Org-roam User Manual</title>
|
||
|
||
<meta name="description" content="Org-roam User Manual">
|
||
<meta name="keywords" content="Org-roam User Manual">
|
||
<meta name="resource-type" content="document">
|
||
<meta name="distribution" content="global">
|
||
<meta name="Generator" content="makeinfo">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
|
||
<link href="#Top" rel="start" title="Top">
|
||
<link href="#Keystroke-Index" rel="index" title="Keystroke Index">
|
||
<link href="#Introduction" rel="next" title="Introduction">
|
||
<style type="text/css">
|
||
<!--
|
||
a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
|
||
a.summary-letter {text-decoration: none}
|
||
blockquote.indentedblock {margin-right: 0em}
|
||
div.display {margin-left: 3.2em}
|
||
div.example {margin-left: 3.2em}
|
||
kbd {font-style: oblique}
|
||
pre.display {font-family: inherit}
|
||
pre.format {font-family: inherit}
|
||
pre.menu-comment {font-family: serif}
|
||
pre.menu-preformatted {font-family: serif}
|
||
span.nolinebreak {white-space: nowrap}
|
||
span.roman {font-family: initial; font-weight: normal}
|
||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||
span:hover a.copiable-anchor {visibility: visible}
|
||
ul.no-bullet {list-style: none}
|
||
-->
|
||
</style>
|
||
<link rel="stylesheet" type="text/css" href="assets/page.css">
|
||
|
||
|
||
</head>
|
||
|
||
<body lang="en">
|
||
<h1 class="settitle" align="center">Org-roam User Manual</h1>
|
||
|
||
|
||
|
||
|
||
<div class="top" id="Top">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Org_002droam-User-Manual"></span><h1 class="top">Org-roam User Manual</h1>
|
||
|
||
|
||
<p>This manual is for Org-roam version 2.2.2.
|
||
</p>
|
||
<blockquote>
|
||
<p>Copyright (C) 2020-2022 Jethro Kuan <jethrokuan95@gmail.com>
|
||
</p>
|
||
<p>You can redistribute this document and/or modify it under the terms of the GNU
|
||
General Public License as published by the Free Software Foundation, either
|
||
version 3 of the License, or (at your option) any later version.
|
||
</p>
|
||
<p>This document is distributed in the hope that it will be useful,
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
General Public License for more details.
|
||
</p>
|
||
</blockquote>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Introduction" accesskey="1">Introduction</a></li>
|
||
<li><a href="#Target-Audience" accesskey="2">Target Audience</a></li>
|
||
<li><a href="#A-Brief-Introduction-to-the-Zettelkasten-Method" accesskey="3">A Brief Introduction to the Zettelkasten Method</a></li>
|
||
<li><a href="#Installation" accesskey="4">Installation</a></li>
|
||
<li><a href="#Getting-Started" accesskey="5">Getting Started</a></li>
|
||
<li><a href="#Customizing-Node-Caching" accesskey="6">Customizing Node Caching</a></li>
|
||
<li><a href="#The-Org_002droam-Buffer" accesskey="7">The Org-roam Buffer</a></li>
|
||
<li><a href="#Node-Properties" accesskey="8">Node Properties</a></li>
|
||
<li><a href="#Citations" accesskey="9">Citations</a></li>
|
||
<li><a href="#Completion">Completion</a></li>
|
||
<li><a href="#Encryption">Encryption</a></li>
|
||
<li><a href="#The-Templating-System">The Templating System</a></li>
|
||
<li><a href="#Extensions">Extensions</a></li>
|
||
<li><a href="#Performance-Optimization">Performance Optimization</a></li>
|
||
<li><a href="#The-Org_002dmode-Ecosystem">The Org-mode Ecosystem</a></li>
|
||
<li><a href="#FAQ">FAQ</a></li>
|
||
<li><a href="#Developer_0027s-Guide-to-Org_002droam">Developer’s Guide to Org-roam</a></li>
|
||
<li><a href="#Appendix">Appendix</a></li>
|
||
<li><a href="#Keystroke-Index">Keystroke Index</a></li>
|
||
<li><a href="#Command-Index">Command Index</a></li>
|
||
<li><a href="#Function-Index">Function Index</a></li>
|
||
<li><a href="#Variable-Index">Variable Index</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="chapter" id="Introduction">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Target-Audience" accesskey="n" rel="next">Target Audience</a>, Previous: <a href="#Top" accesskey="p" rel="prev">Org-roam User Manual</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Introduction-1"></span><h2 class="chapter">1 Introduction</h2>
|
||
|
||
<p>Org-roam is a tool for networked thought. It reproduces some of <a href="https://roamresearch.com/">Roam
|
||
Research’s</a> <a id="DOCF1" href="#FOOT1"><sup>1</sup></a> key features within <a href="https://orgmode.org/">Org-mode</a>.
|
||
</p>
|
||
<p>Org-roam allows for effortless non-hierarchical note-taking: with Org-roam,
|
||
notes flow naturally, making note-taking fun and easy. Org-roam augments the
|
||
Org-mode syntax, and will work for anyone already using Org-mode for their
|
||
personal wiki.
|
||
</p>
|
||
<p>Org-roam leverages the mature ecosystem around Org-mode. For example, it has
|
||
first-class support for <a href="https://github.com/jkitchin/org-ref">org-ref</a> for citation management, and is able to
|
||
piggyback off Org’s excellent LaTeX and source-block evaluation capabilities.
|
||
</p>
|
||
<p>Org-roam provides these benefits over other tooling:
|
||
</p>
|
||
<ul>
|
||
<li> <strong>Privacy and Security:</strong> Your personal wiki belongs only to you, entirely
|
||
offline and in your control. Encrypt your notes with GPG.
|
||
|
||
</li><li> <strong>Longevity of Plain Text:</strong> Unlike web solutions like Roam Research, the notes
|
||
are first and foremost plain Org-mode files – Org-roam simply builds an
|
||
auxiliary database to give the personal wiki superpowers. Having your notes
|
||
in plain-text is crucial for the longevity of your wiki. Never have to worry
|
||
about proprietary web solutions being taken down. The notes are still
|
||
functional even if Org-roam ceases to exist.
|
||
|
||
</li><li> <strong>Free and Open Source:</strong> Org-roam is free and open-source, which means that if
|
||
you feel unhappy with any part of Org-roam, you may choose to extend Org-roam,
|
||
or open a pull request.
|
||
|
||
</li><li> <strong>Leverage the Org-mode ecosystem:</strong> Over the decades, Emacs and Org-mode has
|
||
developed into a mature system for plain-text organization. Building upon
|
||
Org-mode already puts Org-roam light-years ahead of many other solutions.
|
||
|
||
</li><li> <strong>Built on Emacs:</strong> Emacs is also a fantastic interface for editing text, and
|
||
Org-roam inherits many of the powerful text-navigation and editing packages
|
||
available to Emacs.
|
||
</li></ul>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="chapter" id="Target-Audience">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#A-Brief-Introduction-to-the-Zettelkasten-Method" accesskey="n" rel="next">A Brief Introduction to the Zettelkasten Method</a>, Previous: <a href="#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Target-Audience-1"></span><h2 class="chapter">2 Target Audience</h2>
|
||
|
||
<p>Org-roam is a tool that will appear unfriendly to anyone unfamiliar with Emacs
|
||
and Org-mode, but it is also extremely powerful to those willing to put effort
|
||
in mastering the intricacies. Org-roam stands on the shoulders of giants. Emacs
|
||
was first created in 1976, and remains the tool of choice for many for editing
|
||
text and designing textual interfaces. The malleability of Emacs allowed the
|
||
creation of Org-mode, an all-purpose plain-text system for maintaining TODO
|
||
lists, planning projects, and authoring documents. Both of these tools are
|
||
incredibly vast and require significant time investment to master.
|
||
</p>
|
||
<p>Org-roam assumes only basic familiarity with these tools. It is not difficult to
|
||
get up and running with basic text-editing functionality, but one will only
|
||
fully appreciate the power of building Roam functionality into Emacs and
|
||
Org-mode when the usage of these tools become more advanced.
|
||
</p>
|
||
<p>One key advantage to Org-roam is that building on top of Emacs gives it
|
||
malleability. This is especially important for note-taking workflows. It is our
|
||
belief that note-taking workflows are extremely personal, and there is no one
|
||
tool that’s perfect for you. Org-mode and Org-roam allows you to discover what
|
||
works for you, and build that perfect tool for yourself.
|
||
</p>
|
||
<p>If you are new to the software, and choose to take this leap of faith, I hope
|
||
you find yourself equally entranced as Neal Stephenson was.
|
||
</p>
|
||
<blockquote>
|
||
<p>Emacs outshines all other editing software in approximately the same way that
|
||
the noonday sun does the stars. It is not just bigger and brighter; it simply
|
||
makes everything else vanish. – Neal Stephenson, In the Beginning was the
|
||
Command Line (1998)
|
||
</p>
|
||
</blockquote>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="chapter" id="A-Brief-Introduction-to-the-Zettelkasten-Method">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Installation" accesskey="n" rel="next">Installation</a>, Previous: <a href="#Target-Audience" accesskey="p" rel="prev">Target Audience</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="A-Brief-Introduction-to-the-Zettelkasten-Method-1"></span><h2 class="chapter">3 A Brief Introduction to the Zettelkasten Method</h2>
|
||
|
||
<p>Org-roam provides utilities for maintaining a digital slip-box. This section
|
||
aims to provide a brief introduction to the “slip-box”, or “Zettelkasten”
|
||
method. By providing some background on the method, we hope that the design
|
||
decisions of Org-roam will become clear, and that will aid in using Org-roam
|
||
appropriately. In this section we will introduce terms commonly used within the
|
||
Zettelkasten community and the Org-roam forums.
|
||
</p>
|
||
<p>The Zettelkasten is a personal tool for thinking and writing. It places heavy
|
||
emphasis on connecting ideas, building up a web of thought. Hence, it is well
|
||
suited for knowledge workers and intellectual tasks, such as conducting
|
||
research. The Zettelkasten can act as a research partner, where conversations
|
||
with it may produce new and surprising lines of thought.
|
||
</p>
|
||
<p>This method is attributed to German sociologist Niklas Luhmann, who using the
|
||
method had produced volumes of written works. Luhmann’s slip-box was simply a
|
||
box of cards. These cards are small – often only large enough to fit a single
|
||
concept. The size limitation encourages ideas to be broken down into individual
|
||
concepts. These ideas are explicitly linked together. The breakdown of ideas
|
||
encourages tangential exploration of ideas, increasing the surface for thought.
|
||
Making linking explicit between notes also encourages one to think about the
|
||
connections between concepts.
|
||
</p>
|
||
<p>At the corner of each note, Luhmann ascribed each note with an ordered ID,
|
||
allowing him to link and jump between notes. In Org-roam, we simply use
|
||
hyperlinks.
|
||
</p>
|
||
<p>Org-roam is the slip-box, digitalized in Org-mode. Every zettel (card) is a
|
||
plain-text, Org-mode file. In the same way one would maintain a paper slip-box,
|
||
Org-roam makes it easy to create new zettels, pre-filling boilerplate content
|
||
using a powerful templating system.
|
||
</p>
|
||
<p><strong>Fleeting notes</strong>
|
||
</p>
|
||
<p>A slip-box requires a method for quickly capturing ideas. These are called
|
||
<strong>fleeting notes</strong>: they are simple reminders of information or ideas that will
|
||
need to be processed later on, or trashed. This is typically accomplished using
|
||
<code>org-capture</code> (see <a data-manual="org" href="https://www.gnu.org/software/emacs/manual/html_mono/org.html#Capture">(org)Capture</a>), or using Org-roam’s daily notes
|
||
functionality (see <a href="#org_002droam_002ddailies">org-roam-dailies</a>). This provides a central inbox for collecting
|
||
thoughts, to be processed later into permanent notes.
|
||
</p>
|
||
<p><strong>Permanent notes</strong>
|
||
</p>
|
||
<p>Permanent notes are further split into two categories: <strong>literature notes</strong> and
|
||
<strong>concept notes</strong>. Literature notes can be brief annotations on a particular
|
||
source (e.g. book, website or paper), that you’d like to access later on.
|
||
Concept notes require much more care in authoring: they need to be
|
||
self-explanatory and detailed. Org-roam’s templating system supports the
|
||
addition of different templates to facilitate the creation of these notes.
|
||
</p>
|
||
<p>For further reading on the Zettelkasten method, “How to Take Smart Notes” by
|
||
Sonke Ahrens is a decent guide.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="chapter" id="Installation">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Getting-Started" accesskey="n" rel="next">Getting Started</a>, Previous: <a href="#A-Brief-Introduction-to-the-Zettelkasten-Method" accesskey="p" rel="prev">A Brief Introduction to the Zettelkasten Method</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Installation-1"></span><h2 class="chapter">4 Installation</h2>
|
||
|
||
<p>Org-roam can be installed using Emacs’ package manager or manually from its
|
||
development repository.
|
||
</p>
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Installing-from-MELPA" accesskey="1">Installing from MELPA</a></li>
|
||
<li><a href="#Installing-from-Source" accesskey="2">Installing from Source</a></li>
|
||
<li><a href="#Installation-Troubleshooting" accesskey="3">Installation Troubleshooting</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="Installing-from-MELPA">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Installing-from-Source" accesskey="n" rel="next">Installing from Source</a>, Up: <a href="#Installation" accesskey="u" rel="up">Installation</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Installing-from-MELPA-1"></span><h3 class="section">4.1 Installing from MELPA</h3>
|
||
|
||
<p>Org-roam is available from Melpa and Melpa-Stable. If you haven’t used Emacs’
|
||
package manager before, you may familiarize yourself with it by reading the
|
||
documentation in the Emacs manual, see <a data-manual="emacs" href="https://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Packages">(emacs)Packages</a>. Then, add one of the
|
||
archives to ‘<samp>package-archives</samp>’:
|
||
</p>
|
||
<ul>
|
||
<li> To use Melpa:
|
||
</li></ul>
|
||
|
||
<div class="example lisp">
|
||
<pre class="lisp">(require 'package)
|
||
(add-to-list 'package-archives
|
||
'("melpa" . "http://melpa.org/packages/") t)
|
||
</pre></div>
|
||
|
||
<ul>
|
||
<li> To use Melpa-Stable:
|
||
</li></ul>
|
||
|
||
<div class="example lisp">
|
||
<pre class="lisp">(require 'package)
|
||
(add-to-list 'package-archives
|
||
'("melpa-stable" . "http://stable.melpa.org/packages/") t)
|
||
</pre></div>
|
||
|
||
<p>Org-roam also depends on a recent version of Org, which can be obtained in Org’s
|
||
package repository (see <a data-manual="org" href="https://www.gnu.org/software/emacs/manual/html_mono/org.html#Installation">(org)Installation</a>).
|
||
</p>
|
||
<p>Once you have done that, you can install Org-roam and its dependencies
|
||
using:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">M-x package-install RET org-roam RET
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Installing-from-Source">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Installation-Troubleshooting" accesskey="n" rel="next">Installation Troubleshooting</a>, Previous: <a href="#Installing-from-MELPA" accesskey="p" rel="prev">Installing from MELPA</a>, Up: <a href="#Installation" accesskey="u" rel="up">Installation</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Installing-from-Source-1"></span><h3 class="section">4.2 Installing from Source</h3>
|
||
|
||
<p>You may install Org-roam directly from the repository on <a href="https://github.com/org-roam/org-roam">GitHub</a> if you like.
|
||
This will give you access to the latest version hours or days before it appears
|
||
on MELPA, and months (or more) before it is added to the Debian or Ubuntu
|
||
repositories. This will also give you access to various developmental branches
|
||
that may be available.
|
||
</p>
|
||
<p>Note, however, that development version, and especially any feature branches,
|
||
may not always be in working order. You’ll need to be prepared to do some
|
||
debugging, or to manually roll-back to working versions, if you install from
|
||
GitHub.
|
||
</p>
|
||
<p>Installing from GitHub requires that you clone the repository:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">git clone https://github.com/org-roam/org-roam.git /path/to/org/roam
|
||
</pre></div>
|
||
|
||
<p>where <code>./path/to/org/roam</code> is the location you will store your copy of the code.
|
||
</p>
|
||
<p>Next, you need to add this location to your load path, and <code>require</code> the
|
||
Org-roam library. Add the following code to your <code>.emacs</code>:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(add-to-list 'load-path "/path/to/org/roam")
|
||
(require 'org-roam)
|
||
</pre></div>
|
||
|
||
<p>You now have Org-roam installed. However, you don’t necessarily have the
|
||
dependencies that it requires. These include:
|
||
</p>
|
||
<ul>
|
||
<li> dash
|
||
|
||
</li><li> f
|
||
|
||
</li><li> s
|
||
|
||
</li><li> org
|
||
|
||
</li><li> emacsql
|
||
|
||
</li><li> emacsql-sqlite
|
||
|
||
</li><li> magit-section
|
||
</li></ul>
|
||
|
||
<p>You can install this manually as well, or get the latest version from MELPA. You
|
||
may wish to use <a href="https://github.com/jwiegley/use-package">use-package</a>, <a href="https://github.com/raxod502/straight.el">straight.el</a> to help manage this.
|
||
</p>
|
||
<p>If you would like to install the manual for access from Emacs’ built-in Info
|
||
system, you’ll need to compile the .texi source file, and install it in an
|
||
appropriate location.
|
||
</p>
|
||
<p>To compile the .texi source file, from a terminal navigate to the <code>/doc</code>
|
||
subdirectory of the Org-roam repository, and run the following:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">make infodir=/path/to/my/info/files install-info
|
||
</pre></div>
|
||
|
||
<p>Where <code>/path/to/my/info/files</code> is the location where you keep info files. This
|
||
target directory needs to be stored in the variable
|
||
‘Info-default-directory-list‘. If you aren’t using one of the default info
|
||
locations, you can configure this with the following in your <code>.emacs</code> file:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(require 'info)
|
||
(add-to-list 'Info-default-directory-list
|
||
"/path/to/my/info/files")
|
||
</pre></div>
|
||
|
||
<p>You can also use one of the default locations, such as:
|
||
</p>
|
||
<ul>
|
||
<li> <em>usr/local/share/info</em>
|
||
|
||
</li><li> <em>usr/share/info</em>
|
||
|
||
</li><li> <em>usr/local/share/info</em>
|
||
</li></ul>
|
||
|
||
<p>If you do this, you’ll need to make sure you have write-access to that location,
|
||
or run the above <code>make</code> command as root.
|
||
</p>
|
||
<p>Now that the info file is ready, you need to add it to the corresponding <code>dir</code>
|
||
file:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">install-info /path/to/my/info/files/org-roam.info /path/to/my/info/files/dir
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Installation-Troubleshooting">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Installing-from-Source" accesskey="p" rel="prev">Installing from Source</a>, Up: <a href="#Installation" accesskey="u" rel="up">Installation</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Installation-Troubleshooting-1"></span><h3 class="section">4.3 Installation Troubleshooting</h3>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#C-Compiler" accesskey="1">C Compiler</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="subsection" id="C-Compiler">
|
||
<div class="header">
|
||
<p>
|
||
Up: <a href="#Installation-Troubleshooting" accesskey="u" rel="up">Installation Troubleshooting</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="C-Compiler-1"></span><h4 class="subsection">4.3.1 C Compiler</h4>
|
||
|
||
<p>Org-roam relies on an Emacs package called <code>emacsql</code> and <code>emacsql-sqlite</code> to
|
||
work with the <code>sqlite</code> database. Both of them should be installed automatically
|
||
in your Emacs environment as a prerequisite for Org-roam when you install it.
|
||
</p>
|
||
<p><code>emacsql-sqlite</code> requires a C compiler (e.g. <code>gcc</code> or <code>clang</code>) to be present in
|
||
your computer. How to install a C compiler depends on the OS that you use.
|
||
</p>
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#C-Compiler-for-Windows" accesskey="1">C Compiler for Windows</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="unnumberedsubsubsec" id="C-Compiler-for-Windows">
|
||
<div class="header">
|
||
<p>
|
||
Up: <a href="#C-Compiler" accesskey="u" rel="up">C Compiler</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="C-Compiler-for-Windows-1"></span><h4 class="unnumberedsubsubsec">C Compiler for Windows</h4>
|
||
|
||
<p>One of the easiest ways to install a C compiler in Windows is to use <a href="https://www.msys2.org/">MSYS2</a> as at the time of this writing:
|
||
</p>
|
||
<ul>
|
||
<li> Download and use the installer in the official MSYS2 website
|
||
|
||
</li><li> Run MSYS2 and in its terminal, type the following and answer “Y” to
|
||
proceed – this will install <code>gcc</code> in your PC:
|
||
|
||
<div class="example">
|
||
<pre class="example">pacman -S gcc
|
||
</pre></div>
|
||
|
||
|
||
</li><li> On Windows, add <code>C:\msys64\usr\bin</code> (command ‘<samp>where gcc</samp>’ in MSYS2 terminal
|
||
can tell you the correct path) to <code>PATH</code> in your environmental variables
|
||
|
||
|
||
</li><li> Launch Emacs and call <code>M-x org-roam-db-autosync-mode</code> (launch Emacs after
|
||
defining the path, so that Emacs can recognize it)
|
||
</li></ul>
|
||
|
||
<p>This will automatically start compiling <code>emacsql-sqlite</code>; you should see a
|
||
message in minibuffer. It may take a while until compilation completes. Once
|
||
complete, you should see a new file <code>emacsql-sqlite.exe</code> created in a subfolder
|
||
named <code>sqlite</code> under <code>emacsql-sqlite</code> installation folder. It’s typically in
|
||
your Emacs configuration folder like this:
|
||
<code>/.config/emacs/elpa/emacsql-sqlite-20190727.1710/sqlite</code>
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="Getting-Started">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Customizing-Node-Caching" accesskey="n" rel="next">Customizing Node Caching</a>, Previous: <a href="#Installation" accesskey="p" rel="prev">Installation</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Getting-Started-1"></span><h2 class="chapter">5 Getting Started</h2>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#The-Org_002droam-Node" accesskey="1">The Org-roam Node</a></li>
|
||
<li><a href="#Links-between-Nodes" accesskey="2">Links between Nodes</a></li>
|
||
<li><a href="#Setting-up-Org_002droam" accesskey="3">Setting up Org-roam</a></li>
|
||
<li><a href="#Creating-and-Linking-Nodes" accesskey="4">Creating and Linking Nodes</a></li>
|
||
<li><a href="#Customizing-Node-Completions" accesskey="5">Customizing Node Completions</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="The-Org_002droam-Node">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Links-between-Nodes" accesskey="n" rel="next">Links between Nodes</a>, Up: <a href="#Getting-Started" accesskey="u" rel="up">Getting Started</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="The-Org_002droam-Node-1"></span><h3 class="section">5.1 The Org-roam Node</h3>
|
||
|
||
<p>We first begin with some terminology we’ll use throughout the manual. We term
|
||
the basic denomination in Org-roam a node. We define a node as follows:
|
||
</p>
|
||
<blockquote>
|
||
<p>A node is any headline or top level file with an ID.
|
||
</p>
|
||
</blockquote>
|
||
|
||
<p>For example, with this example file content:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">:PROPERTIES:
|
||
:ID: foo
|
||
:END:
|
||
#+title: Foo
|
||
|
||
* Bar
|
||
:PROPERTIES:
|
||
:ID: bar
|
||
:END:
|
||
</pre></div>
|
||
|
||
<p>We create two nodes:
|
||
</p>
|
||
<ul>
|
||
<li> A file node “Foo” with id <code>foo</code>.
|
||
|
||
</li><li> A headline node “Bar” with id <code>bar</code>.
|
||
</li></ul>
|
||
|
||
<p>Headlines without IDs will not be considered Org-roam nodes. Org IDs can be
|
||
added to files or headlines via the interactive command <code>M-x org-id-get-create</code>.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Links-between-Nodes">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Setting-up-Org_002droam" accesskey="n" rel="next">Setting up Org-roam</a>, Previous: <a href="#The-Org_002droam-Node" accesskey="p" rel="prev">The Org-roam Node</a>, Up: <a href="#Getting-Started" accesskey="u" rel="up">Getting Started</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Links-between-Nodes-1"></span><h3 class="section">5.2 Links between Nodes</h3>
|
||
|
||
<p>We link between nodes using Org’s standard ID link (e.g. <code>id:foo</code>). While only
|
||
ID links will be considered during the computation of links between nodes,
|
||
Org-roam caches all other links in the documents for external use.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Setting-up-Org_002droam">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Creating-and-Linking-Nodes" accesskey="n" rel="next">Creating and Linking Nodes</a>, Previous: <a href="#Links-between-Nodes" accesskey="p" rel="prev">Links between Nodes</a>, Up: <a href="#Getting-Started" accesskey="u" rel="up">Getting Started</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Setting-up-Org_002droam-1"></span><h3 class="section">5.3 Setting up Org-roam</h3>
|
||
|
||
<p>Org-roam’s capabilities stem from its aggressive caching: it crawls all files
|
||
within <code>org-roam-directory</code>, and maintains a cache of all links and nodes.
|
||
</p>
|
||
<p>To start using Org-roam, pick a location to store the Org-roam files. The
|
||
directory that will contain your notes is specified by the variable
|
||
<code>org-roam-directory</code>. Org-roam searches recursively within <code>org-roam-directory</code>
|
||
for notes. This variable needs to be set before any calls to Org-roam functions.
|
||
</p>
|
||
<p>For this tutorial, create an empty directory, and set <code>org-roam-directory</code>:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(make-directory "~/org-roam")
|
||
(setq org-roam-directory (file-truename "~/org-roam"))
|
||
</pre></div>
|
||
|
||
<p>The <code>file-truename</code> function is only necessary when you use symbolic links
|
||
inside <code>org-roam-directory</code>: Org-roam does not resolve symbolic links. One can
|
||
however instruct Emacs to always resolve symlinks, at a performance cost:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq find-file-visit-truename t)
|
||
</pre></div>
|
||
|
||
<p>Next, we setup Org-roam to run functions on file changes to maintain cache
|
||
consistency. This is achieved by running <code>M-x org-roam-db-autosync-mode</code>. To
|
||
ensure that Org-roam is available on startup, place this in your Emacs
|
||
configuration:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(org-roam-db-autosync-mode)
|
||
</pre></div>
|
||
|
||
<p>To build the cache manually, run <code>M-x org-roam-db-sync</code>. Cache builds may
|
||
take a while the first time, but subsequent builds are often instantaneous
|
||
because they only reprocess modified files.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Creating-and-Linking-Nodes">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Customizing-Node-Completions" accesskey="n" rel="next">Customizing Node Completions</a>, Previous: <a href="#Setting-up-Org_002droam" accesskey="p" rel="prev">Setting up Org-roam</a>, Up: <a href="#Getting-Started" accesskey="u" rel="up">Getting Started</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Creating-and-Linking-Nodes-1"></span><h3 class="section">5.4 Creating and Linking Nodes</h3>
|
||
|
||
<p>Org-roam makes it easy to create notes and link them together. There are 2 main
|
||
functions for creating nodes:
|
||
</p>
|
||
<ul>
|
||
<li> <code>org-roam-node-insert</code>: creates a node if it does not exist, and inserts a
|
||
link to the node at point.
|
||
|
||
</li><li> <code>org-roam-node-find</code>: creates a node if it does not exist, and visits the
|
||
node.
|
||
|
||
</li><li> <code>org-roam-capture</code>: creates a node if it does not exist, and restores the
|
||
current window configuration upon completion.
|
||
</li></ul>
|
||
|
||
<p>Let’s first try <code>org-roam-node-find</code>. Calling <code>M-x org-roam-node-find</code> will
|
||
show a list of titles for nodes that reside in <code>org-roam-directory</code>. It should
|
||
show nothing right now, since there are no notes in the directory. Enter the
|
||
title of the note you wish to create, and press <code>RET</code>. This begins the note
|
||
creation process. This process uses <code>org-capture</code>’s templating system, and can
|
||
be customized (see <a href="#The-Templating-System">The Templating System</a>). Using the default template, pressing
|
||
<code>C-c C-c</code> finishes the note capture.
|
||
</p>
|
||
<p>Now that we have a node, we can try inserting a link to the node using <code>M-x
|
||
org-roam-node-insert</code>. This brings up the list of nodes, which should contain
|
||
the node you just created. Selecting the node will insert an <code>id:</code> link to the
|
||
node. If you instead entered a title that does not exist, you will once again be
|
||
brought through the node creation process.
|
||
</p>
|
||
<p>One can also conveniently insert links via the completion-at-point functions
|
||
Org-roam provides (see <a href="#Completion">Completion</a>).
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Customizing-Node-Completions">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Creating-and-Linking-Nodes" accesskey="p" rel="prev">Creating and Linking Nodes</a>, Up: <a href="#Getting-Started" accesskey="u" rel="up">Getting Started</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Customizing-Node-Completions-1"></span><h3 class="section">5.5 Customizing Node Completions</h3>
|
||
|
||
<p>Node selection is achieved via the <code>completing-read</code> interface, typically
|
||
through ‘org-roam-node-read‘. The presentation of these nodes are governed by
|
||
<code>org-roam-node-display-template</code>.
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dnode_002ddisplay_002dtemplate"><span class="category">Variable: </span><span><strong>org-roam-node-display-template</strong><a href='#index-org_002droam_002dnode_002ddisplay_002dtemplate' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Configures display formatting for Org-roam node.
|
||
</p>
|
||
<p>Patterns of form “${field-name:length}” are interpolated based
|
||
on the current node.
|
||
</p>
|
||
<p>Each “field-name” is replaced with the return value of each
|
||
corresponding accessor function for org-roam-node, e.g.
|
||
“${title}” will be interpolated by the result of
|
||
org-roam-node-title. You can also define custom accessors using
|
||
cl-defmethod. For example, you can define:
|
||
</p>
|
||
<p>(cl-defmethod org-roam-node-my-title ((node org-roam-node))
|
||
(concat “My ” (org-roam-node-title node)))
|
||
</p>
|
||
<p>and then reference it here or in the capture templates as
|
||
“${my-title}”.
|
||
</p>
|
||
<p>“length” is an optional specifier and declares how many
|
||
characters can be used to display the value of the corresponding
|
||
field. If it’s not specified, the field will be inserted as is,
|
||
i.e. it won’t be aligned nor trimmed. If it’s an integer, the
|
||
field will be aligned accordingly and all the exceeding
|
||
characters will be trimmed out. If it’s “*”, the field will use
|
||
as many characters as possible and will be aligned accordingly.
|
||
</p>
|
||
<p>A closure can also be assigned to this variable in which case the
|
||
closure is evaluated and the return value is used as the
|
||
template. The closure must evaluate to a valid template string.
|
||
</p></dd></dl>
|
||
|
||
<p>If you’re using a vertical completion framework, such as Ivy and Selectrum,
|
||
Org-roam supports the generation of an aligned, tabular completion interface.
|
||
For example, to include a column for tags up to 10 character widths wide, one
|
||
can set <code>org-roam-node-display-template</code> as such:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-node-display-template
|
||
(concat "${title:*} "
|
||
(propertize "${tags:10}" 'face 'org-tag)))
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="Customizing-Node-Caching">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#The-Org_002droam-Buffer" accesskey="n" rel="next">The Org-roam Buffer</a>, Previous: <a href="#Getting-Started" accesskey="p" rel="prev">Getting Started</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Customizing-Node-Caching-1"></span><h2 class="chapter">6 Customizing Node Caching</h2>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#How-to-cache" accesskey="1">How to cache</a></li>
|
||
<li><a href="#What-to-cache" accesskey="2">What to cache</a></li>
|
||
<li><a href="#When-to-cache" accesskey="3">When to cache</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="How-to-cache">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#What-to-cache" accesskey="n" rel="next">What to cache</a>, Up: <a href="#Customizing-Node-Caching" accesskey="u" rel="up">Customizing Node Caching</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="How-to-cache-1"></span><h3 class="section">6.1 How to cache</h3>
|
||
|
||
<p>Org-roam uses a sqlite database to perform caching, but there are multiple Emacs
|
||
libraries that can be used. The default used by Org-roam is <code>emacs-sqlite</code>.
|
||
Below the pros and cons of each package is used:
|
||
</p>
|
||
<p><a href="https://github.com/skeeto/emacsql"><strong><strong>emacs-sqlite</strong></strong></a>
|
||
</p>
|
||
<p>The default option used by Org-roam. This library is the most mature and
|
||
well-supported and is imported by default in Org-roam.
|
||
</p>
|
||
<p>One downside of using <code>emacs-sqlite</code> is that using it requires compilation and
|
||
can cause issues in some environments (especially Windows). If you have issues
|
||
producing the customized binary required by <code>emacs-sqlite</code>, consider using
|
||
<code>emacs-sqlite3</code>.
|
||
</p>
|
||
<p><a href="https://github.com/cireu/emacsql-sqlite3"><strong><strong>emacs-sqlite3</strong></strong></a>
|
||
</p>
|
||
<p><code>emacs-sqlite3</code> uses the official sqlite3 binary that can be obtained from your
|
||
system’s package manager. This is useful if you have issues producing the
|
||
<code>sqlite3</code> binary required by the other packages. However, it is not recommended
|
||
because it has some compatibility issues with Emacs, but should work for most
|
||
regular cases. See <a href="https://nullprogram.com/blog/2014/02/06/">Chris Wellon’s blog post</a> for more information.
|
||
</p>
|
||
<p>To use <code>emacsql-sqlite3</code>, ensure that the package is installed, and set:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-database-connector 'sqlite3)
|
||
</pre></div>
|
||
|
||
<p><a href="https://melpa.org/#/emacsql-sqlite-module"><strong><strong>emacssql-sqlite-module</strong></strong></a> (previously emacsql-libsqlite3)
|
||
</p>
|
||
<p><code>emacs-sqlite-module</code> is a relatively young package which uses an Emacs module that
|
||
exposes parts of the SQLite C API to Emacs Lisp, instead of using subprocess as
|
||
<code>emacsql-sqlite</code> does. It is expected to be a more performant drop-in
|
||
replacement for <code>emacs-sqlite</code>.
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-database-connector 'sqlite-module)
|
||
</pre></div>
|
||
|
||
<p><a href="https://melpa.org/#/emacsql-sqlite-builtin"><strong><strong>emacsql-sqlite-builtin</strong></strong></a>
|
||
</p>
|
||
<p><code>emacsql-sqlite-builtin</code> uses the in-built SQLite support for Emacs 29 and
|
||
later. This is the recommended option if you are using a version of Emacs that
|
||
supports it.
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-database-connector 'sqlite-builtin)
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="What-to-cache">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#When-to-cache" accesskey="n" rel="next">When to cache</a>, Previous: <a href="#How-to-cache" accesskey="p" rel="prev">How to cache</a>, Up: <a href="#Customizing-Node-Caching" accesskey="u" rel="up">Customizing Node Caching</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="What-to-cache-1"></span><h3 class="section">6.2 What to cache</h3>
|
||
|
||
<p>By default, all nodes (any headline or file with an ID) are cached by Org-roam.
|
||
There are instances where you may want to have headlines with ID, but not have
|
||
them cached by Org-roam.
|
||
</p>
|
||
<p>To exclude a headline from the Org-roam database, set the <code>ROAM_EXCLUDE</code>
|
||
property to a non-nil value. For example:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">* Foo
|
||
:PROPERTIES:
|
||
:ID: foo
|
||
:ROAM_EXCLUDE: t
|
||
:END:
|
||
</pre></div>
|
||
|
||
<p>One can also set <code>org-roam-db-node-include-function</code>. For example, to exclude
|
||
all headlines with the <code>ATTACH</code> tag from the Org-roam database, one can set:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">(setq org-roam-db-node-include-function
|
||
(lambda ()
|
||
(not (member "ATTACH" (org-get-tags)))))
|
||
</pre></div>
|
||
|
||
<p>Org-roam relied on the obtained Org AST for the buffer to parse links. However,
|
||
links appearing in some places (e.g. within property drawers) are not considered
|
||
by the Org AST to be links. Therefore, Org-roam takes special care of
|
||
additionally trying to process these links. Use
|
||
<code>org-roam-db-extra-links-elements</code> to specify which additional Org AST element
|
||
types to consider.
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddb_002dextra_002dlinks_002delements"><span class="category">Variable: </span><span><strong>org-roam-db-extra-links-elements</strong><a href='#index-org_002droam_002ddb_002dextra_002dlinks_002delements' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>The list of Org element types to include for parsing by Org-roam.
|
||
</p>
|
||
<p>By default, when parsing Org’s AST, links within keywords and
|
||
property drawers are not parsed as links. Sometimes however, it
|
||
is desirable to parse and cache these links (e.g. hiding links in
|
||
a property drawer).
|
||
</p></dd></dl>
|
||
|
||
<p>Additionally, one may want to ignore certain keys from being excluded within
|
||
property drawers. For example, we would not want <code>ROAM_REFS</code> links to be
|
||
self-referential. Hence, to exclude specific keys, we use
|
||
<code>org-roam-db-extra-links-exclude-keys</code>.
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddb_002dextra_002dlinks_002dexclude_002dkeys"><span class="category">Variable: </span><span><strong>org-roam-db-extra-links-exclude-keys</strong><a href='#index-org_002droam_002ddb_002dextra_002dlinks_002dexclude_002dkeys' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Keys to ignore when mapping over links.
|
||
</p>
|
||
<p>The car of the association list is the Org element type (e.g. keyword). The
|
||
cdr is a list of case-insensitive strings to exclude from being treated as
|
||
links.
|
||
</p></dd></dl>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="When-to-cache">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#What-to-cache" accesskey="p" rel="prev">What to cache</a>, Up: <a href="#Customizing-Node-Caching" accesskey="u" rel="up">Customizing Node Caching</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="When-to-cache-1"></span><h3 class="section">6.3 When to cache</h3>
|
||
|
||
<p>By default, Org-roam is eager in caching: each time an Org-roam file is modified
|
||
and saved, it updates the database for the corresponding file. This keeps the
|
||
database up-to-date, causing the least surprise when using the interactive
|
||
commands.
|
||
</p>
|
||
<p>However, depending on how large your Org files are, database updating can be a
|
||
slow operation. You can disable the automatic updating of the database by
|
||
setting <code>org-roam-db-update-on-save</code> to <code>nil</code>.
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddb_002dupdate_002don_002dsave"><span class="category">Variable: </span><span><strong>org-roam-db-update-on-save</strong><a href='#index-org_002droam_002ddb_002dupdate_002don_002dsave' class='copiable-anchor'> ¶</a></span></dt>
|
||
</dl>
|
||
|
||
<p>If t, update the Org-roam database upon saving the file. Disable this if your
|
||
files are large and updating the database is slow.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="The-Org_002droam-Buffer">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Node-Properties" accesskey="n" rel="next">Node Properties</a>, Previous: <a href="#Customizing-Node-Caching" accesskey="p" rel="prev">Customizing Node Caching</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="The-Org_002droam-Buffer-1"></span><h2 class="chapter">7 The Org-roam Buffer</h2>
|
||
|
||
<p>Org-roam provides the Org-roam buffer: an interface to view relationships with
|
||
other notes (backlinks, reference links, unlinked references etc.). There are
|
||
two main commands to use here:
|
||
</p>
|
||
<ul>
|
||
<li> <code>org-roam-buffer-toggle</code>: Launch an Org-roam buffer that tracks the node
|
||
currently at point. This means that the content of the buffer changes as the
|
||
point is moved, if necessary.
|
||
|
||
</li><li> <code>org-roam-buffer-display-dedicated</code>: Launch an Org-roam buffer for a specific
|
||
node without visiting its file. Unlike <code>org-roam-buffer-toggle</code> you can have
|
||
multiple such buffers and their content won’t be automatically replaced with a
|
||
new node at point.
|
||
</li></ul>
|
||
|
||
<p>To bring up a buffer that tracks the current node at point, call <code>M-x
|
||
org-roam-buffer-toggle</code>.
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dbuffer_002dtoggle"><span class="category">Function: </span><span><strong>org-roam-buffer-toggle</strong><a href='#index-org_002droam_002dbuffer_002dtoggle' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Toggle display of the <code>org-roam-buffer</code>.
|
||
</p></dd></dl>
|
||
|
||
<p>To bring up a buffer that’s dedicated for a specific node, call <code>M-x
|
||
org-roam-buffer-display-dedicated</code>.
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dbuffer_002ddisplay_002ddedicated"><span class="category">Function: </span><span><strong>org-roam-buffer-display-dedicated</strong><a href='#index-org_002droam_002dbuffer_002ddisplay_002ddedicated' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Launch node dedicated Org-roam buffer without visiting the node itself.
|
||
</p></dd></dl>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Navigating-the-Org_002droam-Buffer" accesskey="1">Navigating the Org-roam Buffer</a></li>
|
||
<li><a href="#Configuring-what-is-displayed-in-the-buffer" accesskey="2">Configuring what is displayed in the buffer</a></li>
|
||
<li><a href="#Configuring-the-Org_002droam-buffer-display" accesskey="3">Configuring the Org-roam buffer display</a></li>
|
||
<li><a href="#Styling-the-Org_002droam-buffer" accesskey="4"><strong>TODO</strong> Styling the Org-roam buffer</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="Navigating-the-Org_002droam-Buffer">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Configuring-what-is-displayed-in-the-buffer" accesskey="n" rel="next">Configuring what is displayed in the buffer</a>, Up: <a href="#The-Org_002droam-Buffer" accesskey="u" rel="up">The Org-roam Buffer</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Navigating-the-Org_002droam-Buffer-1"></span><h3 class="section">7.1 Navigating the Org-roam Buffer</h3>
|
||
|
||
<p>The Org-roam buffer uses <code>magit-section</code>, making the typical <code>magit-section</code>
|
||
keybindings available. Here are several of the more useful ones:
|
||
</p>
|
||
<ul>
|
||
<li> <code>M-{N}</code>: <code>magit-section-show-level-{N}-all</code>
|
||
|
||
</li><li> <code>n</code>: <code>magit-section-forward</code>
|
||
|
||
</li><li> <code><TAB></code>: <code>magit-section-toggle</code>
|
||
|
||
</li><li> <code><RET></code>: <code>org-roam-buffer-visit-thing</code>
|
||
</li></ul>
|
||
|
||
<p><code>org-roam-buffer-visit-thing</code> is a placeholder command, that is replaced by
|
||
section-specific commands such as <code>org-roam-node-visit</code>.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Configuring-what-is-displayed-in-the-buffer">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Configuring-the-Org_002droam-buffer-display" accesskey="n" rel="next">Configuring the Org-roam buffer display</a>, Previous: <a href="#Navigating-the-Org_002droam-Buffer" accesskey="p" rel="prev">Navigating the Org-roam Buffer</a>, Up: <a href="#The-Org_002droam-Buffer" accesskey="u" rel="up">The Org-roam Buffer</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Configuring-what-is-displayed-in-the-buffer-1"></span><h3 class="section">7.2 Configuring what is displayed in the buffer</h3>
|
||
|
||
<p>There are currently 3 provided widget types:
|
||
</p>
|
||
<ul>
|
||
<li> BacklinksView (preview of) nodes that link to this node
|
||
|
||
</li><li> Reference LinksNodes that reference this node (see <a href="#Refs">Refs</a>)
|
||
|
||
</li><li> Unlinked referencesView nodes that contain text that match the nodes
|
||
title/alias but are not linked
|
||
</li></ul>
|
||
|
||
<p>To configure what sections are displayed in the buffer, set ~org-roam-mode-sections.
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-mode-sections
|
||
(list #'org-roam-backlinks-section
|
||
#'org-roam-reflinks-section
|
||
;; #'org-roam-unlinked-references-section
|
||
))
|
||
</pre></div>
|
||
|
||
<p>Note that computing unlinked references may be slow, and has not been added in by default.
|
||
</p>
|
||
<p>For each section function, you can pass args along to modify its behaviour. For
|
||
example, if you want to render unique sources for backlinks (and also keep
|
||
rendering reference links), set <code>org-roam-mode-sections</code> as follows:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-mode-sections
|
||
'((org-roam-backlinks-section :unique t)
|
||
org-roam-reflinks-section))
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Configuring-the-Org_002droam-buffer-display">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Styling-the-Org_002droam-buffer" accesskey="n" rel="next"><strong>TODO</strong> Styling the Org-roam buffer</a>, Previous: <a href="#Configuring-what-is-displayed-in-the-buffer" accesskey="p" rel="prev">Configuring what is displayed in the buffer</a>, Up: <a href="#The-Org_002droam-Buffer" accesskey="u" rel="up">The Org-roam Buffer</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Configuring-the-Org_002droam-buffer-display-1"></span><h3 class="section">7.3 Configuring the Org-roam buffer display</h3>
|
||
|
||
<p>Org-roam does not control how the pop-up buffer is displayed: this is left to
|
||
the user. The author’s recommended configuration is as follows:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(add-to-list 'display-buffer-alist
|
||
'("\\*org-roam\\*"
|
||
(display-buffer-in-direction)
|
||
(direction . right)
|
||
(window-width . 0.33)
|
||
(window-height . fit-window-to-buffer)))
|
||
</pre></div>
|
||
|
||
<p>Crucially, the window is a regular window (not a side-window), and this allows
|
||
for predictable navigation:
|
||
</p>
|
||
<ul>
|
||
<li> <code>RET</code> navigates to thing-at-point in the current window, replacing the
|
||
Org-roam buffer.
|
||
|
||
</li><li> <code>C-u RET</code> navigates to thing-at-point in the other window.
|
||
</li></ul>
|
||
|
||
<p>For users that prefer using a side-window for the org-roam buffer, the following
|
||
example configuration should provide a good starting point:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(add-to-list 'display-buffer-alist
|
||
'("\\*org-roam\\*"
|
||
(display-buffer-in-side-window)
|
||
(side . right)
|
||
(slot . 0)
|
||
(window-width . 0.33)
|
||
(window-parameters . ((no-other-window . t)
|
||
(no-delete-other-windows . t)))))
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Styling-the-Org_002droam-buffer">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Configuring-the-Org_002droam-buffer-display" accesskey="p" rel="prev">Configuring the Org-roam buffer display</a>, Up: <a href="#The-Org_002droam-Buffer" accesskey="u" rel="up">The Org-roam Buffer</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="TODO-Styling-the-Org_002droam-buffer"></span><h3 class="section">7.4 <strong>TODO</strong> Styling the Org-roam buffer</h3>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="Node-Properties">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Citations" accesskey="n" rel="next">Citations</a>, Previous: <a href="#The-Org_002droam-Buffer" accesskey="p" rel="prev">The Org-roam Buffer</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Node-Properties-1"></span><h2 class="chapter">8 Node Properties</h2>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Standard-Org-properties" accesskey="1">Standard Org properties</a></li>
|
||
<li><a href="#Titles-and-Aliases" accesskey="2">Titles and Aliases</a></li>
|
||
<li><a href="#Tags" accesskey="3">Tags</a></li>
|
||
<li><a href="#Refs" accesskey="4">Refs</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="Standard-Org-properties">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Titles-and-Aliases" accesskey="n" rel="next">Titles and Aliases</a>, Up: <a href="#Node-Properties" accesskey="u" rel="up">Node Properties</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Standard-Org-properties-1"></span><h3 class="section">8.1 Standard Org properties</h3>
|
||
|
||
<p>Org-roam caches most of the standard Org properties. The full list now includes:
|
||
</p>
|
||
<ul>
|
||
<li> outline level
|
||
|
||
</li><li> todo state
|
||
|
||
</li><li> priority
|
||
|
||
</li><li> scheduled
|
||
|
||
</li><li> deadline
|
||
|
||
</li><li> tags
|
||
</li></ul>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Titles-and-Aliases">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Tags" accesskey="n" rel="next">Tags</a>, Previous: <a href="#Standard-Org-properties" accesskey="p" rel="prev">Standard Org properties</a>, Up: <a href="#Node-Properties" accesskey="u" rel="up">Node Properties</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Titles-and-Aliases-1"></span><h3 class="section">8.2 Titles and Aliases</h3>
|
||
|
||
<p>Each node has a single title. For file nodes, this is specified with the
|
||
‘#+title‘ property for the file. For headline nodes, this is the main text.
|
||
</p>
|
||
<p>Nodes can also have multiple aliases. Aliases allow searching for nodes via an
|
||
alternative name. For example, one may want to assign a well-known acronym (AI)
|
||
to a node titled “Artificial Intelligence”.
|
||
</p>
|
||
<p>To assign an alias to a node, add the “ROAM<em class='math'>_ALIASES</em>” property to the node:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">* Artificial Intelligence
|
||
:PROPERTIES:
|
||
:ROAM_ALIASES: AI
|
||
:END:
|
||
</pre></div>
|
||
|
||
<p>Alternatively, Org-roam provides some functions to add or remove aliases.
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dalias_002dadd"><span class="category">Function: </span><span><strong>org-roam-alias-add</strong> <em>alias</em><a href='#index-org_002droam_002dalias_002dadd' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Add ALIAS to the node at point. When called interactively, prompt for the
|
||
alias to add.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dalias_002dremove"><span class="category">Function: </span><span><strong>org-roam-alias-remove</strong><a href='#index-org_002droam_002dalias_002dremove' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Remove an alias from the node at point.
|
||
</p></dd></dl>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Tags">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Refs" accesskey="n" rel="next">Refs</a>, Previous: <a href="#Titles-and-Aliases" accesskey="p" rel="prev">Titles and Aliases</a>, Up: <a href="#Node-Properties" accesskey="u" rel="up">Node Properties</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Tags-1"></span><h3 class="section">8.3 Tags</h3>
|
||
|
||
<p>Tags for top-level (file) nodes are pulled from the variable <code>org-file-tags</code>,
|
||
which is set by the <code>#+filetags</code> keyword, as well as other tags the file may
|
||
have inherited. Tags for headline level nodes are regular Org tags.
|
||
</p>
|
||
<p>Note that the <code>#+filetags</code> keyword results in tags being inherited by headers
|
||
within the file. This makes it impossible for selective tag inheritance: i.e.
|
||
either tag inheritance is turned off, or all headline nodes will inherit the
|
||
tags from the file node. This is a design compromise of Org-roam.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Refs">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Tags" accesskey="p" rel="prev">Tags</a>, Up: <a href="#Node-Properties" accesskey="u" rel="up">Node Properties</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Refs-1"></span><h3 class="section">8.4 Refs</h3>
|
||
|
||
<p>Refs are unique identifiers for nodes. These keys allow references to the key to
|
||
show up in the Org-roam buffer. For example, a node for a website may use the URL
|
||
as the ref, and a node for a paper may use an Org-ref citation key.
|
||
</p>
|
||
<p>To add a ref, add to the “ROAM<em class='math'>_REFS</em>” property as follows:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">* Google
|
||
:PROPERTIES:
|
||
:ROAM_REFS: https://www.google.com/
|
||
:END:
|
||
</pre></div>
|
||
|
||
<p>With the above example, if another node links to <a href="https://www.google.com/">https://www.google.com/</a>, it
|
||
will show up as a “reference backlink”.
|
||
</p>
|
||
<p>These keys also come in useful for when taking website notes, using the
|
||
<code>roam-ref</code> protocol (see <a href="#org_002droam_002dprotocol">org-roam-protocol</a>).
|
||
</p>
|
||
<p>You may assign multiple refs to a single node, for example when you want
|
||
multiple papers in a series to share the same note, or an article has a citation
|
||
key and a URL at the same time.
|
||
</p>
|
||
<p>Org-roam also provides some functions to add or remove refs.
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dref_002dadd"><span class="category">Function: </span><span><strong>org-roam-ref-add</strong> <em>ref</em><a href='#index-org_002droam_002dref_002dadd' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Add REF to the node at point. When called interactively, prompt for the
|
||
ref to add.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dref_002dremove"><span class="category">Function: </span><span><strong>org-roam-ref-remove</strong><a href='#index-org_002droam_002dref_002dremove' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Remove a ref from the node at point.
|
||
</p></dd></dl>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="Citations">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Completion" accesskey="n" rel="next">Completion</a>, Previous: <a href="#Node-Properties" accesskey="p" rel="prev">Node Properties</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Citations-1"></span><h2 class="chapter">9 Citations</h2>
|
||
|
||
<p>Since version 9.5, Org has first-class support for citations. Org-roam supports
|
||
the caching of both these in-built citations (of form <code>[cite:@key]</code>) and <a href="https://github.com/jkitchin/org-ref">org-ref</a>
|
||
citations (of form cite:key).
|
||
</p>
|
||
<p>Org-roam attempts to load both the <code>org-ref</code> and <code>org-cite</code> package when
|
||
indexing files, so no further setup from the user is required for citation
|
||
support.
|
||
</p>
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Using-the-Cached-Information" accesskey="1">Using the Cached Information</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="Using-the-Cached-Information">
|
||
<div class="header">
|
||
<p>
|
||
Up: <a href="#Citations" accesskey="u" rel="up">Citations</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Using-the-Cached-Information-1"></span><h3 class="section">9.1 Using the Cached Information</h3>
|
||
|
||
<p>It is common to use take reference notes for academic papers. To designate the
|
||
node to be the canonical node for the academic paper, we can use its unique
|
||
citation key:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">* Probabilistic Robotics
|
||
:PROPERTIES:
|
||
:ID: 51b7b82c-bbb4-4822-875a-ed548cffda10
|
||
:ROAM_REFS: @thrun2005probabilistic
|
||
:END:
|
||
</pre></div>
|
||
|
||
<p>or
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">* Probabilistic Robotics
|
||
:PROPERTIES:
|
||
:ID: 51b7b82c-bbb4-4822-875a-ed548cffda10
|
||
:ROAM_REFS: [cite:@thrun2005probabilistic]
|
||
:END:
|
||
</pre></div>
|
||
|
||
<p>for <code>org-cite</code>, or:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">* Probabilistic Robotics
|
||
:PROPERTIES:
|
||
:ID: 51b7b82c-bbb4-4822-875a-ed548cffda10
|
||
:ROAM_REFS: cite:thrun2005probabilistic
|
||
:END:
|
||
</pre></div>
|
||
|
||
<p>for <code>org-ref</code>.
|
||
</p>
|
||
<p>When another node has a citation for that key, we can see it using the
|
||
<code>Reflinks</code> section of the Org-roam buffer.
|
||
</p>
|
||
<p>Extension developers may be interested in retrieving the citations within their
|
||
notes. This information can be found within the <code>citation</code> table of the Org-roam
|
||
database.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="Completion">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Encryption" accesskey="n" rel="next">Encryption</a>, Previous: <a href="#Citations" accesskey="p" rel="prev">Citations</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Completion-1"></span><h2 class="chapter">10 Completion</h2>
|
||
|
||
<p>Completions for Org-roam are provided via <code>completion-at-point</code>. Org-roam
|
||
currently provides completions in two scenarios:
|
||
</p>
|
||
<ul>
|
||
<li> When within an Org bracket link
|
||
|
||
</li><li> Anywhere
|
||
</li></ul>
|
||
|
||
<p>Completions are installed locally in all Org-roam files. To trigger completions,
|
||
call <code>M-x completion-at-point</code>. If using <code>company-mode</code>, add <code>company-capf</code> to
|
||
<code>company-backends</code>.
|
||
</p>
|
||
<p>Completions respect <code>completion-styles</code>: the user is free to choose how
|
||
candidates are matched. An example of a completion style that has grown in
|
||
popularity is <a href="https://github.com/oantolin/orderless">orderless</a>.
|
||
</p>
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Completing-within-Link-Brackets" accesskey="1">Completing within Link Brackets</a></li>
|
||
<li><a href="#Completing-anywhere" accesskey="2">Completing anywhere</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="Completing-within-Link-Brackets">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Completing-anywhere" accesskey="n" rel="next">Completing anywhere</a>, Up: <a href="#Completion" accesskey="u" rel="up">Completion</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Completing-within-Link-Brackets-1"></span><h3 class="section">10.1 Completing within Link Brackets</h3>
|
||
|
||
<p>Completions within link brackets are provided by
|
||
<code>org-roam-complete-link-at-point</code>.
|
||
</p>
|
||
<p>The completion candidates are the titles and aliases for all Org-roam nodes.
|
||
Upon choosing a candidate, a <code>roam:Title</code> link will be inserted, linking to node
|
||
of choice.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Completing-anywhere">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Completing-within-Link-Brackets" accesskey="p" rel="prev">Completing within Link Brackets</a>, Up: <a href="#Completion" accesskey="u" rel="up">Completion</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Completing-anywhere-1"></span><h3 class="section">10.2 Completing anywhere</h3>
|
||
|
||
<p>The same completions can be triggered anywhere for the symbol at point if not
|
||
within a bracketed link. This is provided by <code>org-roam-complete-everywhere</code>.
|
||
Similarly, the completion candidates are the titles and aliases for all Org-roam
|
||
nodes, and upon choosing a candidate a <code>roam:Title</code> link will be inserted
|
||
linking to the node of choice.
|
||
</p>
|
||
<p>This is disabled by default. To enable it, set <code>org-roam-completion-everywhere</code>
|
||
to <code>t</code>:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-completion-everywhere t)
|
||
</pre></div>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dcompletion_002deverywhere"><span class="category">Variable: </span><span><strong>org-roam-completion-everywhere</strong><a href='#index-org_002droam_002dcompletion_002deverywhere' class='copiable-anchor'> ¶</a></span></dt>
|
||
</dl>
|
||
|
||
<p>When non-nil, provide link completion matching outside of Org links.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="Encryption">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#The-Templating-System" accesskey="n" rel="next">The Templating System</a>, Previous: <a href="#Completion" accesskey="p" rel="prev">Completion</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Encryption-1"></span><h2 class="chapter">11 Encryption</h2>
|
||
|
||
<p>Emacs has support for creating and editing encrypted gpg files, and Org-roam need
|
||
not provide additional tooling. To create encrypted files, simply add the <code>.gpg</code>
|
||
extension in your Org-roam capture templates. For example:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-capture-templates '(("d" "default" plain "%?"
|
||
:target (file+head "${slug}.org.gpg"
|
||
"#+title: ${title}\n")
|
||
:unnarrowed t)))
|
||
</pre></div>
|
||
|
||
<p>Note that the Org-roam database stores metadata information in plain-text
|
||
(headline text, for example), so if this information is private to you then you
|
||
should also ensure the database is encrypted.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="chapter" id="The-Templating-System">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Extensions" accesskey="n" rel="next">Extensions</a>, Previous: <a href="#Encryption" accesskey="p" rel="prev">Encryption</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="The-Templating-System-1"></span><h2 class="chapter">12 The Templating System</h2>
|
||
|
||
<p>Org-roam extends the <code>org-capture</code> system, providing a smoother note-taking
|
||
experience. However, these extensions mean Org-roam capture templates are
|
||
incompatible with <code>org-capture</code> templates.
|
||
</p>
|
||
<p>Org-roam’s templates are specified by <code>org-roam-capture-templates</code>. Just like
|
||
<code>org-capture-templates</code>, <code>org-roam-capture-templates</code> can contain multiple
|
||
templates. If <code>org-roam-capture-templates</code> only contains one template, there
|
||
will be no prompt for template selection.
|
||
</p>
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Template-Walkthrough" accesskey="1">Template Walkthrough</a></li>
|
||
<li><a href="#Org_002droam-Template-Expansion" accesskey="2">Org-roam Template Expansion</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="Template-Walkthrough">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Org_002droam-Template-Expansion" accesskey="n" rel="next">Org-roam Template Expansion</a>, Up: <a href="#The-Templating-System" accesskey="u" rel="up">The Templating System</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Template-Walkthrough-1"></span><h3 class="section">12.1 Template Walkthrough</h3>
|
||
|
||
<p>To demonstrate the additions made to org-capture templates. Here, we explain
|
||
the default template, reproduced below. You will find most of the elements
|
||
of the template are similar to <code>org-capture</code> templates.
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(("d" "default" plain "%?"
|
||
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
|
||
"#+title: ${title}\n")
|
||
:unnarrowed t))
|
||
</pre></div>
|
||
|
||
<ul>
|
||
<li> The template has short key <code>"d"</code>. If you have only one template, org-roam
|
||
automatically chooses this template for you.
|
||
|
||
</li><li> The template is given a description of <code>"default"</code>.
|
||
|
||
</li><li> <code>plain</code> text is inserted. Other options include Org headings via
|
||
<code>entry</code>.
|
||
|
||
</li><li> Notice that the <code>target</code> that’s usually in Org-capture templates is missing
|
||
here.
|
||
|
||
</li><li> <code>"%?"</code> is the template inserted on each call to <code>org-roam-capture-</code>.
|
||
This template means don’t insert any content, but place the cursor here.
|
||
|
||
</li><li> <code>:target</code> is a compulsory specification in the Org-roam capture template. The
|
||
first element of the list indicates the type of the target, the second
|
||
element indicates the location of the captured node, and the rest of the
|
||
elements indicate prefilled template that will be inserted and the position
|
||
of the point will be adjusted for. The latter behavior varies from type to
|
||
type of the capture target.
|
||
|
||
</li><li> <code>:unnarrowed t</code> tells org-capture to show the contents for the whole file,
|
||
rather than narrowing to just the entry. This is part of the Org-capture
|
||
templates.
|
||
</li></ul>
|
||
|
||
<p>See the <code>org-roam-capture-templates</code> documentation for more details and
|
||
customization options.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Org_002droam-Template-Expansion">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Template-Walkthrough" accesskey="p" rel="prev">Template Walkthrough</a>, Up: <a href="#The-Templating-System" accesskey="u" rel="up">The Templating System</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Org_002droam-Template-Expansion-1"></span><h3 class="section">12.2 Org-roam Template Expansion</h3>
|
||
|
||
<p>Org-roam’s template definitions also extend org-capture’s template syntax, to
|
||
allow prefilling of strings. We have seen a glimpse of this in <a href="#Template-Walkthrough">Template
|
||
Walkthrough</a>.
|
||
</p>
|
||
<p>Org-roam provides the <code>${foo}</code> syntax for substituting variables with known
|
||
strings. <code>${foo}</code>’s substitution is performed as follows:
|
||
</p>
|
||
<ul>
|
||
<li> If <code>foo</code> is a function, <code>foo</code> is called with the current node as its
|
||
argument.
|
||
|
||
</li><li> Else if <code>org-roam-node-foo</code> is a function, <code>foo</code> is called with the current node
|
||
as its argument. The <code>org-roam-node-</code> prefix defines many of Org-roam’s node
|
||
accessors such as <code>org-roam-node-title</code> and <code>org-roam-node-level</code>.
|
||
|
||
</li><li> Else look up <code>org-roam-capture--info</code> for <code>foo</code>. This is an internal variable
|
||
that is set before the capture process begins.
|
||
|
||
</li><li> If none of the above applies, read a string using <code>completing-read</code>.
|
||
<ul>
|
||
<li> Org-roam also provides the <code>${foo=default_val}</code> syntax, where if a default
|
||
value is provided, will be the initial value for the <code>foo</code> key during
|
||
minibuffer completion.
|
||
</li></ul>
|
||
</li></ul>
|
||
|
||
<p>One can check the list of available keys for nodes by inspecting the
|
||
<code>org-roam-node</code> struct. At the time of writing, it is:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(cl-defstruct (org-roam-node (:constructor org-roam-node-create)
|
||
(:copier nil))
|
||
"A heading or top level file with an assigned ID property."
|
||
file file-hash file-atime file-mtime
|
||
id level point todo priority scheduled deadline title properties olp
|
||
tags aliases refs)
|
||
</pre></div>
|
||
|
||
<p>This makes <code>${file}</code>, <code>${file-hash}</code> etc. all valid substitutions.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="Extensions">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Performance-Optimization" accesskey="n" rel="next">Performance Optimization</a>, Previous: <a href="#The-Templating-System" accesskey="p" rel="prev">The Templating System</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Extensions-1"></span><h2 class="chapter">13 Extensions</h2>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#org_002droam_002dprotocol" accesskey="1">org-roam-protocol</a></li>
|
||
<li><a href="#org_002droam_002dgraph" accesskey="2">org-roam-graph</a></li>
|
||
<li><a href="#org_002droam_002ddailies" accesskey="3">org-roam-dailies</a></li>
|
||
<li><a href="#org_002droam_002dexport" accesskey="4">org-roam-export</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="org_002droam_002dprotocol">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#org_002droam_002dgraph" accesskey="n" rel="next">org-roam-graph</a>, Up: <a href="#Extensions" accesskey="u" rel="up">Extensions</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="org_002droam_002dprotocol-1"></span><h3 class="section">13.1 org-roam-protocol</h3>
|
||
|
||
<p>Org-roam provides extensions for capturing content from external applications
|
||
such as the browser, via <code>org-protocol</code>. Org-roam extends <code>org-protocol</code> with 2
|
||
protocols: the <code>roam-node</code> and <code>roam-ref</code> protocols.
|
||
</p>
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Installation-_00281_0029" accesskey="1">Installation</a></li>
|
||
<li><a href="#The-roam_002dnode-protocol" accesskey="2">The roam-node protocol</a></li>
|
||
<li><a href="#The-roam_002dref-protocol" accesskey="3">The roam-ref protocol</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="subsection" id="Installation-_00281_0029">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#The-roam_002dnode-protocol" accesskey="n" rel="next">The roam-node protocol</a>, Up: <a href="#org_002droam_002dprotocol" accesskey="u" rel="up">org-roam-protocol</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Installation-2"></span><h4 class="subsection">13.1.1 Installation</h4>
|
||
|
||
<p>To enable Org-roam’s protocol extensions, simply add the following to your init
|
||
file:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(require 'org-roam-protocol)
|
||
</pre></div>
|
||
|
||
<p>We also need to set up <code>org-protocol</code>: the instructions for setting up
|
||
<code>org-protocol</code> are reproduced here.
|
||
</p>
|
||
<p>On a high-level, external calls are passed to Emacs via <code>emacsclient</code>.
|
||
<code>org-protocol</code> intercepts these and runs custom actions based on the protocols
|
||
registered. Hence, to use <code>org-protocol</code>, once must:
|
||
</p>
|
||
<ul>
|
||
<li> launch the <code>emacsclient</code> process
|
||
|
||
</li><li> Register <code>org-protocol://</code> as a valid scheme-handler
|
||
</li></ul>
|
||
|
||
<p>The instructions for the latter for each operating system is detailed below.
|
||
</p>
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Linux" accesskey="1">Linux</a></li>
|
||
<li><a href="#Mac-OS" accesskey="2">Mac OS</a></li>
|
||
<li><a href="#Windows" accesskey="3">Windows</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="unnumberedsubsubsec" id="Linux">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Mac-OS" accesskey="n" rel="next">Mac OS</a>, Up: <a href="#Installation-_00281_0029" accesskey="u" rel="up">Installation</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Linux-1"></span><h4 class="unnumberedsubsubsec">Linux</h4>
|
||
|
||
<p>For Linux users, create a desktop application in
|
||
<code>~/.local/share/applications/org-protocol.desktop</code>:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">[Desktop Entry]
|
||
Name=Org-Protocol
|
||
Exec=emacsclient %u
|
||
Icon=emacs-icon
|
||
Type=Application
|
||
Terminal=false
|
||
MimeType=x-scheme-handler/org-protocol
|
||
</pre></div>
|
||
|
||
<p>Associate <code>org-protocol://</code> links with the desktop application by
|
||
running in your shell:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">xdg-mime default org-protocol.desktop x-scheme-handler/org-protocol
|
||
</pre></div>
|
||
|
||
<p>To disable the “confirm” prompt in Chrome, you can also make Chrome show a
|
||
checkbox to tick, so that the <code>Org-Protocol Client</code> app will be used without
|
||
confirmation. To do this, run in a shell:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">sudo mkdir -p /etc/opt/chrome/policies/managed/
|
||
sudo tee /etc/opt/chrome/policies/managed/external_protocol_dialog.json >/dev/null <<'EOF'
|
||
{
|
||
"ExternalProtocolDialogShowAlwaysOpenCheckbox": true
|
||
}
|
||
EOF
|
||
sudo chmod 644 /etc/opt/chrome/policies/managed/external_protocol_dialog.json
|
||
</pre></div>
|
||
|
||
<p>and then restart Chrome (for example, by navigating to <chrome://restart>) to
|
||
make the new policy take effect.
|
||
</p>
|
||
<p>See <a href="https://www.chromium.org/administrators/linux-quick-start">here</a> for more info on the <code>/etc/opt/chrome/policies/managed</code> directory and
|
||
<a href="https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ExternalProtocolDialogShowAlwaysOpenCheckbox">here</a> for information on the <code>ExternalProtocolDialogShowAlwaysOpenCheckbox</code> policy.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="unnumberedsubsubsec" id="Mac-OS">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Windows" accesskey="n" rel="next">Windows</a>, Previous: <a href="#Linux" accesskey="p" rel="prev">Linux</a>, Up: <a href="#Installation-_00281_0029" accesskey="u" rel="up">Installation</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Mac-OS-1"></span><h4 class="unnumberedsubsubsec">Mac OS</h4>
|
||
|
||
<p>For Mac OS, we need to create our own application.
|
||
</p>
|
||
<ul>
|
||
<li> Launch Script Editor
|
||
|
||
</li><li> Use the following script, paying attention to the path to <code>emacsclient</code>:
|
||
</li></ul>
|
||
|
||
<div class="example lisp">
|
||
<pre class="lisp">on open location this_URL
|
||
set EC to "/usr/local/bin/emacsclient --no-wait "
|
||
set filePath to quoted form of this_URL
|
||
do shell script EC & filePath
|
||
tell application "Emacs" to activate
|
||
end open location
|
||
</pre></div>
|
||
|
||
<ul>
|
||
<li> Save the script in <code>/Applications/OrgProtocolClient.app</code>, changing the script type to
|
||
“Application”, rather than “Script”.
|
||
|
||
</li><li> Edit <code>/Applications/OrgProtocolClient.app/Contents/Info.plist</code>, adding the
|
||
following before the last <code></dict></code> tag:
|
||
</li></ul>
|
||
|
||
<div class="example">
|
||
<pre class="example"><key>CFBundleURLTypes</key>
|
||
<array>
|
||
<dict>
|
||
<key>CFBundleURLName</key>
|
||
<string>org-protocol handler</string>
|
||
<key>CFBundleURLSchemes</key>
|
||
<array>
|
||
<string>org-protocol</string>
|
||
</array>
|
||
</dict>
|
||
</array>
|
||
</pre></div>
|
||
|
||
<ul>
|
||
<li> Save the file, and run the <code>OrgProtocolClient.app</code> to register the protocol.
|
||
</li></ul>
|
||
|
||
<p>To disable the “confirm” prompt in Chrome, you can also make Chrome
|
||
show a checkbox to tick, so that the <code>OrgProtocol</code> app will be used
|
||
without confirmation. To do this, run in a shell:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">defaults write com.google.Chrome ExternalProtocolDialogShowAlwaysOpenCheckbox -bool true
|
||
</pre></div>
|
||
|
||
<p>If you’re using <a href="https://github.com/railwaycat/homebrew-emacsmacport">Emacs Mac Port</a>, it registered its ‘Emacs.app‘ as the default
|
||
handler for the URL scheme ‘org-protocol‘. To make <code>OrgProtocol.app</code>
|
||
the default handler instead, run:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add \
|
||
'{"LSHandlerPreferredVersions" = { "LSHandlerRoleAll" = "-"; }; LSHandlerRoleAll = "org.yourusername.OrgProtocol"; LSHandlerURLScheme = "org-protocol";}'
|
||
</pre></div>
|
||
|
||
<p>Then restart your computer.
|
||
</p>
|
||
<ul>
|
||
<li> <span id="Testing-org_002dprotocol"></span>Testing org-protocol
|
||
|
||
|
||
<p>To test that you have the handler setup and registered properly from the command
|
||
line you can run:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">open org-protocol://roam-ref\?template=r\&ref=test\&title=this
|
||
</pre></div>
|
||
|
||
<p>If you get an error similar too this or the wrong handler is run:
|
||
</p>
|
||
<blockquote>
|
||
<p>No application knows how to open URL org-protocol://roam-ref?template=r&ref=test&title=this (Error Domain=NSOSStatusErrorDomain Code=-10814 “kLSApplicationNotFoundErr: E.g. no application claims the file” UserInfo={<em class='math'>_LSLine</em>=1489, _LSFunction=runEvaluator}).
|
||
</p>
|
||
</blockquote>
|
||
|
||
<p>You may need to manually register your handler, like this:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -R -f /Applications/OrgProtocolClient.app
|
||
</pre></div>
|
||
|
||
<p>Here is a link to the lsregister command that is really useful: <a href="https://eclecticlight.co/2019/03/25/lsregister-a-valuable-undocumented-command-for-launchservices/">https://eclecticlight.co/2019/03/25/lsregister-a-valuable-undocumented-command-for-launchservices/</a>
|
||
</p></li></ul>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="unnumberedsubsubsec" id="Windows">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Mac-OS" accesskey="p" rel="prev">Mac OS</a>, Up: <a href="#Installation-_00281_0029" accesskey="u" rel="up">Installation</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Windows-1"></span><h4 class="unnumberedsubsubsec">Windows</h4>
|
||
|
||
<p>For Windows, create a temporary <code>org-protocol.reg</code> file:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">REGEDIT4
|
||
|
||
[HKEY_CLASSES_ROOT\org-protocol]
|
||
@="URL:Org Protocol"
|
||
"URL Protocol"=""
|
||
[HKEY_CLASSES_ROOT\org-protocol\shell]
|
||
[HKEY_CLASSES_ROOT\org-protocol\shell\open]
|
||
[HKEY_CLASSES_ROOT\org-protocol\shell\open\command]
|
||
@="\"C:\\Windows\\System32\\wsl.exe\" emacsclient \"%1\""
|
||
</pre></div>
|
||
|
||
<p>The above will forward the protocol to WSL. If you run Emacs natively on
|
||
Windows, replace the last line with:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">@="\"c:\\path\\to\\emacs\\bin\\emacsclientw.exe\" \"%1\""
|
||
</pre></div>
|
||
|
||
<p>After executing the .reg file, the protocol is registered and you can delete the
|
||
file.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="subsection" id="The-roam_002dnode-protocol">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#The-roam_002dref-protocol" accesskey="n" rel="next">The roam-ref protocol</a>, Previous: <a href="#Installation-_00281_0029" accesskey="p" rel="prev">Installation</a>, Up: <a href="#org_002droam_002dprotocol" accesskey="u" rel="up">org-roam-protocol</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="The-roam_002dnode-protocol-1"></span><h4 class="subsection">13.1.2 The roam-node protocol</h4>
|
||
|
||
<p>The roam-node protocol opens the node with ID specified by the <code>node</code> key (e.g.
|
||
<code>org-protocol://roam-node?node=node-id</code>). <code>org-roam-graph</code> uses this to make the
|
||
graph navigable.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="subsection" id="The-roam_002dref-protocol">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#The-roam_002dnode-protocol" accesskey="p" rel="prev">The roam-node protocol</a>, Up: <a href="#org_002droam_002dprotocol" accesskey="u" rel="up">org-roam-protocol</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="The-roam_002dref-protocol-1"></span><h4 class="subsection">13.1.3 The roam-ref protocol</h4>
|
||
|
||
<p>This protocol finds or creates a new note with a given <code>ROAM_REFS</code>:
|
||
</p>
|
||
<img src="images/roam-ref.gif" alt="images/roam-ref">
|
||
|
||
<p>To use this, create the following <a href="https://en.wikipedia.org/wiki/Bookmarklet">bookmarklet</a> in your browser:
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">javascript:location.href =
|
||
'org-protocol://roam-ref?template=r&ref='
|
||
+ encodeURIComponent(location.href)
|
||
+ '&title='
|
||
+ encodeURIComponent(document.title)
|
||
+ '&body='
|
||
+ encodeURIComponent(window.getSelection())
|
||
</pre></div>
|
||
|
||
<p>or as a keybinding in <code>qutebrowser</code> in , using the <code>config.py</code> file (see
|
||
<a href="https://github.com/qutebrowser/qutebrowser/blob/master/doc/help/configuring.asciidoc">Configuring qutebrowser</a>):
|
||
</p>
|
||
<div class="example">
|
||
<pre class="example">config.bind("<Ctrl-r>", "open javascript:location.href='org-protocol://roam-ref?template=r&ref='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)")
|
||
</pre></div>
|
||
|
||
<p>where <code>template</code> is the template key for a template in
|
||
<code>org-roam-capture-ref-templates</code> (see <a href="#The-Templating-System">The Templating System</a>).
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="org_002droam_002dgraph">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#org_002droam_002ddailies" accesskey="n" rel="next">org-roam-dailies</a>, Previous: <a href="#org_002droam_002dprotocol" accesskey="p" rel="prev">org-roam-protocol</a>, Up: <a href="#Extensions" accesskey="u" rel="up">Extensions</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="org_002droam_002dgraph-1"></span><h3 class="section">13.2 org-roam-graph</h3>
|
||
|
||
<p>Org-roam provides basic graphing capabilities to explore interconnections
|
||
between notes, in <code>org-roam-graph</code>. This is done by performing SQL queries and
|
||
generating images using <a href="https://graphviz.org/">Graphviz</a>. The graph can also be navigated: see <a href="#org_002droam_002dprotocol">org-roam-protocol</a>.
|
||
</p>
|
||
<p>The entry point to graph creation is <code>org-roam-graph</code>.
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dgraph"><span class="category">Function: </span><span><strong>org-roam-graph</strong> <em>& optional arg node</em><a href='#index-org_002droam_002dgraph' class='copiable-anchor'> ¶</a></span></dt>
|
||
</dl>
|
||
|
||
<p>Build and display a graph for NODE.
|
||
ARG may be any of the following values:
|
||
</p>
|
||
<ul>
|
||
<li> <code>nil</code> show the full graph.
|
||
|
||
</li><li> <code>integer</code> an integer argument <code>N</code> will show the graph for the connected
|
||
components to node up to <code>N</code> steps away.
|
||
</li></ul>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dgraph_002dexecutable"><span class="category">User Option: </span><span><strong>org-roam-graph-executable</strong><a href='#index-org_002droam_002dgraph_002dexecutable' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Path to the graphing executable (in this case, Graphviz). Set this if Org-roam
|
||
is unable to find the Graphviz executable on your system.
|
||
</p>
|
||
<p>You may also choose to use <code>neato</code> in place of <code>dot</code>, which generates a more
|
||
compact graph layout.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dgraph_002dviewer"><span class="category">User Option: </span><span><strong>org-roam-graph-viewer</strong><a href='#index-org_002droam_002dgraph_002dviewer' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Org-roam defaults to using Firefox (located on PATH) to view the SVG, but you
|
||
may choose to set it to:
|
||
</p>
|
||
<ul>
|
||
<li> A string, which is a path to the program used
|
||
|
||
</li><li> a function accepting a single argument: the graph file path.
|
||
</li></ul>
|
||
|
||
<p><code>nil</code> uses <code>view-file</code> to view the graph.
|
||
</p>
|
||
<p>If you are using WSL2 and would like to open the graph in Windows, you can use
|
||
the second option to set the browser and network file path:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-graph-viewer
|
||
(lambda (file)
|
||
(let ((org-roam-graph-viewer "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"))
|
||
(org-roam-graph--open (concat "file://///wsl$/Ubuntu" file)))))
|
||
</pre></div>
|
||
</dd></dl>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Graph-Options" accesskey="1">Graph Options</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="subsection" id="Graph-Options">
|
||
<div class="header">
|
||
<p>
|
||
Up: <a href="#org_002droam_002dgraph" accesskey="u" rel="up">org-roam-graph</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Graph-Options-1"></span><h4 class="subsection">13.2.1 Graph Options</h4>
|
||
|
||
<p>Graphviz provides many options for customizing the graph output, and Org-roam
|
||
supports some of them. See <a href="https://graphviz.gitlab.io/_pages/doc/info/attrs.html">https://graphviz.gitlab.io/_pages/doc/info/attrs.html</a>
|
||
for customizable options.
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dgraph_002dfiletype"><span class="category">User Option: </span><span><strong>org-roam-graph-filetype</strong><a href='#index-org_002droam_002dgraph_002dfiletype' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>The file type to generate for graphs. This defaults to <code>"svg"</code>.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dgraph_002dextra_002dconfig"><span class="category">User Option: </span><span><strong>org-roam-graph-extra-config</strong><a href='#index-org_002droam_002dgraph_002dextra_002dconfig' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Extra options passed to graphviz for the digraph (The “G” attributes).
|
||
Example: <code>'~(("rankdir" . "LR"))</code>
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dgraph_002dnode_002dextra_002dconfig"><span class="category">User Option: </span><span><strong>org-roam-graph-node-extra-config</strong><a href='#index-org_002droam_002dgraph_002dnode_002dextra_002dconfig' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>An alist of options to style the nodes.
|
||
The car of the alist node type such as <code>"id"</code>, or <code>"http"</code>. The cdr of the
|
||
list is another alist of Graphviz node options (the “N” attributes).
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dgraph_002dedge_002dextra_002dconfig"><span class="category">User Option: </span><span><strong>org-roam-graph-edge-extra-config</strong><a href='#index-org_002droam_002dgraph_002dedge_002dextra_002dconfig' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Extra options for edges in the graphviz output (The “E” attributes).
|
||
Example: <code>'(("dir" . "back"))</code>
|
||
</p></dd></dl>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="org_002droam_002ddailies">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#org_002droam_002dexport" accesskey="n" rel="next">org-roam-export</a>, Previous: <a href="#org_002droam_002dgraph" accesskey="p" rel="prev">org-roam-graph</a>, Up: <a href="#Extensions" accesskey="u" rel="up">Extensions</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="org_002droam_002ddailies-1"></span><h3 class="section">13.3 org-roam-dailies</h3>
|
||
|
||
<p>Org-roam provides journaling capabilities akin to
|
||
Org-journal with <code>org-roam-dailies</code>.
|
||
</p>
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Configuration" accesskey="1">Configuration</a></li>
|
||
<li><a href="#Usage" accesskey="2">Usage</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="subsection" id="Configuration">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Up: <a href="#org_002droam_002ddailies" accesskey="u" rel="up">org-roam-dailies</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Configuration-1"></span><h4 class="subsection">13.3.1 Configuration</h4>
|
||
|
||
<p>For <code>org-roam-dailies</code> to work, you need to define two variables:
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002ddirectory"><span class="category">Variable: </span><span><strong><code>org-roam-dailies-directory</code></strong><a href='#index-org_002droam_002ddailies_002ddirectory' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Path to daily-notes. This path is relative to <code>org-roam-directory</code>.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002dcapture_002dtemplates"><span class="category">Variable: </span><span><strong><code>org-roam-dailies-capture-templates</code></strong><a href='#index-org_002droam_002ddailies_002dcapture_002dtemplates' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Capture templates for daily-notes in Org-roam.
|
||
</p></dd></dl>
|
||
|
||
<p>Here is a sane default configuration:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-dailies-directory "daily/")
|
||
|
||
(setq org-roam-dailies-capture-templates
|
||
'(("d" "default" entry
|
||
"* %?"
|
||
:target (file+head "%<%Y-%m-%d>.org"
|
||
"#+title: %<%Y-%m-%d>\n"))))
|
||
</pre></div>
|
||
|
||
<p>See <a href="#The-Templating-System">The Templating System</a> for creating new templates.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="subsection" id="Usage">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Configuration" accesskey="p" rel="prev">Configuration</a>, Up: <a href="#org_002droam_002ddailies" accesskey="u" rel="up">org-roam-dailies</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Usage-1"></span><h4 class="subsection">13.3.2 Usage</h4>
|
||
|
||
<p><code>org-roam-dailies</code> provides these interactive functions:
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002dcapture_002dtoday"><span class="category">Function: </span><span><strong><code>org-roam-dailies-capture-today</code></strong> <em>&optional goto</em><a href='#index-org_002droam_002ddailies_002dcapture_002dtoday' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Create an entry in the daily note for today.
|
||
</p>
|
||
<p>When <code>goto</code> is non-nil, go to the note without creating an entry.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002dgoto_002dtoday"><span class="category">Function: </span><span><strong><code>org-roam-dailies-goto-today</code></strong><a href='#index-org_002droam_002ddailies_002dgoto_002dtoday' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Find the daily note for today, creating it if necessary.
|
||
</p></dd></dl>
|
||
|
||
<p>There are variants of those commands for <code>-yesterday</code> and <code>-tomorrow</code>:
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002dcapture_002dyesterday"><span class="category">Function: </span><span><strong><code>org-roam-dailies-capture-yesterday</code></strong> <em>n &optional goto</em><a href='#index-org_002droam_002ddailies_002dcapture_002dyesterday' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Create an entry in the daily note for yesterday.
|
||
</p>
|
||
<p>With numeric argument <code>n</code>, use the daily note <code>n</code> days in the past.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002dgoto_002dyesterday"><span class="category">Function: </span><span><strong><code>org-roam-dailies-goto-yesterday</code></strong><a href='#index-org_002droam_002ddailies_002dgoto_002dyesterday' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>With numeric argument N, use the daily-note N days in the future.
|
||
</p></dd></dl>
|
||
|
||
<p>There are also commands which allow you to use Emacs’s <code>calendar</code> to find the date
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002dcapture_002ddate"><span class="category">Function: </span><span><strong><code>org-roam-dailies-capture-date</code></strong><a href='#index-org_002droam_002ddailies_002dcapture_002ddate' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Create an entry in the daily note for a date using the calendar.
|
||
</p>
|
||
<p>Prefer past dates, unless <code>prefer-future</code> is non-nil.
|
||
</p>
|
||
<p>With a ’C-u’ prefix or when <code>goto</code> is non-nil, go the note without
|
||
creating an entry.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002dgoto_002ddate"><span class="category">Function: </span><span><strong><code>org-roam-dailies-goto-date</code></strong><a href='#index-org_002droam_002ddailies_002dgoto_002ddate' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Find the daily note for a date using the calendar, creating it if necessary.
|
||
</p>
|
||
<p>Prefer past dates, unless <code>prefer-future</code> is non-nil.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002dfind_002ddirectory"><span class="category">Function: </span><span><strong><code>org-roam-dailies-find-directory</code></strong><a href='#index-org_002droam_002ddailies_002dfind_002ddirectory' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Find and open <code>org-roam-dailies-directory</code>.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002dgoto_002dprevious_002dnote"><span class="category">Function: </span><span><strong><code>org-roam-dailies-goto-previous-note</code></strong><a href='#index-org_002droam_002ddailies_002dgoto_002dprevious_002dnote' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>When in an daily-note, find the previous one.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002ddailies_002dgoto_002dnext_002dnote"><span class="category">Function: </span><span><strong><code>org-roam-dailies-goto-next-note</code></strong><a href='#index-org_002droam_002ddailies_002dgoto_002dnext_002dnote' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>When in an daily-note, find the next one.
|
||
</p></dd></dl>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="org_002droam_002dexport">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#org_002droam_002ddailies" accesskey="p" rel="prev">org-roam-dailies</a>, Up: <a href="#Extensions" accesskey="u" rel="up">Extensions</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="org_002droam_002dexport-1"></span><h3 class="section">13.4 org-roam-export</h3>
|
||
|
||
<p>Because Org-roam files are plain org files, they can be exported easily using
|
||
<code>org-export</code> to a variety of formats, including <code>html</code> and <code>pdf</code>. However,
|
||
Org-roam relies heavily on ID links, which Org’s html export has poor support
|
||
of. To fix this, Org-roam provides a bunch of overrides to better support
|
||
export. To use them, simply run:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(require 'org-roam-export)
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="Performance-Optimization">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#The-Org_002dmode-Ecosystem" accesskey="n" rel="next">The Org-mode Ecosystem</a>, Previous: <a href="#Extensions" accesskey="p" rel="prev">Extensions</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Performance-Optimization-1"></span><h2 class="chapter">14 Performance Optimization</h2>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Garbage-Collection" accesskey="1">Garbage Collection</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="Garbage-Collection">
|
||
<div class="header">
|
||
<p>
|
||
Up: <a href="#Performance-Optimization" accesskey="u" rel="up">Performance Optimization</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Garbage-Collection-1"></span><h3 class="section">14.1 Garbage Collection</h3>
|
||
|
||
<p>During the cache-build process, Org-roam generates a lot of in-memory
|
||
data-structures (such as the Org file’s AST), which are discarded after use.
|
||
These structures are garbage collected at regular intervals (see <a data-manual="elisp" href="https://www.gnu.org/software/emacs/manual/html_mono/elisp.html#Garbage-Collection">(elisp)info:elisp#Garbage Collection</a>).
|
||
</p>
|
||
<p>Org-roam provides the option <code>org-roam-db-gc-threshold</code> to temporarily change
|
||
the threshold value for GC to be triggered during these memory-intensive
|
||
operations. To reduce the number of garbage collection processes, one may set
|
||
<code>org-roam-db-gc-threshold</code> to a high value (such as <code>most-positive-fixnum</code>):
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(setq org-roam-db-gc-threshold most-positive-fixnum)
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="The-Org_002dmode-Ecosystem">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#FAQ" accesskey="n" rel="next">FAQ</a>, Previous: <a href="#Performance-Optimization" accesskey="p" rel="prev">Performance Optimization</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="The-Org_002dmode-Ecosystem-1"></span><h2 class="chapter">15 The Org-mode Ecosystem</h2>
|
||
|
||
<p>Because Org-roam is built on top of Org-mode, it benefits from the vast number
|
||
of packages already available.
|
||
</p>
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Browsing-History-with-winner_002dmode" accesskey="1">Browsing History with winner-mode</a></li>
|
||
<li><a href="#Versioning-Notes" accesskey="2">Versioning Notes</a></li>
|
||
<li><a href="#Full_002dtext-search-with-Deft" accesskey="3">Full-text search with Deft</a></li>
|
||
<li><a href="#Org_002djournal" accesskey="4">Org-journal</a></li>
|
||
<li><a href="#Org_002ddownload" accesskey="5">Org-download</a></li>
|
||
<li><a href="#mathpixel" accesskey="6">mathpix.el</a></li>
|
||
<li><a href="#Org_002dnoter-_002f-Interleave" accesskey="7">Org-noter / Interleave</a></li>
|
||
<li><a href="#Bibliography" accesskey="8">Bibliography</a></li>
|
||
<li><a href="#Spaced-Repetition" accesskey="9">Spaced Repetition</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="Browsing-History-with-winner_002dmode">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Versioning-Notes" accesskey="n" rel="next">Versioning Notes</a>, Up: <a href="#The-Org_002dmode-Ecosystem" accesskey="u" rel="up">The Org-mode Ecosystem</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Browsing-History-with-winner_002dmode-1"></span><h3 class="section">15.1 Browsing History with winner-mode</h3>
|
||
|
||
<p><code>winner-mode</code> is a global minor mode that allows one to undo and redo changes in
|
||
the window configuration. It is included with GNU Emacs since version 20.
|
||
</p>
|
||
<p><code>winner-mode</code> can be used as a simple version of browser history for Org-roam.
|
||
Each click through org-roam links (from both Org files and the backlinks buffer)
|
||
causes changes in window configuration, which can be undone and redone using
|
||
<code>winner-mode</code>. To use <code>winner-mode</code>, simply enable it, and bind the appropriate
|
||
interactive functions:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(winner-mode +1)
|
||
(define-key winner-mode-map (kbd "<M-left>") #'winner-undo)
|
||
(define-key winner-mode-map (kbd "<M-right>") #'winner-redo)
|
||
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Versioning-Notes">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Full_002dtext-search-with-Deft" accesskey="n" rel="next">Full-text search with Deft</a>, Previous: <a href="#Browsing-History-with-winner_002dmode" accesskey="p" rel="prev">Browsing History with winner-mode</a>, Up: <a href="#The-Org_002dmode-Ecosystem" accesskey="u" rel="up">The Org-mode Ecosystem</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Versioning-Notes-1"></span><h3 class="section">15.2 Versioning Notes</h3>
|
||
|
||
<p>Since Org-roam notes are just plain text, it is trivial to track changes in your
|
||
notes database using version control systems such as <a href="https://git-scm.com/">Git</a>. Simply initialize
|
||
<code>org-roam-directory</code> as a Git repository, and commit your files at regular or
|
||
appropriate intervals. <a href="https://magit.vc/">Magit</a> is a great interface to Git within Emacs.
|
||
</p>
|
||
<p>In addition, it may be useful to observe how a particular note has evolved, by
|
||
looking at the file history. <a href="https://gitlab.com/pidu/git-timemachine">Git-timemachine</a> allows you to visit historic
|
||
versions of a tracked Org-roam note.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Full_002dtext-search-with-Deft">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Org_002djournal" accesskey="n" rel="next">Org-journal</a>, Previous: <a href="#Versioning-Notes" accesskey="p" rel="prev">Versioning Notes</a>, Up: <a href="#The-Org_002dmode-Ecosystem" accesskey="u" rel="up">The Org-mode Ecosystem</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Full_002dtext-search-with-Deft-1"></span><h3 class="section">15.3 Full-text search with Deft</h3>
|
||
|
||
<p><a href="https://jblevins.org/projects/deft/">Deft</a> provides a nice interface for browsing and filtering org-roam notes.
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(use-package deft
|
||
:after org
|
||
:bind
|
||
("C-c n d" . deft)
|
||
:custom
|
||
(deft-recursive t)
|
||
(deft-use-filter-string-for-filename t)
|
||
(deft-default-extension "org")
|
||
(deft-directory org-roam-directory))
|
||
</pre></div>
|
||
|
||
<p>The Deft interface can slow down quickly when the number of files get huge.
|
||
<a href="https://github.com/hasu/notdeft">Notdeft</a> is a fork of Deft that uses an external search engine and indexer.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Org_002djournal">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Org_002ddownload" accesskey="n" rel="next">Org-download</a>, Previous: <a href="#Full_002dtext-search-with-Deft" accesskey="p" rel="prev">Full-text search with Deft</a>, Up: <a href="#The-Org_002dmode-Ecosystem" accesskey="u" rel="up">The Org-mode Ecosystem</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Org_002djournal-1"></span><h3 class="section">15.4 Org-journal</h3>
|
||
|
||
<p><a href="https://github.com/bastibe/org-journal">Org-journal</a> provides journaling capabilities to Org-mode. A lot of its
|
||
functionalities have been incorporated into Org-roam under the name
|
||
<a href="#org_002droam_002ddailies"><code>org-roam-dailies</code></a>. It remains a good tool if you want to isolate your verbose
|
||
journal entries from the ideas you would write on a scratchpad.
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(use-package org-journal
|
||
:bind
|
||
("C-c n j" . org-journal-new-entry)
|
||
:custom
|
||
(org-journal-date-prefix "#+title: ")
|
||
(org-journal-file-format "%Y-%m-%d.org")
|
||
(org-journal-dir "/path/to/journal/files/")
|
||
(org-journal-date-format "%A, %d %B %Y"))
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Org_002ddownload">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#mathpixel" accesskey="n" rel="next">mathpix.el</a>, Previous: <a href="#Org_002djournal" accesskey="p" rel="prev">Org-journal</a>, Up: <a href="#The-Org_002dmode-Ecosystem" accesskey="u" rel="up">The Org-mode Ecosystem</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Org_002ddownload-1"></span><h3 class="section">15.5 Org-download</h3>
|
||
|
||
<p><a href="https://github.com/abo-abo/org-download">Org-download</a> lets you screenshot and yank images from the web into your notes:
|
||
</p>
|
||
<div class="float">
|
||
<img src="images/org-download.gif" alt="images/org-download">
|
||
|
||
<div class="float-caption"><p><strong>Figure: </strong>org-download</p></div></div>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(use-package org-download
|
||
:after org
|
||
:bind
|
||
(:map org-mode-map
|
||
(("s-Y" . org-download-screenshot)
|
||
("s-y" . org-download-yank))))
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="mathpixel">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Org_002dnoter-_002f-Interleave" accesskey="n" rel="next">Org-noter / Interleave</a>, Previous: <a href="#Org_002ddownload" accesskey="p" rel="prev">Org-download</a>, Up: <a href="#The-Org_002dmode-Ecosystem" accesskey="u" rel="up">The Org-mode Ecosystem</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="mathpix_002eel"></span><h3 class="section">15.6 mathpix.el</h3>
|
||
|
||
<p><a href="https://github.com/jethrokuan/mathpix.el">mathpix.el</a> uses <a href="https://mathpix.com/">Mathpix’s</a> API to convert clips into latex equations:
|
||
</p>
|
||
<div class="float">
|
||
<img src="images/mathpix.gif" alt="images/mathpix">
|
||
|
||
<div class="float-caption"><p><strong>Figure: </strong>mathpix</p></div></div>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(use-package mathpix.el
|
||
:straight (:host github :repo "jethrokuan/mathpix.el")
|
||
:custom ((mathpix-app-id "app-id")
|
||
(mathpix-app-key "app-key"))
|
||
:bind
|
||
("C-x m" . mathpix-screenshot))
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Org_002dnoter-_002f-Interleave">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Bibliography" accesskey="n" rel="next">Bibliography</a>, Previous: <a href="#mathpixel" accesskey="p" rel="prev">mathpix.el</a>, Up: <a href="#The-Org_002dmode-Ecosystem" accesskey="u" rel="up">The Org-mode Ecosystem</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Org_002dnoter-_002f-Interleave-1"></span><h3 class="section">15.7 Org-noter / Interleave</h3>
|
||
|
||
<p><a href="https://github.com/weirdNox/org-noter">Org-noter</a> and <a href="https://github.com/rudolfochrist/interleave">Interleave</a> are both projects that allow synchronised annotation of
|
||
documents (PDF, EPUB etc.) within Org-mode.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Bibliography">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Spaced-Repetition" accesskey="n" rel="next">Spaced Repetition</a>, Previous: <a href="#Org_002dnoter-_002f-Interleave" accesskey="p" rel="prev">Org-noter / Interleave</a>, Up: <a href="#The-Org_002dmode-Ecosystem" accesskey="u" rel="up">The Org-mode Ecosystem</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Bibliography-1"></span><h3 class="section">15.8 Bibliography</h3>
|
||
|
||
<p>Org 9.5 added native citation and bibliography functionality, called “org-cite”,
|
||
which org-roam supports.
|
||
</p>
|
||
<p><a href="https://github.com/org-roam/org-roam-bibtex">org-roam-bibtex</a> offers tight integration between <a href="https://github.com/jkitchin/org-ref">org-ref</a>, <a href="https://github.com/tmalsburg/helm-bibtex">helm-bibtex</a> and
|
||
<code>org-roam</code>. This helps you manage your bibliographic notes under <code>org-roam</code>.
|
||
</p>
|
||
<p>For example, though helm-bibtex provides the ability to visit notes for
|
||
bibliographic entries, org-roam-bibtex extends it with the ability to visit the
|
||
file with the right <code>ROAM_REFS</code>.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Spaced-Repetition">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Bibliography" accesskey="p" rel="prev">Bibliography</a>, Up: <a href="#The-Org_002dmode-Ecosystem" accesskey="u" rel="up">The Org-mode Ecosystem</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Spaced-Repetition-1"></span><h3 class="section">15.9 Spaced Repetition</h3>
|
||
|
||
<p><a href="https://www.leonrische.me/fc/index.html">Org-fc</a> is a spaced repetition system that scales well with a large number of
|
||
files. Other alternatives include <a href="https://orgmode.org/worg/org-contrib/org-drill.html">org-drill</a>, and <a href="https://github.com/abo-abo/pamparam">pamparam</a>.
|
||
</p>
|
||
<p>To use Anki for spaced repetition, <a href="https://github.com/louietan/anki-editor">anki-editor</a> allows you to write your cards in
|
||
Org-mode, and sync your cards to Anki via <a href="https://github.com/FooSoft/anki-connect#installation">anki-connect</a>.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="FAQ">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Developer_0027s-Guide-to-Org_002droam" accesskey="n" rel="next">Developer’s Guide to Org-roam</a>, Previous: <a href="#The-Org_002dmode-Ecosystem" accesskey="p" rel="prev">The Org-mode Ecosystem</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="FAQ-1"></span><h2 class="chapter">16 FAQ</h2>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#How-do-I-have-more-than-one-Org_002droam-directory_003f" accesskey="1">How do I have more than one Org-roam directory?</a></li>
|
||
<li><a href="#How-do-I-create-a-note-whose-title-already-matches-one-of-the-candidates_003f" accesskey="2">How do I create a note whose title already matches one of the candidates?</a></li>
|
||
<li><a href="#How-can-I-stop-Org_002droam-from-creating-IDs-everywhere_003f" accesskey="3">How can I stop Org-roam from creating IDs everywhere?</a></li>
|
||
<li><a href="#How-do-I-migrate-from-Roam-Research_003f" accesskey="4">How do I migrate from Roam Research?</a></li>
|
||
<li><a href="#How-to-migrate-from-Org_002droam-v1_003f" accesskey="5">How to migrate from Org-roam v1?</a></li>
|
||
<li><a href="#How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f" accesskey="6">How do I publish my notes with an Internet-friendly graph?</a></li>
|
||
<li><a href="#I_0027m-seeing-this-_0060_0060Selecting-deleted-buffer_0027_0027-error-What-do-I-do_003f" accesskey="7">I’m seeing this “Selecting deleted buffer” error. What do I do?</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="How-do-I-have-more-than-one-Org_002droam-directory_003f">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#How-do-I-create-a-note-whose-title-already-matches-one-of-the-candidates_003f" accesskey="n" rel="next">How do I create a note whose title already matches one of the candidates?</a>, Up: <a href="#FAQ" accesskey="u" rel="up">FAQ</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="How-do-I-have-more-than-one-Org_002droam-directory_003f-1"></span><h3 class="section">16.1 How do I have more than one Org-roam directory?</h3>
|
||
|
||
<p>Emacs supports directory-local variables, allowing the value of
|
||
<code>org-roam-directory</code> to be different in different directories. It does this by
|
||
checking for a file named <code>.dir-locals.el</code>.
|
||
</p>
|
||
<p>To add support for multiple directories, override the <code>org-roam-directory</code>
|
||
variable using directory-local variables. This is what <code>.dir-locals.el</code> may
|
||
contain:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">((nil . ((org-roam-directory . "/path/to/alt/org-roam-dir")
|
||
(org-roam-db-location . "/path/to/alt/org-roam-dir/org-roam.db"))))
|
||
</pre></div>
|
||
|
||
<p>Note <code>org-roam-directory</code> and <code>org-roam-db-location</code> should be an absolute path, not relative.
|
||
</p>
|
||
<p>Alternatively, use <code>eval</code> if you wish to call functions:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">((nil . ((eval . (setq-local
|
||
org-roam-directory (expand-file-name (locate-dominating-file
|
||
default-directory ".dir-locals.el"))))
|
||
(eval . (setq-local
|
||
org-roam-db-location (expand-file-name "org-roam.db"
|
||
org-roam-directory))))))
|
||
</pre></div>
|
||
|
||
<p>All files within that directory will be treated as their own separate set of
|
||
Org-roam files. Remember to run <code>org-roam-db-sync</code> from a file within
|
||
that directory, at least once.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="How-do-I-create-a-note-whose-title-already-matches-one-of-the-candidates_003f">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#How-can-I-stop-Org_002droam-from-creating-IDs-everywhere_003f" accesskey="n" rel="next">How can I stop Org-roam from creating IDs everywhere?</a>, Previous: <a href="#How-do-I-have-more-than-one-Org_002droam-directory_003f" accesskey="p" rel="prev">How do I have more than one Org-roam directory?</a>, Up: <a href="#FAQ" accesskey="u" rel="up">FAQ</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="How-do-I-create-a-note-whose-title-already-matches-one-of-the-candidates_003f-1"></span><h3 class="section">16.2 How do I create a note whose title already matches one of the candidates?</h3>
|
||
|
||
<p>This situation arises when, for example, one would like to create a note titled
|
||
“bar” when “barricade” already exists.
|
||
</p>
|
||
<p>The solution is dependent on the mini-buffer completion framework in use. Here
|
||
are the solutions:
|
||
</p>
|
||
<ul>
|
||
<li> Ivycall <code>ivy-immediate-done</code>, typically bound to <code>C-M-j</code>. Alternatively,
|
||
set <code>ivy-use-selectable-prompt</code> to <code>t</code>, so that “bar” is now selectable.
|
||
|
||
</li><li> HelmOrg-roam should provide a selectable “[?] bar” candidate at the top of
|
||
the candidate list.
|
||
</li></ul>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="How-can-I-stop-Org_002droam-from-creating-IDs-everywhere_003f">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#How-do-I-migrate-from-Roam-Research_003f" accesskey="n" rel="next">How do I migrate from Roam Research?</a>, Previous: <a href="#How-do-I-create-a-note-whose-title-already-matches-one-of-the-candidates_003f" accesskey="p" rel="prev">How do I create a note whose title already matches one of the candidates?</a>, Up: <a href="#FAQ" accesskey="u" rel="up">FAQ</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="How-can-I-stop-Org_002droam-from-creating-IDs-everywhere_003f-1"></span><h3 class="section">16.3 How can I stop Org-roam from creating IDs everywhere?</h3>
|
||
|
||
<p>Other than the interactive commands that Org-roam provides, Org-roam does not
|
||
create IDs everywhere. If you are noticing that IDs are being created even when
|
||
you don’t want them to be (e.g. when tangling an Org file), check the value you
|
||
have set for <code>org-id-link-to-org-use-id</code>: setting it to <code>'create-if-interactive</code>
|
||
is a popular option.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="How-do-I-migrate-from-Roam-Research_003f">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#How-to-migrate-from-Org_002droam-v1_003f" accesskey="n" rel="next">How to migrate from Org-roam v1?</a>, Previous: <a href="#How-can-I-stop-Org_002droam-from-creating-IDs-everywhere_003f" accesskey="p" rel="prev">How can I stop Org-roam from creating IDs everywhere?</a>, Up: <a href="#FAQ" accesskey="u" rel="up">FAQ</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="How-do-I-migrate-from-Roam-Research_003f-1"></span><h3 class="section">16.4 How do I migrate from Roam Research?</h3>
|
||
|
||
<p>Fabio has produced a command-line tool that converts markdown files exported
|
||
from Roam Research into Org-roam compatible markdown. More instructions are
|
||
provided <a href="https://github.com/fabioberger/roam-migration">in the repository</a>.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="How-to-migrate-from-Org_002droam-v1_003f">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f" accesskey="n" rel="next">How do I publish my notes with an Internet-friendly graph?</a>, Previous: <a href="#How-do-I-migrate-from-Roam-Research_003f" accesskey="p" rel="prev">How do I migrate from Roam Research?</a>, Up: <a href="#FAQ" accesskey="u" rel="up">FAQ</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="How-to-migrate-from-Org_002droam-v1_003f-1"></span><h3 class="section">16.5 How to migrate from Org-roam v1?</h3>
|
||
|
||
<p>Those coming from Org-roam v1 will do well treating v2 as entirely new software.
|
||
V2 has a smaller core and fewer moving parts, while retaining the bulk of its
|
||
functionality. It is recommended to read the documentation above about nodes.
|
||
</p>
|
||
<p>It is still desirable to migrate notes collected in v1 to v2.
|
||
To migrate your v1 notes to v2, use ‘<samp>M-x org-roam-migrate-wizard</samp>’.
|
||
<a href="https://d12frosted.io/posts/2021-06-11-path-to-org-roam-v2.html">This blog post</a>
|
||
provides a good overview of what’s new in v2 and how to migrate.
|
||
</p>
|
||
<p>Essentially, to migrate notes from v1 to v2, one must:
|
||
</p>
|
||
<ul>
|
||
<li> Add IDs to all existing notes.
|
||
These are located in top-level property drawers
|
||
(Although note that in v2, not all files need to have IDs).
|
||
|
||
</li><li> Update the Org-roam database to conform to the new schema.
|
||
|
||
</li><li> Replace <code>#+ROAM_KEY</code> into the <code>ROAM_REFS</code> property
|
||
|
||
</li><li> Replace <code>#+ROAM_ALIAS</code> into the <code>ROAM_ALIASES</code> property
|
||
|
||
</li><li> Move <code>#+ROAM_TAGS</code> into the <code>#+FILETAGS</code> property for file-level nodes,
|
||
and the <code>ROAM_TAGS</code> property for headline nodes
|
||
|
||
</li><li> Replace existing file links with ID links.
|
||
</li></ul>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#I_0027m-seeing-this-_0060_0060Selecting-deleted-buffer_0027_0027-error-What-do-I-do_003f" accesskey="n" rel="next">I’m seeing this “Selecting deleted buffer” error. What do I do?</a>, Previous: <a href="#How-to-migrate-from-Org_002droam-v1_003f" accesskey="p" rel="prev">How to migrate from Org-roam v1?</a>, Up: <a href="#FAQ" accesskey="u" rel="up">FAQ</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f-1"></span><h3 class="section">16.6 How do I publish my notes with an Internet-friendly graph?</h3>
|
||
|
||
<p>The default graph builder creates a graph with an <a href="https://orgmode.org/worg/org-contrib/org-protocol.html">org-protocol</a>
|
||
handler which is convenient when you’re working locally but
|
||
inconvenient when you want to publish your notes for remote access.
|
||
Likewise, it defaults to displaying the graph in Emacs which has the
|
||
exact same caveats. This problem is solvable in the following way
|
||
using org-mode’s native <a href="https://orgmode.org/manual/Publishing.html">publishing</a> capability:
|
||
</p>
|
||
<ul>
|
||
<li> configure org-mode to publish your org-roam notes as a project.
|
||
|
||
</li><li> create a function that overrides the default org-protocol link
|
||
creation function(‘<samp>org-roam-default-link-builder</samp>’).
|
||
|
||
</li><li> create a hook that’s called at the end of graph creation to copy
|
||
the generated graph to the appropriate place.
|
||
</li></ul>
|
||
|
||
<p>The example code below is used to publish to a local directory where a
|
||
separate shell script copies the files to the remote site.
|
||
</p>
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Configure-org_002dmode-for-publishing" accesskey="1">Configure org-mode for publishing</a></li>
|
||
<li><a href="#Overriding-the-default-link-creation-function" accesskey="2">Overriding the default link creation function</a></li>
|
||
<li><a href="#Copying-the-generated-file-to-the-export-directory" accesskey="3">Copying the generated file to the export directory</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="subsection" id="Configure-org_002dmode-for-publishing">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Overriding-the-default-link-creation-function" accesskey="n" rel="next">Overriding the default link creation function</a>, Up: <a href="#How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f" accesskey="u" rel="up">How do I publish my notes with an Internet-friendly graph?</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Configure-org_002dmode-for-publishing-1"></span><h4 class="subsection">16.6.1 Configure org-mode for publishing</h4>
|
||
|
||
<p>This has two steps:
|
||
</p><ul>
|
||
<li> Setting of a <em>roam</em> project that publishes your notes.
|
||
|
||
</li><li> Configuring the <em>sitemap.html</em> generation.
|
||
|
||
</li><li> Setting up ‘<samp>org-publish</samp>’ to generate the graph.
|
||
</li></ul>
|
||
|
||
<p>This will require code like the following:
|
||
</p><div class="example lisp">
|
||
<pre class="lisp">(defun roam-sitemap (title list)
|
||
(concat "#+OPTIONS: ^:nil author:nil html-postamble:nil\n"
|
||
"#+SETUPFILE: ./simple_inline.theme\n"
|
||
"#+TITLE: " title "\n\n"
|
||
(org-list-to-org list) "\nfile:sitemap.svg"))
|
||
|
||
(setq my-publish-time 0) ; see the next section for context
|
||
(defun roam-publication-wrapper (plist filename pubdir)
|
||
(org-roam-graph)
|
||
(org-html-publish-to-html plist filename pubdir)
|
||
(setq my-publish-time (cadr (current-time))))
|
||
|
||
(setq org-publish-project-alist
|
||
'(("roam"
|
||
:base-directory "~/roam"
|
||
:auto-sitemap t
|
||
:sitemap-function roam-sitemap
|
||
:sitemap-title "Roam notes"
|
||
:publishing-function roam-publication-wrapper
|
||
:publishing-directory "~/roam-export"
|
||
:section-number nil
|
||
:table-of-contents nil
|
||
:style "<link rel=\"stylesheet\" href=\"../other/mystyle.cs\" type=\"text/css\">")))
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="subsection" id="Overriding-the-default-link-creation-function">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Copying-the-generated-file-to-the-export-directory" accesskey="n" rel="next">Copying the generated file to the export directory</a>, Previous: <a href="#Configure-org_002dmode-for-publishing" accesskey="p" rel="prev">Configure org-mode for publishing</a>, Up: <a href="#How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f" accesskey="u" rel="up">How do I publish my notes with an Internet-friendly graph?</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Overriding-the-default-link-creation-function-1"></span><h4 class="subsection">16.6.2 Overriding the default link creation function</h4>
|
||
|
||
<p>The code below will generate a link to the generated html file instead
|
||
of the default org-protocol link.
|
||
</p><div class="example lisp">
|
||
<pre class="lisp">(defun org-roam-custom-link-builder (node)
|
||
(let ((file (org-roam-node-file node)))
|
||
(concat (file-name-base file) ".html")))
|
||
|
||
(setq org-roam-graph-link-builder 'org-roam-custom-link-builder)
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="subsection" id="Copying-the-generated-file-to-the-export-directory">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Overriding-the-default-link-creation-function" accesskey="p" rel="prev">Overriding the default link creation function</a>, Up: <a href="#How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f" accesskey="u" rel="up">How do I publish my notes with an Internet-friendly graph?</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Copying-the-generated-file-to-the-export-directory-1"></span><h4 class="subsection">16.6.3 Copying the generated file to the export directory</h4>
|
||
|
||
<p>The default behavior of ‘<samp>org-roam-graph</samp>’ is to generate the graph and
|
||
display it in Emacs. There is an ‘<samp>org-roam-graph-generation-hook</samp>’
|
||
available that provides access to the file names so they can be copied
|
||
to the publishing directory. Example code follows:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(add-hook 'org-roam-graph-generation-hook
|
||
(lambda (dot svg) (if (< (- (cadr (current-time)) my-publish-time) 5)
|
||
(progn (copy-file svg "~/roam-export/sitemap.svg" 't)
|
||
(kill-buffer (file-name-nondirectory svg))
|
||
(setq my-publish-time 0)))))
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="I_0027m-seeing-this-_0060_0060Selecting-deleted-buffer_0027_0027-error-What-do-I-do_003f">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#How-do-I-publish-my-notes-with-an-Internet_002dfriendly-graph_003f" accesskey="p" rel="prev">How do I publish my notes with an Internet-friendly graph?</a>, Up: <a href="#FAQ" accesskey="u" rel="up">FAQ</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="I_0027m-seeing-this-_0060_0060Selecting-deleted-buffer_0027_0027-error_002e-What-do-I-do_003f"></span><h3 class="section">16.7 I’m seeing this “Selecting deleted buffer” error. What do I do?</h3>
|
||
|
||
<p>The “selecting deleted buffer” error usually occurs when you don’t have a
|
||
working <code>emacsql-sqlite</code> executable. Org-roam relies on this executable to
|
||
function properly, and doesn’t catch this error. This issue is most commonly
|
||
seen on Windows setups. You can browse through the various GitHub issues posted
|
||
about this <a href="https://github.com/org-roam/org-roam/issues?q=is%3Aissue+selecting+deleted">here</a>.
|
||
</p>
|
||
<p>To fix this, you can try the following:
|
||
</p>
|
||
<ul>
|
||
<li> If on Windows, try replacing your system binary with <a href="https://github.com/nobiot/emacsql-sqlite.exe">this one</a> that has been proven
|
||
to work
|
||
|
||
</li><li> Use the <code>emacsql-sqlite3</code> option rather than compiling your own emacsql
|
||
binary (see <a href="#How-to-cache">How to cache</a>).
|
||
</li></ul>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="Developer_0027s-Guide-to-Org_002droam">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Appendix" accesskey="n" rel="next">Appendix</a>, Previous: <a href="#FAQ" accesskey="p" rel="prev">FAQ</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Developer_0027s-Guide-to-Org_002droam-1"></span><h2 class="chapter">17 Developer’s Guide to Org-roam</h2>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Org_002droam_0027s-Design-Principle" accesskey="1">Org-roam’s Design Principle</a></li>
|
||
<li><a href="#Building-Extensions-and-Advanced-Customization-of-Org_002droam" accesskey="2">Building Extensions and Advanced Customization of Org-roam</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="Org_002droam_0027s-Design-Principle">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Building-Extensions-and-Advanced-Customization-of-Org_002droam" accesskey="n" rel="next">Building Extensions and Advanced Customization of Org-roam</a>, Up: <a href="#Developer_0027s-Guide-to-Org_002droam" accesskey="u" rel="up">Developer’s Guide to Org-roam</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Org_002droam_0027s-Design-Principle-1"></span><h3 class="section">17.1 Org-roam’s Design Principle</h3>
|
||
|
||
<p>Org-roam is primarily motivated by the need for a dual representation. We
|
||
(humans) love operating in a plain-text environment. The syntax rules of
|
||
Org-mode are simple and fit snugly within our brain. This also allows us to use
|
||
the tools and packages we love to explore and edit our notes. Org-mode is simply
|
||
the most powerful plain-text format available, with support for images, LaTeX,
|
||
TODO planning and much more.
|
||
</p>
|
||
<p>But this plain-text format is simply ill-suited for exploration of these notes:
|
||
plain-text is simply not amenable for answering large-scale, complex queries
|
||
(e.g. how many tasks do I have that are due by next week?). Interfaces such as
|
||
Org-agenda slow to a crawl when the number of files becomes unwieldy, which can
|
||
quickly become the case.
|
||
</p>
|
||
<p>At its core, Org-roam provides a database abstraction layer, providing a dual
|
||
representation of what’s already available in plain-text. This allows us
|
||
(humans) to continue working with plain-text, while programs can utilize the
|
||
database layer to perform complex queries. These capabilities include, but are
|
||
not limited to:
|
||
</p>
|
||
<ul>
|
||
<li> link graph traversal and visualization
|
||
|
||
</li><li> Instantaneous SQL-like queries on headlines
|
||
<ul>
|
||
<li> What are my TODOs, scheduled for X, or due by Y?
|
||
</li></ul>
|
||
|
||
</li><li> Accessing the properties of a node, such as its tags, refs, TODO state or
|
||
priority
|
||
</li></ul>
|
||
|
||
<p>All of these functionality is powered by this database abstraction layer. Hence,
|
||
at its core Org-roam’s primary goal is to provide a resilient dual
|
||
representation that is cheap to maintain, easy to understand, and is as
|
||
up-to-date as it possibly can. Org-roam also then exposes an API to this
|
||
database abstraction layer for users who would like to perform programmatic
|
||
queries on their Org files.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Building-Extensions-and-Advanced-Customization-of-Org_002droam">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Org_002droam_0027s-Design-Principle" accesskey="p" rel="prev">Org-roam’s Design Principle</a>, Up: <a href="#Developer_0027s-Guide-to-Org_002droam" accesskey="u" rel="up">Developer’s Guide to Org-roam</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Building-Extensions-and-Advanced-Customization-of-Org_002droam-1"></span><h3 class="section">17.2 Building Extensions and Advanced Customization of Org-roam</h3>
|
||
|
||
<p>Because Org-roam’s core functionality is small, it is possible and sometimes
|
||
desirable to build extensions on top of it. These extensions may use one or more of
|
||
the following functionalities:
|
||
</p>
|
||
<ul>
|
||
<li> Access to Org-roam’s database
|
||
|
||
</li><li> Usage/modification of Org-roam’s interactive commands
|
||
</li></ul>
|
||
|
||
<p>Org-roam provides no guarantees that extensions will continue to function as
|
||
Org-roam evolves, but by following these simple rules, extensions can be made
|
||
robust to local changes in Org-roam.
|
||
</p>
|
||
<ul>
|
||
<li> Extensions should not modify the database schema. Any extension that requires
|
||
the caching of additional data should make a request upstream to Org-roam.
|
||
|
||
</li><li> Extensions requiring access to the database should explicitly state support
|
||
for the database version (<code>org-roam-db-version</code>), and only conditionally
|
||
load when support is available.
|
||
</li></ul>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Accessing-the-Database" accesskey="1">Accessing the Database</a></li>
|
||
<li><a href="#Accessing-and-Modifying-Nodes" accesskey="2">Accessing and Modifying Nodes</a></li>
|
||
<li><a href="#Extending-the-Capture-System" accesskey="3">Extending the Capture System</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="subsection" id="Accessing-the-Database">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Accessing-and-Modifying-Nodes" accesskey="n" rel="next">Accessing and Modifying Nodes</a>, Up: <a href="#Building-Extensions-and-Advanced-Customization-of-Org_002droam" accesskey="u" rel="up">Building Extensions and Advanced Customization of Org-roam</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Accessing-the-Database-1"></span><h4 class="subsection">17.2.1 Accessing the Database</h4>
|
||
|
||
<p>Access to the database is provided singularly by <code>org-roam-db-query</code>, for
|
||
example:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(org-roam-db-query [:select * :from nodes])
|
||
</pre></div>
|
||
|
||
<p>One can refer to the database schema by looking up
|
||
<code>org-roam-db--table-schemata</code>. There are multiple helper functions within
|
||
Org-roam that call <code>org-roam-db-query</code>, these are subject to change. To ensure
|
||
that extensions/customizations are robust to change, extensions should only use
|
||
<code>org-roam-db-query</code>, and perhaps replicate the SQL query if necessary.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="subsection" id="Accessing-and-Modifying-Nodes">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Extending-the-Capture-System" accesskey="n" rel="next">Extending the Capture System</a>, Previous: <a href="#Accessing-the-Database" accesskey="p" rel="prev">Accessing the Database</a>, Up: <a href="#Building-Extensions-and-Advanced-Customization-of-Org_002droam" accesskey="u" rel="up">Building Extensions and Advanced Customization of Org-roam</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Accessing-and-Modifying-Nodes-1"></span><h4 class="subsection">17.2.2 Accessing and Modifying Nodes</h4>
|
||
|
||
<p>The node interface is cleanly defined using <code>cl-defstruct</code>. The primary
|
||
method to access nodes is <code>org-roam-node-at-point</code> and <code>org-roam-node-read</code>:
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dnode_002dat_002dpoint"><span class="category">Function: </span><span><strong>org-roam-node-at-point</strong> <em>&optional assert</em><a href='#index-org_002droam_002dnode_002dat_002dpoint' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Return the node at point. If ASSERT, throw an error if there is no node at
|
||
point.
|
||
</p></dd></dl>
|
||
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dnode_002dread"><span class="category">Function: </span><span><strong>org-roam-node-read</strong> <em>&optional initial-input filter-fn sort-fn</em><a href='#index-org_002droam_002dnode_002dread' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd><p>require-match
|
||
</p>
|
||
<p>Read and return an ‘org-roam-node’.
|
||
INITIAL-INPUT is the initial minibuffer prompt value. FILTER-FN
|
||
is a function to filter out nodes: it takes a single argument (an
|
||
<code>org-roam-node</code>), and when nil is returned the node will be
|
||
filtered out.
|
||
SORT-FN is a function to sort nodes. See <code>org-roam-node-read-sort-by-file-mtime</code>
|
||
for an example sort function.
|
||
If REQUIRE-MATCH, the minibuffer prompt will require a match.
|
||
</p></dd></dl>
|
||
|
||
<p>Once you obtain the node, you can use the accessors for the node, e.g.
|
||
<code>org-roam-node-id</code> or <code>org-roam-node-todo</code>.
|
||
</p>
|
||
<p>It is possible to define (or override existing) properties on nodes. This is
|
||
simply done using a <code>cl-defmethod</code> on the <code>org-roam-node</code> struct:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(cl-defmethod org-roam-node-namespace ((node org-roam-node))
|
||
"Return the namespace for NODE.
|
||
The namespace is the final directory of the file for the node."
|
||
(file-name-nondirectory
|
||
(directory-file-name
|
||
(file-name-directory (org-roam-node-file node)))))
|
||
</pre></div>
|
||
|
||
<p>The snippet above defines a new property <code>namespace</code> on <code>org-roam-node</code>, which
|
||
making it available for use in capture templates.
|
||
</p>
|
||
<hr>
|
||
</div>
|
||
<div class="subsection" id="Extending-the-Capture-System">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Accessing-and-Modifying-Nodes" accesskey="p" rel="prev">Accessing and Modifying Nodes</a>, Up: <a href="#Building-Extensions-and-Advanced-Customization-of-Org_002droam" accesskey="u" rel="up">Building Extensions and Advanced Customization of Org-roam</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Extending-the-Capture-System-1"></span><h4 class="subsection">17.2.3 Extending the Capture System</h4>
|
||
|
||
<p>Org-roam applies some patching over Org’s capture system to smooth out the user
|
||
experience, and sometimes it is desirable to use Org-roam’s capturing system
|
||
instead. The exposed function to be used in extensions is <code>org-roam-capture-</code>:
|
||
</p>
|
||
<dl class="def">
|
||
<dt id="index-org_002droam_002dcapture_002d"><span class="category">Function: </span><span><strong>org-roam-capture-</strong> <em>&key goto keys node info props templates</em><a href='#index-org_002droam_002dcapture_002d' class='copiable-anchor'> ¶</a></span></dt>
|
||
<dd>
|
||
<p>Main entry point.
|
||
GOTO and KEYS correspond to ‘org-capture’ arguments.
|
||
INFO is a plist for filling up Org-roam’s capture templates.
|
||
NODE is an ‘org-roam-node’ construct containing information about the node.
|
||
PROPS is a plist containing additional Org-roam properties for each template.
|
||
TEMPLATES is a list of org-roam templates.
|
||
</p></dd></dl>
|
||
|
||
<p>An example of an extension using <code>org-roam-capture-</code> is <code>org-roam-dailies</code>
|
||
itself:
|
||
</p>
|
||
<div class="example lisp">
|
||
<pre class="lisp">(defun org-roam-dailies--capture (time &optional goto)
|
||
"Capture an entry in a daily-note for TIME, creating it if necessary.
|
||
|
||
When GOTO is non-nil, go the note without creating an entry."
|
||
(org-roam-capture- :goto (when goto '(4))
|
||
:node (org-roam-node-create)
|
||
:templates org-roam-dailies-capture-templates
|
||
:props (list :override-default-time time))
|
||
(when goto (run-hooks 'org-roam-dailies-find-file-hook)))
|
||
</pre></div>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="chapter" id="Appendix">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Keystroke-Index" accesskey="n" rel="next">Keystroke Index</a>, Previous: <a href="#Developer_0027s-Guide-to-Org_002droam" accesskey="p" rel="prev">Developer’s Guide to Org-roam</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Appendix-1"></span><h2 class="chapter">18 Appendix</h2>
|
||
|
||
|
||
<ul class="section-toc">
|
||
<li><a href="#Note_002dtaking-Workflows" accesskey="1">Note-taking Workflows</a></li>
|
||
<li><a href="#Ecosystem" accesskey="2">Ecosystem</a></li>
|
||
</ul>
|
||
<hr>
|
||
<div class="section" id="Note_002dtaking-Workflows">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Ecosystem" accesskey="n" rel="next">Ecosystem</a>, Up: <a href="#Appendix" accesskey="u" rel="up">Appendix</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Note_002dtaking-Workflows-1"></span><h3 class="section">18.1 Note-taking Workflows</h3>
|
||
|
||
<ul>
|
||
<li> Books<ul>
|
||
<li> <a href="https://www.goodreads.com/book/show/34507927-how-to-take-smart-notes">How To Take Smart Notes</a>
|
||
</li></ul>
|
||
|
||
</li><li> Articles<ul>
|
||
<li> <a href="https://www.lesswrong.com/posts/NfdHG6oHBJ8Qxc26s/the-zettelkasten-method-1">The Zettelkasten Method - LessWrong 2.0</a>
|
||
|
||
</li><li> <a href="https://reddit.com/r/RoamResearch/comments/eho7de/building_a_second_brain_in_roamand_why_you_might">Building a Second Brain in Roam…And Why You Might Want To : RoamResearch</a>
|
||
|
||
</li><li> <a href="https://www.nateliason.com/blog/roam">Roam Research: Why I Love It and How I Use It - Nat Eliason</a>
|
||
|
||
</li><li> <a href="https://twitter.com/adam_keesling/status/1196864424725774336?s=20">Adam Keesling’s Twitter Thread</a>
|
||
|
||
</li><li> <a href="https://blog.jethro.dev/posts/how_to_take_smart_notes_org/">How To Take Smart Notes With Org-mode · Jethro Kuan</a>
|
||
</li></ul>
|
||
|
||
</li><li> Threads<ul>
|
||
<li> <a href="https://news.ycombinator.com/item?id=22473209">Ask HN: How to Take Good Notes</a>
|
||
</li></ul>
|
||
|
||
</li><li> Videos<ul>
|
||
<li> <a href="https://www.youtube.com/watch?v=RvWic15iXjk">How to Use Roam to Outline a New Article in Under 20 Minutes</a>
|
||
</li></ul>
|
||
</li></ul>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="section" id="Ecosystem">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Note_002dtaking-Workflows" accesskey="p" rel="prev">Note-taking Workflows</a>, Up: <a href="#Appendix" accesskey="u" rel="up">Appendix</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Ecosystem-1"></span><h3 class="section">18.2 Ecosystem</h3>
|
||
|
||
<hr>
|
||
</div>
|
||
</div>
|
||
<div class="appendix" id="Keystroke-Index">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Command-Index" accesskey="n" rel="next">Command Index</a>, Previous: <a href="#Appendix" accesskey="p" rel="prev">Appendix</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Keystroke-Index-1"></span><h2 class="appendix">Appendix A Keystroke Index</h2>
|
||
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="appendix" id="Command-Index">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Function-Index" accesskey="n" rel="next">Function Index</a>, Previous: <a href="#Keystroke-Index" accesskey="p" rel="prev">Keystroke Index</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Command-Index-1"></span><h2 class="appendix">Appendix B Command Index</h2>
|
||
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="appendix" id="Function-Index">
|
||
<div class="header">
|
||
<p>
|
||
Next: <a href="#Variable-Index" accesskey="n" rel="next">Variable Index</a>, Previous: <a href="#Command-Index" accesskey="p" rel="prev">Command Index</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Function-Index-1"></span><h2 class="appendix">Appendix C Function Index</h2>
|
||
|
||
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Function-Index_fn_letter-O"><b>O</b></a>
|
||
|
||
</td></tr></table>
|
||
<table class="index-fn" border="0">
|
||
<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
|
||
<tr><td colspan="4"> <hr></td></tr>
|
||
<tr><th id="Function-Index_fn_letter-O">O</th><td></td><td></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dalias_002dadd"><code>org-roam-alias-add</code></a>:</td><td> </td><td valign="top"><a href="#Titles-and-Aliases">Titles and Aliases</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dalias_002dremove"><code>org-roam-alias-remove</code></a>:</td><td> </td><td valign="top"><a href="#Titles-and-Aliases">Titles and Aliases</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dbuffer_002ddisplay_002ddedicated"><code>org-roam-buffer-display-dedicated</code></a>:</td><td> </td><td valign="top"><a href="#The-Org_002droam-Buffer">The Org-roam Buffer</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dbuffer_002dtoggle"><code>org-roam-buffer-toggle</code></a>:</td><td> </td><td valign="top"><a href="#The-Org_002droam-Buffer">The Org-roam Buffer</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dcapture_002d"><code>org-roam-capture-</code></a>:</td><td> </td><td valign="top"><a href="#Extending-the-Capture-System">Extending the Capture System</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002dcapture_002ddate"><code><code>org-roam-dailies-capture-date</code></code></a>:</td><td> </td><td valign="top"><a href="#Usage">Usage</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002dcapture_002dtoday"><code><code>org-roam-dailies-capture-today</code></code></a>:</td><td> </td><td valign="top"><a href="#Usage">Usage</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002dcapture_002dyesterday"><code><code>org-roam-dailies-capture-yesterday</code></code></a>:</td><td> </td><td valign="top"><a href="#Usage">Usage</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002dfind_002ddirectory"><code><code>org-roam-dailies-find-directory</code></code></a>:</td><td> </td><td valign="top"><a href="#Usage">Usage</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002dgoto_002ddate"><code><code>org-roam-dailies-goto-date</code></code></a>:</td><td> </td><td valign="top"><a href="#Usage">Usage</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002dgoto_002dnext_002dnote"><code><code>org-roam-dailies-goto-next-note</code></code></a>:</td><td> </td><td valign="top"><a href="#Usage">Usage</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002dgoto_002dprevious_002dnote"><code><code>org-roam-dailies-goto-previous-note</code></code></a>:</td><td> </td><td valign="top"><a href="#Usage">Usage</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002dgoto_002dtoday"><code><code>org-roam-dailies-goto-today</code></code></a>:</td><td> </td><td valign="top"><a href="#Usage">Usage</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002dgoto_002dyesterday"><code><code>org-roam-dailies-goto-yesterday</code></code></a>:</td><td> </td><td valign="top"><a href="#Usage">Usage</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dgraph"><code>org-roam-graph</code></a>:</td><td> </td><td valign="top"><a href="#org_002droam_002dgraph">org-roam-graph</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dnode_002dat_002dpoint"><code>org-roam-node-at-point</code></a>:</td><td> </td><td valign="top"><a href="#Accessing-and-Modifying-Nodes">Accessing and Modifying Nodes</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dnode_002dread"><code>org-roam-node-read</code></a>:</td><td> </td><td valign="top"><a href="#Accessing-and-Modifying-Nodes">Accessing and Modifying Nodes</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dref_002dadd"><code>org-roam-ref-add</code></a>:</td><td> </td><td valign="top"><a href="#Refs">Refs</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dref_002dremove"><code>org-roam-ref-remove</code></a>:</td><td> </td><td valign="top"><a href="#Refs">Refs</a></td></tr>
|
||
<tr><td colspan="4"> <hr></td></tr>
|
||
</table>
|
||
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Function-Index_fn_letter-O"><b>O</b></a>
|
||
|
||
</td></tr></table>
|
||
|
||
<hr>
|
||
</div>
|
||
<div class="appendix" id="Variable-Index">
|
||
<div class="header">
|
||
<p>
|
||
Previous: <a href="#Function-Index" accesskey="p" rel="prev">Function Index</a>, Up: <a href="#Top" accesskey="u" rel="up">Org-roam User Manual</a> [<a href="#Keystroke-Index" title="Index" rel="index">Index</a>]</p>
|
||
</div>
|
||
<span id="Variable-Index-1"></span><h2 class="appendix">Appendix D Variable Index</h2>
|
||
|
||
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Variable-Index_vr_letter-O"><b>O</b></a>
|
||
|
||
</td></tr></table>
|
||
<table class="index-vr" border="0">
|
||
<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
|
||
<tr><td colspan="4"> <hr></td></tr>
|
||
<tr><th id="Variable-Index_vr_letter-O">O</th><td></td><td></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dcompletion_002deverywhere"><code>org-roam-completion-everywhere</code></a>:</td><td> </td><td valign="top"><a href="#Completing-anywhere">Completing anywhere</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002dcapture_002dtemplates"><code><code>org-roam-dailies-capture-templates</code></code></a>:</td><td> </td><td valign="top"><a href="#Configuration">Configuration</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddailies_002ddirectory"><code><code>org-roam-dailies-directory</code></code></a>:</td><td> </td><td valign="top"><a href="#Configuration">Configuration</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddb_002dextra_002dlinks_002delements"><code>org-roam-db-extra-links-elements</code></a>:</td><td> </td><td valign="top"><a href="#What-to-cache">What to cache</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddb_002dextra_002dlinks_002dexclude_002dkeys"><code>org-roam-db-extra-links-exclude-keys</code></a>:</td><td> </td><td valign="top"><a href="#What-to-cache">What to cache</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002ddb_002dupdate_002don_002dsave"><code>org-roam-db-update-on-save</code></a>:</td><td> </td><td valign="top"><a href="#When-to-cache">When to cache</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dgraph_002dedge_002dextra_002dconfig"><code>org-roam-graph-edge-extra-config</code></a>:</td><td> </td><td valign="top"><a href="#Graph-Options">Graph Options</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dgraph_002dexecutable"><code>org-roam-graph-executable</code></a>:</td><td> </td><td valign="top"><a href="#org_002droam_002dgraph">org-roam-graph</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dgraph_002dextra_002dconfig"><code>org-roam-graph-extra-config</code></a>:</td><td> </td><td valign="top"><a href="#Graph-Options">Graph Options</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dgraph_002dfiletype"><code>org-roam-graph-filetype</code></a>:</td><td> </td><td valign="top"><a href="#Graph-Options">Graph Options</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dgraph_002dnode_002dextra_002dconfig"><code>org-roam-graph-node-extra-config</code></a>:</td><td> </td><td valign="top"><a href="#Graph-Options">Graph Options</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dgraph_002dviewer"><code>org-roam-graph-viewer</code></a>:</td><td> </td><td valign="top"><a href="#org_002droam_002dgraph">org-roam-graph</a></td></tr>
|
||
<tr><td></td><td valign="top"><a href="#index-org_002droam_002dnode_002ddisplay_002dtemplate"><code>org-roam-node-display-template</code></a>:</td><td> </td><td valign="top"><a href="#Customizing-Node-Completions">Customizing Node Completions</a></td></tr>
|
||
<tr><td colspan="4"> <hr></td></tr>
|
||
</table>
|
||
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Variable-Index_vr_letter-O"><b>O</b></a>
|
||
|
||
</td></tr></table>
|
||
|
||
<p>Emacs 29.0.50 (Org mode 9.6)
|
||
</p></div>
|
||
</div>
|
||
<div class="footnote">
|
||
<hr>
|
||
<h4 class="footnotes-heading">Footnotes</h4>
|
||
|
||
<h5><a id="FOOT1" href="#DOCF1">(1)</a></h5>
|
||
<p>To understand more about Roam, a collection of links are available in <a href="#Note_002dtaking-Workflows">Note-taking Workflows</a>.</p>
|
||
</div>
|
||
|
||
|
||
|
||
</body>
|
||
</html>
|