mirror of
https://github.com/org-roam/org-roam
synced 2025-09-16 15:56:48 -05:00
(feat): add custom face for invalid links (#564)
* (feat): add custom face for links without destinations * Rename to ‘invalid’ * Update docstring * Remove ‘typically’
This commit is contained in:
@@ -671,6 +671,12 @@ ARG is used to forward interactive calls to
|
||||
"Face for Org-roam links pointing to the current buffer."
|
||||
:group 'org-roam-faces)
|
||||
|
||||
(defface org-roam-link-invalid
|
||||
'((t :inherit (error org-link)))
|
||||
"Face for Org-roam links that are not valid.
|
||||
This face is used for links without a destination."
|
||||
:group 'org-roam-faces)
|
||||
|
||||
(defun org-roam--in-buffer-p ()
|
||||
"Return t if in the Org-roam buffer."
|
||||
(and (boundp org-roam-backlinks-mode)
|
||||
@@ -697,7 +703,7 @@ currently opened Org-roam file in the backlink buffer, or
|
||||
`org-roam-link-face' if PATH corresponds to any other Org-roam
|
||||
file."
|
||||
(cond ((not (file-exists-p path))
|
||||
'error)
|
||||
'org-roam-link-invalid)
|
||||
((and (org-roam--in-buffer-p)
|
||||
(org-roam--backlink-to-current-p))
|
||||
'org-roam-link-current)
|
||||
|
Reference in New Issue
Block a user