(fix): fall back to org-id search ID face computation (#1195)

* (fix): fall back to org-id search ID face computation

Fixes the scenario where the face is reported as invalid although it is
part of Org's ID files (e.g. in the agenda).

Fixes #1191.

This can however slow face computation a lot (when there are many org
id/agenda files). Here, we choose to focus on correctness.

* Document faces, default to only applying to Org-roam notes
This commit is contained in:
Jethro Kuan
2020-10-19 13:47:07 +08:00
committed by GitHub
parent 09fd41ce24
commit 5d483f2d4d
4 changed files with 52 additions and 6 deletions

View File

@@ -614,6 +614,25 @@ The Org-roam buffer displays backlinks for the currently active Org-roam note.
Org-roam files are created and prefilled using Org-roam's templating
system. The templating system is customizable (see [[*The Templating System][The Templating System]]).
** Org-roam Faces
Org-roam introduces several faces to distinguish links within the same buffer.
These faces are enabled by default in Org-roam notes.
- User Option: org-roam-link-use-custom-faces
When ~t~, use custom faces only inside Org-roam notes.
When ~everywhere~, the custom face is applied additionally to non Org-roam notes.
When ~nil~, do not use Org-roam's custom faces.
The ~org-roam-link~ face is the face applied to links to other Org-roam files.
This distinguishes internal links from external links (e.g. external web links).
The ~org-roam-link-current~ face corresponds to links to the same file it is in.
The ~org-roam-link-invalid~ face is applied to links that are broken. These are
links to files or IDs that cannot be found.
* Inserting Links
The preferred mode of linking is via ~file~ links to files, and ~id~ links for
@@ -672,7 +691,6 @@ To easily insert ~roam~ links, one may wish to use a package like [[https://gith
harder to edit. Defaults to ~t~.
* Navigating Around
** Index File
As your collection grows, you might want to create an index where you keep links

View File

@@ -111,6 +111,7 @@ Concepts and Configuration
* Directories and Files::
* The Org-roam Buffer::
* Org-roam Files::
* Org-roam Faces::
Navigating Around
@@ -783,6 +784,7 @@ All of Org-roam's customization options can be viewed via
* Directories and Files::
* The Org-roam Buffer::
* Org-roam Files::
* Org-roam Faces::
@end menu
@node Directories and Files
@@ -858,6 +860,29 @@ For example one can prevent the window from being deleted when calling
Org-roam files are created and prefilled using Org-roam's templating
system. The templating system is customizable (see @ref{The Templating System}).
@node Org-roam Faces
@section Org-roam Faces
Org-roam introduces several faces to distinguish links within the same buffer.
These faces are enabled by default in Org-roam notes.
@itemize
@item
User Option: org-roam-link-use-custom-faces
When @code{t}, use custom faces only inside Org-roam notes.
When @code{everywhere}, the custom face is applied additionally to non Org-roam notes.
When @code{nil}, do not use Org-roam's custom faces.
@end itemize
The @code{org-roam-link} face is the face applied to links to other Org-roam files.
This distinguishes internal links from external links (e.g. external web links).
The @code{org-roam-link-current} face corresponds to links to the same file it is in.
The @code{org-roam-link-invalid} face is applied to links that are broken. These are
links to files or IDs that cannot be found.
@node Inserting Links
@chapter Inserting Links