diff --git a/layers/+emacs/org/funcs.el b/layers/+emacs/org/funcs.el index 9fe014d084f2..5f2bac4185fc 100644 --- a/layers/+emacs/org/funcs.el +++ b/layers/+emacs/org/funcs.el @@ -133,3 +133,11 @@ For example: To unfold from a magit diff buffer, evaluate the following: (and (org-entry-is-done-p) (> n-not-done 0))) ;; then prompt to change the state (org-todo)))) + + + + +(defun spacemacs/with-save-excursion (orig-fun &rest args) + "Execute the given function with save excursion." + (save-excursion + (apply orig-fun args))) diff --git a/layers/+emacs/org/packages.el b/layers/+emacs/org/packages.el index d450c6b134bf..9662aa6dfb2b 100644 --- a/layers/+emacs/org/packages.el +++ b/layers/+emacs/org/packages.el @@ -949,6 +949,11 @@ Headline^^ Visit entry^^ Filter^^ Da ;; org-roam. See https://github.com/syl20bnr/spacemacs/issues/15724 ;; :hook (after-init . org-roam-setup) :init + + ;; Fix org roam issue https://github.com/org-roam/org-roam/pull/2334 until + ;; upstream is merged. + (advice-add 'org-roam-fontify-like-in-org-mode :around #'spacemacs/with-save-excursion) + (spacemacs/declare-prefix "aor" "org-roam" "aord" "org-roam-dailies"