mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
* (docs): fix examples for .dir-locals.el Two items: 1. The current example does not work; in order to call a function wihtin `.dir-locals.el`, you should use `eval`. - [StackExchange](https://emacs.stackexchange.com/questions/21955/calling-functions-in-dir-locals-in-emacs) - [Working example buried in an issue](https://github.com/org-roam/org-roam/issues/1527#issuecomment-933674233)) - `(info "(emacs)Directory Variables")` 2. Add clear instruction to use an absolute path to define `org-roam-directory` in this context (it's buried in this [issue](https://github.com/org-roam/org-roam/issues/1459#issuecomment-817259656). * (docs)Fix the `eval` example for subdirectories. Comment: https://github.com/org-roam/org-roam/pull/2002#issuecomment-991830879 The eval form that uses relative path sets the local variable *relative to the org file*. This means the eval form woudl need to locate the relevant `.dir-locals` file by traversing the directory tree upwards from the file (lightly tested to wrok) Using absolute path (the first example) should be fine without change (not tested) * update texi * (docs) minor correction to #2002 Correcting the example of .dir-locals using an absolute path to avoid confusion. Lightly tested with a real absolute path in my system; works on my end with a subdir. Co-authored-by: Jethro Kuan <jethrokuan95@gmail.com>
This commit is contained in:
@ -1382,7 +1382,7 @@ variable using directory-local variables. This is what ~.dir-locals.el~ may
|
|||||||
contain:
|
contain:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
((nil . ((org-roam-directory . "/path/to/alt/org-roam/dir/org-roam-dir")
|
((nil . ((org-roam-directory . "/path/to/alt/org-roam-dir")
|
||||||
(org-roam-db-location . "/path/to/alt/org-roam-dir/org-roam.db"))))
|
(org-roam-db-location . "/path/to/alt/org-roam-dir/org-roam.db"))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -1935,7 +1935,7 @@ variable using directory-local variables. This is what @code{.dir-locals.el} may
|
|||||||
contain:
|
contain:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
((nil . ((org-roam-directory . "/path/to/alt/org-roam/dir/org-roam-dir")
|
((nil . ((org-roam-directory . "/path/to/alt/org-roam-dir")
|
||||||
(org-roam-db-location . "/path/to/alt/org-roam-dir/org-roam.db"))))
|
(org-roam-db-location . "/path/to/alt/org-roam-dir/org-roam.db"))))
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user