From 082d44bd397807492c7f0ebf65a0ccf6b12baba8 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 27 May 2024 15:51:23 -0700 Subject: Update showing backlinks to work for Org Roam v2 This doesn't include backlinks from nodes within the same file. I've intentionally excluded these since they should be visible within the same file anyway. This is only for file nodes, doesn't include anything for headline nodes. If I get to adding backlinks for headline nodes as well I should show backlinks from headlines in the same file as well. - ‘org-roam--get-backlinks’ has been removed and is now replaced by ‘org-roam-backlinks-get’. The new function returns a list of ‘org-roam-backlink’ objects, which is different from what was returned before. - ‘org-roam-format-link’ has been removed. This was just a small wrapper around ‘org-link-make-string’. For now I've hard-coded the ‘file:’ link type since it's easy, but in the future this should probably use the org id instead so that it doesn't just go to the right file, but also the right heading. The line number could also be added. - In ‘nroam-backlinks--insert-backlink’ the ‘backlink’ argument is now an ‘org-roam-backlink’ object, not a string and a property list. - ‘nroam--fix-links’ has been removed for now since generally in org-roam v2 everything uses ‘id:’ links that are completely independent of where their source (or target) file are located. --- nroam-utils.el | 5 ----- 1 file changed, 5 deletions(-) (limited to 'nroam-utils.el') diff --git a/nroam-utils.el b/nroam-utils.el index 737691b..a3154fe 100644 --- a/nroam-utils.el +++ b/nroam-utils.el @@ -55,10 +55,5 @@ Insert a single newline between each call to FUNCTION." (funcall function item)) sequence)) -(defun nroam--fix-links (content origin) - "Correct all relative links in CONTENT from ORIGIN. -Temporary fix until `org-roam' v2 is out." - (org-roam-buffer-expand-links content origin)) - (provide 'nroam-utils) ;;; nroam-utils.el ends here -- cgit v1.2.3-54-g00ecf