mirror of
https://github.com/org-roam/org-roam
synced 2025-09-30 17:00:56 -05:00
(fix): fix refs not showing in backlinks buffer (#1140)
This changes ref extraction to parse the ref using the org plain-links syntax. This works for arbitrary `cite` links, and web links. Link storage and ref lookup is now based on the path (e.g. `//google.com`) or `author_year`.
This commit is contained in:
@@ -126,10 +126,10 @@ For example: (setq org-roam-buffer-window-parameters '((no-other-window . t)))"
|
||||
|
||||
(defun org-roam-buffer--insert-ref-links ()
|
||||
"Insert ref backlinks for the current buffer."
|
||||
(when-let ((ref (cdr (with-temp-buffer
|
||||
(insert-buffer-substring org-roam-buffer--current)
|
||||
(org-roam--extract-ref)))))
|
||||
(if-let* ((key-backlinks (org-roam--get-backlinks ref))
|
||||
(when-let ((path (cdr (with-temp-buffer
|
||||
(insert-buffer-substring org-roam-buffer--current)
|
||||
(org-roam--extract-ref)))))
|
||||
(if-let* ((key-backlinks (org-roam--get-backlinks path))
|
||||
(grouped-backlinks (--group-by (nth 0 it) key-backlinks)))
|
||||
(progn
|
||||
(insert (let ((l (length key-backlinks)))
|
||||
|
Reference in New Issue
Block a user