diff --git a/org-roam.el b/org-roam.el index 2b7f4a6..6b9955a 100644 --- a/org-roam.el +++ b/org-roam.el @@ -1132,15 +1132,21 @@ 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." - (cond ((not (org-roam-id-find id)) - 'org-roam-link-invalid) - ((and (org-roam--in-buffer-p) - (org-roam--backlink-to-current-p)) - 'org-roam-link-current) - ((org-roam-id-find id t) - 'org-roam-link) - (t - 'org-link))) + (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) + (eq org-roam-link-use-custom-faces 'everywhere)))) + (cond ((and custom + (not (org-roam-id-find id))) + 'org-roam-link-invalid) + ((and (org-roam--in-buffer-p) + (org-roam--backlink-to-current-p)) + 'org-roam-link-current) + ((and custom + (org-roam-id-find id)) + 'org-roam-link) + (t + 'org-link)))) ;;;; Hooks and Advices (defun org-roam--find-file-hook-function () @@ -1303,7 +1309,7 @@ M-x info for more information at Org-roam > Installation > Post-Installation Tas (advice-add 'delete-file :before #'org-roam--delete-file-advice) (when (fboundp 'org-link-set-parameters) (org-link-set-parameters "file" :face 'org-roam--file-link-face :store #'org-roam-store-link) - (org-link-set-parameters "id" :face 'org-roam---id-link-face)) + (org-link-set-parameters "id" :face 'org-roam--id-link-face)) (org-roam-db-build-cache)) (t (setq org-execute-file-search-functions (delete 'org-roam--execute-file-row-col org-execute-file-search-functions))