If I create a bad [[file:link]]
or an internal [[Link]]
that does not exist, I would like to org-mode
to fontify this using org-warning
face. How can I get this done?
Thanks,
In org-9 it might be as simple as this for file links:
(org-link-set-parameters
"file"
:face (lambda (path) (if (file-exists-p path) 'org-link 'org-warning)))
For internal links I don't know an easy way to do it.
file-remote-p
, which seems to do the job. I've modified your code in the following way: (org-link-set-parameters "file" :face (lambda (path) (when (not (file-remote-p path))(if (file-exists-p path) 'org-link 'org-warning))))