Skip to content

Commit

Permalink
[org] Add org roam workaround to solve links in org buffers
Browse files Browse the repository at this point in the history
See #1732
  • Loading branch information
smile13241324 committed Aug 30, 2024
1 parent fc36f29 commit dd99bf4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions layers/+emacs/org/funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
5 changes: 5 additions & 0 deletions layers/+emacs/org/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit dd99bf4

Please sign in to comment.