fix(org): doom-module links opening private modules
A doom-module: link should only refer to built-in modules, not user-provided ones in $DOOMDIR/modules.
This commit is contained in:
parent
5df31a4895
commit
130c6e90d5
1 changed files with 6 additions and 5 deletions
|
@ -187,11 +187,12 @@ exist, and `org-link' otherwise."
|
|||
(cl-destructuring-bind (&key category module flag)
|
||||
(+org-link--doom-module--read-link link)
|
||||
(when category
|
||||
(if-let* ((path (doom-module-locate-path category module))
|
||||
(path (or (car (doom-glob path "README.org"))
|
||||
path)))
|
||||
(find-file path)
|
||||
(user-error "Can't find Doom module '%s'" link)))
|
||||
(let ((doom-modules-dirs (list doom-modules-dir)))
|
||||
(if-let* ((path (doom-module-locate-path category module))
|
||||
(path (or (car (doom-glob path "README.org"))
|
||||
path)))
|
||||
(find-file path)
|
||||
(user-error "Can't find Doom module '%s'" link))))
|
||||
(when flag
|
||||
(goto-char (point-min))
|
||||
(and (re-search-forward "^\\*+ \\(?:TODO \\)?Module Flags")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue