(fix): fix fuzzy-links opening for file (#1023)
This commit is contained in:
parent
0ed9057a87
commit
8c442a72de
1 changed files with 6 additions and 7 deletions
|
@ -1304,15 +1304,14 @@ Three types of fuzzy links are supported:
|
|||
(org-roam--org-roam-file-p))
|
||||
(when-let ((location (org-roam--get-fuzzy-link-location link)))
|
||||
(pcase-let ((`(,link-type ,loc ,desc ,mkr) location))
|
||||
(when (and (not loc)
|
||||
(string-equal link-type "file"))
|
||||
(org-roam-find-file desc nil nil t))
|
||||
(when (and org-roam-auto-replace-fuzzy-links
|
||||
loc desc)
|
||||
(org-roam-replace-fuzzy-link (concat link-type ":" loc) desc))
|
||||
(pcase link-type
|
||||
("file"
|
||||
(org-roam--find-file loc))
|
||||
(if loc
|
||||
(org-roam--find-file loc)
|
||||
(org-roam-find-file desc nil nil t)))
|
||||
("id"
|
||||
(org-goto-marker-or-bmk mkr)))))
|
||||
t))
|
||||
|
|
Loading…
Reference in a new issue