mirror of
https://github.com/org-roam/org-roam
synced 2025-09-16 15:56:48 -05:00
(fix): fix backlinks in org-roam buffer (#1099)
previously when the file is a symbolic link, the backlinks buffer display will not show correctly.
This commit is contained in:
@@ -110,7 +110,7 @@ For example: (setq org-roam-buffer-window-parameters '((no-other-window . t)))"
|
|||||||
(defun org-roam-buffer--insert-title ()
|
(defun org-roam-buffer--insert-title ()
|
||||||
"Insert the org-roam-buffer title."
|
"Insert the org-roam-buffer title."
|
||||||
(insert (propertize (org-roam--get-title-or-slug
|
(insert (propertize (org-roam--get-title-or-slug
|
||||||
(buffer-file-name org-roam-buffer--current))
|
(file-truename (buffer-file-name org-roam-buffer--current)))
|
||||||
'font-lock-face
|
'font-lock-face
|
||||||
'org-document-title)))
|
'org-document-title)))
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ For example: (setq org-roam-buffer-window-parameters '((no-other-window . t)))"
|
|||||||
|
|
||||||
(defun org-roam-buffer--insert-backlinks ()
|
(defun org-roam-buffer--insert-backlinks ()
|
||||||
"Insert the org-roam-buffer backlinks string for the current buffer."
|
"Insert the org-roam-buffer backlinks string for the current buffer."
|
||||||
(if-let* ((file-path (buffer-file-name org-roam-buffer--current))
|
(if-let* ((file-path (file-truename (buffer-file-name org-roam-buffer--current)))
|
||||||
(titles (with-current-buffer org-roam-buffer--current
|
(titles (with-current-buffer org-roam-buffer--current
|
||||||
(org-roam--extract-titles)))
|
(org-roam--extract-titles)))
|
||||||
(backlinks (org-roam--get-backlinks (push file-path titles)))
|
(backlinks (org-roam--get-backlinks (push file-path titles)))
|
||||||
|
Reference in New Issue
Block a user