Skip to content

Latest commit

 

History

History
70 lines (45 loc) · 2.92 KB

README.org

File metadata and controls

70 lines (45 loc) · 2.92 KB

org-node-fakeroam

Some awesome shims for letting https://github.com/meedstrom/org-node control org-roam.

Suggested setup

These settings help you feel at home using both org-roam and org-node side-by-side:

(setq org-node-creation-fn #'org-node-new-via-roam-capture)
(setq org-node-slug-fn #'org-node-slugify-like-roam-actual)
(setq org-node-datestamp-format "%Y%m%d%H%M%S-")

(The mentioned functions will probably relocate into this subpackage soon, but don’t worry about the transition, the package will warn you to rename.)

If you’ve struggled in the past with big files taking a long time to save, consider these org-roam settings:

(setq org-roam-db-update-on-save nil) ;; don't update DB on save, not needed
(setq org-roam-link-auto-replace nil) ;; don't look for "roam:" links on save

And if the backlinks buffer has been laggy:

(org-node-fakeroam-fast-render-mode) ;; build the Roam buffer faster

Finally, make sure the underlying org-id knows about the files org-roam knows about. You’d think it would, but that isn’t a given! Do either of these:

  1. Run M-x org-roam-update-org-id-locations every now and then.
  2. Edit the following setting so it includes your org-roam-directory. Supposing that is “~/org/”, set this:
(setq org-node-extra-id-dirs '("~/org/"))

With that done, go back to the main README and try out the commands in Quick start. There’s more under Toolbox. Enjoy!

Tip: Speeding up the org-roam DB

You can replace org-roam-db-autosync-mode entirely. Refer to https://github.com/meedstrom/org-node#backlink-solution-1-borrow-org-roams-backlink-buffer.

Tip: On very slow filesystems

I hear that on Termux on Android, filesystem access can be so slow that it’s a pain to cycle dailies with org-roam (11 seconds just to goto next daily!). A Redditor also said Apple NFS is not ideal for Emacs.

Good news. You can speed up some functions by making them look up org-node tables and avoid the filesystem:

(advice-add #'org-roam-list-files :override
            #'org-node-fakeroam-list-files)

(advice-add #'org-roam-dailies--list-files :override
            #'org-node-fakeroam-list-dailies)

(advice-add #'org-roam-dailies--daily-note-p :override
            #'org-node-fakeroam-daily-note-p)

Tip: Word-wrap in the Roam buffer?

This has nothing to do with org-node, but I actually didn’t know this for ages.

If you don’t hard-wrap but prefer visual-line-mode or similar (org-roam#1862), you have to enable such modes yourself – it sensibly doesn’t inherit your Org hooks:

(add-hook 'org-roam-mode-hook #'visual-line-mode)