You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -964,7 +1046,7 @@ make the new policy take effect.
964
1046
See [[https://www.chromium.org/administrators/linux-quick-start][here]] for more info on the ~/etc/opt/chrome/policies/managed~ directory and
965
1047
[[https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ExternalProtocolDialogShowAlwaysOpenCheckbox][here]] for information on the ~ExternalProtocolDialogShowAlwaysOpenCheckbox~ policy.
966
1048
967
-
*** Mac OS
1049
+
**** Mac OS
968
1050
For Mac OS, we need to create our own application.
To test that you have the handler setup and registered properly from the command
1025
1107
line you can run:
@@ -1042,7 +1124,7 @@ You may need to manually register your handler, like this:
1042
1124
#+end_src
1043
1125
1044
1126
Here is a link to the lsregister command that is really useful: https://eclecticlight.co/2019/03/25/lsregister-a-valuable-undocumented-command-for-launchservices/
1045
-
*** Windows
1127
+
**** Windows
1046
1128
For Windows, create a temporary ~org-protocol.reg~ file:
1047
1129
1048
1130
#+BEGIN_SRC text
@@ -1067,13 +1149,13 @@ Windows, replace the last line with:
1067
1149
After executing the .reg file, the protocol is registered and you can delete the
1068
1150
file.
1069
1151
1070
-
** The roam-node protocol
1152
+
*** The roam-node protocol
1071
1153
1072
1154
The roam-node protocol opens the node with ID specified by the ~node~ key (e.g.
1073
1155
~org-protocol://roam-node?node=node-id~). ~org-roam-graph~ uses this to make the
1074
1156
graph navigable.
1075
1157
1076
-
** The roam-ref protocol
1158
+
*** The roam-ref protocol
1077
1159
1078
1160
This protocol finds or creates a new note with a given ~ROAM_REFS~:
1079
1161
@@ -1101,93 +1183,11 @@ or as a keybinding in ~qutebrowser~ in , using the ~config.py~ file (see
1101
1183
where ~template~ is the template key for a template in
1102
1184
~org-roam-capture-ref-templates~ (see [[*The Templating System][The Templating System]]).
1103
1185
1104
-
* The Templating System
1105
-
1106
-
Org-roam extends the ~org-capture~ system, providing a smoother note-taking
1107
-
experience. However, these extensions mean Org-roam capture templates are
1108
-
incompatible with ~org-capture~ templates.
1109
-
1110
-
Org-roam's templates are specified by ~org-roam-capture-templates~. Just like
1111
-
~org-capture-templates~, ~org-roam-capture-templates~ can contain multiple
1112
-
templates. If ~org-roam-capture-templates~ only contains one template, there
1113
-
will be no prompt for template selection.
1114
-
1115
-
** Template Walkthrough
1116
-
1117
-
To demonstrate the additions made to org-capture templates. Here, we explain
1118
-
the default template, reproduced below. You will find most of the elements
1119
-
of the template are similar to ~org-capture~ templates.
1120
-
1121
-
#+BEGIN_SRC emacs-lisp
1122
-
(("d" "default" plain "%?"
1123
-
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
1124
-
"#+title: ${title}\n")
1125
-
:unnarrowed t))
1126
-
#+END_SRC
1127
-
1128
-
1. The template has short key ~"d"~. If you have only one template, org-roam
1129
-
automatically chooses this template for you.
1130
-
2. The template is given a description of ~"default"~.
1131
-
3. ~plain~ text is inserted. Other options include Org headings via
1132
-
~entry~.
1133
-
4. Notice that the ~target~ that's usually in Org-capture templates is missing
1134
-
here.
1135
-
5. ~"%?"~ is the template inserted on each call to ~org-roam-capture-~.
1136
-
This template means don't insert any content, but place the cursor here.
1137
-
6. ~:target~ is a compulsory specification in the Org-roam capture template. The
1138
-
first element of the list indicates the type of the target, the second
1139
-
element indicates the location of the captured node, and the rest of the
1140
-
elements indicate prefilled template that will be inserted and the position
1141
-
of the point will be adjusted for. The latter behavior varies from type to
1142
-
type of the capture target.
1143
-
7. ~:unnarrowed t~ tells org-capture to show the contents for the whole file,
1144
-
rather than narrowing to just the entry. This is part of the Org-capture
1145
-
templates.
1146
-
1147
-
See the ~org-roam-capture-templates~ documentation for more details and
1148
-
customization options.
1149
-
1150
-
** Org-roam Template Expansion
1151
-
1152
-
Org-roam's template definitions also extend org-capture's template syntax, to
1153
-
allow prefilling of strings. We have seen a glimpse of this in [[*Template Walkthrough][Template
1154
-
Walkthrough]].
1155
-
1156
-
Org-roam provides the ~${foo}~ syntax for substituting variables with known
1157
-
strings. ~${foo}~'s substitution is performed as follows:
1158
-
1159
-
1. If ~foo~ is a function, ~foo~ is called with the current node as its
1160
-
argument.
1161
-
2. Else if ~org-roam-node-foo~ is a function, ~foo~ is called with the current node
1162
-
as its argument. The ~org-roam-node-~ prefix defines many of Org-roam's node
1163
-
accessors such as ~org-roam-node-title~ and ~org-roam-node-level~.
1164
-
3. Else look up ~org-roam-capture--info~ for ~foo~. This is an internal variable
1165
-
that is set before the capture process begins.
1166
-
4. If none of the above applies, read a string using ~completing-read~.
1167
-
a. Org-roam also provides the ~${foo=default_val}~ syntax, where if a default
1168
-
value is provided, will be the initial value for the ~foo~ key during
1169
-
minibuffer completion.
1170
-
1171
-
One can check the list of available keys for nodes by inspecting the
1172
-
~org-roam-node~ struct. At the time of writing, it is:
0 commit comments