mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(feat): support file-level IDs (#1163)
Additionally cache IDs at outline-level 0, now that property drawers are supported in Org 9.4. Update org-roam--format-link to prefer ID links wherever possible. That is, when a file has an ID, use an id link instead of file link.
This commit is contained in:
@ -239,7 +239,7 @@
|
||||
:to-equal
|
||||
'("t1" "t2 with space" "t3" "tags"))))))
|
||||
|
||||
(describe "Headline extraction"
|
||||
(describe "ID extraction"
|
||||
(before-all
|
||||
(test-org-roam--init))
|
||||
|
||||
@ -252,12 +252,12 @@
|
||||
(buf (find-file-noselect fname)))
|
||||
(with-current-buffer buf
|
||||
(funcall fn fname)))))
|
||||
(it "extracts headlines"
|
||||
(expect (test #'org-roam--extract-headlines
|
||||
(it "extracts ids"
|
||||
(expect (test #'org-roam--extract-ids
|
||||
"headlines/headline.org")
|
||||
:to-have-same-items-as
|
||||
`(["e84d0630-efad-4017-9059-5ef917908823" ,(test-org-roam--abs-path "headlines/headline.org")]
|
||||
["801b58eb-97e2-435f-a33e-ff59a2f0c213" ,(test-org-roam--abs-path "headlines/headline.org")])))))
|
||||
`(["e84d0630-efad-4017-9059-5ef917908823" ,(test-org-roam--abs-path "headlines/headline.org") 1]
|
||||
["801b58eb-97e2-435f-a33e-ff59a2f0c213" ,(test-org-roam--abs-path "headlines/headline.org") 1])))))
|
||||
|
||||
(describe "Test roam links"
|
||||
(it ""
|
||||
|
Reference in New Issue
Block a user