(feat): apply error face if file link is broken (#560)

This commit is contained in:
Jethro Kuan
2020-05-04 12:57:43 +08:00
committed by GitHub
parent 1bbfb0cdc9
commit a723199d68
2 changed files with 4 additions and 1 deletions

View File

@ -14,6 +14,7 @@
### Features ### Features
* [#538](https://github.com/jethrokuan/org-roam/pull/538) Optionally use text in first headline as title * [#538](https://github.com/jethrokuan/org-roam/pull/538) Optionally use text in first headline as title
* [#553](https://github.com/jethrokuan/org-roam/pull/553) Add prefix argument to `org-roam-db-build-cache` for forcing rebuilds * [#553](https://github.com/jethrokuan/org-roam/pull/553) Add prefix argument to `org-roam-db-build-cache` for forcing rebuilds
* [#560](https://github.com/jethrokuan/org-roam/pull/560) Apply 'error face to distinguish broken links
## 1.1.0 (21-04-2020) ## 1.1.0 (21-04-2020)

View File

@ -644,7 +644,9 @@ Applies `org-roam-link-current' if PATH corresponds to the
currently opened Org-roam file in the backlink buffer, or currently opened Org-roam file in the backlink buffer, or
`org-roam-link-face' if PATH corresponds to any other Org-roam `org-roam-link-face' if PATH corresponds to any other Org-roam
file." file."
(cond ((and (org-roam--in-buffer-p) (cond ((not (file-exists-p path))
'error)
((and (org-roam--in-buffer-p)
(org-roam--backlink-to-current-p)) (org-roam--backlink-to-current-p))
'org-roam-link-current) 'org-roam-link-current)
((org-roam--org-roam-file-p path) ((org-roam--org-roam-file-p path)