When enabled make sure we load org-roam-protocol

Org roam protocol can be used from outside Emacs and as such, loading it only
after some org-roam buffers are opened defeats the purpose. Without this change
the org-protocol links won't work after emacs restart until at least one
org-roam buffer is loaded.

Fixes #14487
This commit is contained in:
Stanislav Ochotnický 2022-04-10 08:48:24 +02:00 committed by Maxi Wolff
parent 06f790d4cf
commit 805d9e8cd6
1 changed files with 5 additions and 4 deletions

View File

@ -970,15 +970,16 @@ Headline^^ Visit entry^^ Filter^^ Da
:config
(progn
(spacemacs|hide-lighter org-roam-mode)
(when org-enable-roam-protocol
(add-hook 'org-roam-mode-hook (lambda ()
(require 'org-roam-protocol))))
(evilified-state-evilify-map org-roam-mode-map
:mode org-roam-mode
:bindings
"o" 'link-hint-open-link
"r" 'org-roam-buffer-refresh))))
"r" 'org-roam-buffer-refresh)))
(use-package org-roam-protocol
:if org-roam-enable-protocol
:after org-protocol))
(defun org/init-org-sticky-header ()
(use-package org-sticky-header