From 8cb39ec9e2ded85712c948e03fc2f3d1974b88e6 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Fri, 15 May 2020 11:13:26 +0200 Subject: [PATCH] Statically choose face for Org Mode links Checking whether the file exists or not and choosing the face accordingly may be slow on Windows, where file operations seem to be expensive. --- init.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 86abec2..a62ecbc 100644 --- a/init.el +++ b/init.el @@ -831,10 +831,10 @@ With given ARG, display files in `db/important-document-path’." ;; Reset checkboxes if the RESET_CHECK_BOXES property is set (add-hook 'org-after-todo-state-change-hook 'org-reset-checkbox-state-maybe) - ;; Color links to file according to whether they exist or not - (org-link-set-parameters - "file" - :face (lambda (path) (if (file-exists-p path) 'org-link 'org-warning))) + ;; Statically color links sponding to whether the file exists, but + ;; this turns out to be slow on Windows; we can use `org-lint' for + ;; this when necessary) + (org-link-set-parameters "file" :face 'org-link) ;; File Apps