mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(fix): fix org-agenda hangs on face computation (#1101)
Org expects face functions to save-match-data, or it would lead to infinite recursions with use of some Org functionality such as org-agenda (h.t. @myshevchuk for figuring this out) Fixes #1096 and fixes #1045.
This commit is contained in:
@ -1440,6 +1440,7 @@ Applies `org-roam-link-current' if PATH corresponds to the
|
||||
currently opened Org-roam file in the backlink buffer, or
|
||||
`org-roam-link-face' if PATH corresponds to any other Org-roam
|
||||
file."
|
||||
(save-match-data
|
||||
(let* ((in-note (-> (buffer-file-name (buffer-base-buffer))
|
||||
(org-roam--org-roam-file-p)))
|
||||
(custom (or (and in-note org-roam-link-use-custom-faces)
|
||||
@ -1455,7 +1456,7 @@ file."
|
||||
(org-roam--org-roam-file-p path))
|
||||
'org-roam-link)
|
||||
(t
|
||||
'org-link))))
|
||||
'org-link)))))
|
||||
|
||||
(defun org-roam--id-link-face (id)
|
||||
"Conditional face for id links.
|
||||
@ -1463,6 +1464,7 @@ Applies `org-roam-link-current' if ID corresponds to the
|
||||
currently opened Org-roam file in the backlink buffer, or
|
||||
`org-roam-link-face' if ID corresponds to any other Org-roam
|
||||
file."
|
||||
(save-match-data
|
||||
(let* ((in-note (-> (buffer-file-name (buffer-base-buffer))
|
||||
(org-roam--org-roam-file-p)))
|
||||
(custom (or (and in-note org-roam-link-use-custom-faces)
|
||||
@ -1477,7 +1479,7 @@ file."
|
||||
(org-roam-id-find id))
|
||||
'org-roam-link)
|
||||
(t
|
||||
'org-link))))
|
||||
'org-link)))))
|
||||
|
||||
(defun org-roam--queue-file-for-update (&optional file-path)
|
||||
"Queue FILE-PATH for `org-roam' database update.
|
||||
|
Reference in New Issue
Block a user