|
@ -42,6 +42,7 @@ The default behaviour of ~org-roam~ when creating a title slug is to replace any |
|
|
+ Override ~org-roam-title-to-slug-function~ |
|
|
+ Override ~org-roam-title-to-slug-function~ |
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(with-eval-after-load 'org-roam |
|
|
(require 'cl-lib) |
|
|
(require 'cl-lib) |
|
|
(defun dotfiles/title-to-slug (title) |
|
|
(defun dotfiles/title-to-slug (title) |
|
|
"Convert TITLE to a filename-suitable slug." |
|
|
"Convert TITLE to a filename-suitable slug." |
|
@ -58,7 +59,7 @@ The default behaviour of ~org-roam~ when creating a title slug is to replace any |
|
|
("-$" . ""))) ;; Remove ending dashes. |
|
|
("-$" . ""))) ;; Remove ending dashes. |
|
|
(slug (-reduce-from #'cl-replace (strip-nonspacing-marks title) pairs))) |
|
|
(slug (-reduce-from #'cl-replace (strip-nonspacing-marks title) pairs))) |
|
|
(downcase slug)))) |
|
|
(downcase slug)))) |
|
|
(setq org-roam-title-to-slug-function #'dotfiles/title-to-slug) |
|
|
|
|
|
|
|
|
(setq org-roam-title-to-slug-function #'dotfiles/title-to-slug)) |
|
|
#+end_src |
|
|
#+end_src |
|
|
|
|
|
|
|
|
** Visualizer |
|
|
** Visualizer |
|
@ -76,6 +77,7 @@ Use the ~org-roam-server~ web application to visualize the ~org-roam~ database. |
|
|
Use the ~daily~ note feature of ~org-roam~ to capture daily notes. Create the default capture template with some preconfigured headers. |
|
|
Use the ~daily~ note feature of ~org-roam~ to capture daily notes. Create the default capture template with some preconfigured headers. |
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(with-eval-after-load 'org-roam |
|
|
(add-to-list 'org-roam-dailies-capture-templates |
|
|
(add-to-list 'org-roam-dailies-capture-templates |
|
|
'("d" "Default" entry (function org-roam-capture--get-point) |
|
|
'("d" "Default" entry (function org-roam-capture--get-point) |
|
|
"* %?" |
|
|
"* %?" |
|
@ -87,7 +89,7 @@ Use the ~daily~ note feature of ~org-roam~ to capture daily notes. Create the de |
|
|
|
|
|
|
|
|
,#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil |
|
|
,#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil |
|
|
,#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil |
|
|
,#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil |
|
|
")) |
|
|
|
|
|
|
|
|
"))) |
|
|
#+end_src |
|
|
#+end_src |
|
|
|
|
|
|
|
|
* Templates |
|
|
* Templates |
|
@ -95,6 +97,7 @@ Use the ~daily~ note feature of ~org-roam~ to capture daily notes. Create the de |
|
|
Collection of capture templates for various contexts. Here is one for a generic document. |
|
|
Collection of capture templates for various contexts. Here is one for a generic document. |
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(with-eval-after-load 'org-roam |
|
|
(add-to-list 'org-roam-capture-templates |
|
|
(add-to-list 'org-roam-capture-templates |
|
|
'("d" "Default" entry (function org-roam-capture--get-point) |
|
|
'("d" "Default" entry (function org-roam-capture--get-point) |
|
|
"%?" |
|
|
"%?" |
|
@ -105,7 +108,7 @@ Collection of capture templates for various contexts. Here is one for a generic |
|
|
,#+TITLE: ${title} |
|
|
,#+TITLE: ${title} |
|
|
,#+AUTHOR: Christopher James Hayward |
|
|
,#+AUTHOR: Christopher James Hayward |
|
|
,#+EMAIL: chris@chrishayward.xyz |
|
|
,#+EMAIL: chris@chrishayward.xyz |
|
|
")) |
|
|
|
|
|
|
|
|
"))) |
|
|
#+end_src |
|
|
#+end_src |
|
|
|
|
|
|
|
|
** Course |
|
|
** Course |
|
@ -113,6 +116,7 @@ Collection of capture templates for various contexts. Here is one for a generic |
|
|
Capture template for a new course. Capture with =SPC r c c=. |
|
|
Capture template for a new course. Capture with =SPC r c c=. |
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(with-eval-after-load 'org-roam |
|
|
(add-to-list 'org-roam-capture-templates |
|
|
(add-to-list 'org-roam-capture-templates |
|
|
'("c" "Course" plain (function org-roam-capture--get-point) |
|
|
'("c" "Course" plain (function org-roam-capture--get-point) |
|
|
"%?" |
|
|
"%?" |
|
@ -127,7 +131,7 @@ Capture template for a new course. Capture with =SPC r c c=. |
|
|
|
|
|
|
|
|
,#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil |
|
|
,#+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil |
|
|
,#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil |
|
|
,#+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil |
|
|
")) |
|
|
|
|
|
|
|
|
"))) |
|
|
#+end_src |
|
|
#+end_src |
|
|
|
|
|
|
|
|
* Shortcuts |
|
|
* Shortcuts |
|
|