From a723199d682724009fdc96312e836ba6e1f18740 Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Mon, 4 May 2020 12:57:43 +0800 Subject: [PATCH] (feat): apply error face if file link is broken (#560) --- CHANGELOG.md | 1 + org-roam.el | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3845355..99fefb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ### Features * [#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 +* [#560](https://github.com/jethrokuan/org-roam/pull/560) Apply 'error face to distinguish broken links ## 1.1.0 (21-04-2020) diff --git a/org-roam.el b/org-roam.el index f37269f..86e796d 100644 --- a/org-roam.el +++ b/org-roam.el @@ -644,7 +644,9 @@ 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." - (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-link-current) ((org-roam--org-roam-file-p path)