Do not let org-roam change matching data when determining the face

It is not clear what function really changes the matching data, but it's called
by `org-roam--id-link-face', and this is where we save the matching data now.

TODO: check whether this has been reported or even fixed upstream.
master
Daniel Borchmann 2 years ago
parent a2ce6ebc59
commit b1d82f875f
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
  1. 14
      init.el

@ -1333,7 +1333,19 @@
(apply orig-fun args)))
(advice-add 'org-roam--update-file-name-on-title-change
:around #'db/org-roam--no-titlechange-if-title-is-nil)))
:around #'db/org-roam--no-titlechange-if-title-is-nil)
;; `org-roam--id-link-face' apparently changes the matching data,
;; resulting in `org-finalize-agenda' to fail while applying text
;; properties to ID links; let's warp `save-match-data' around calls
;; to it.
(defun db/save-match-data (orig-fun &rest args)
(save-match-data
(apply orig-fun args)))
(advice-add 'org-roam--id-link-face
:around #'db/save-match-data)))
(use-package org-ref
:config (progn

Loading…
Cancel
Save