mirror of
https://github.com/org-roam/org-roam
synced 2025-08-03 12:27:23 -05:00
prevent update when no backlinks
This commit is contained in:
@ -170,6 +170,7 @@ Valid states are 'visible, 'exists and 'none."
|
||||
(defun org-roam-update (file)
|
||||
"Show the backlinks for given org file `FILE'."
|
||||
(unless (string= org-roam-current-file file)
|
||||
(when org-roam-hash-backlinks
|
||||
(let ((backlinks (gethash file org-roam-hash-backlinks)))
|
||||
(with-current-buffer org-roam-buffer
|
||||
(read-only-mode -1)
|
||||
@ -184,8 +185,8 @@ Valid states are 'visible, 'exists and 'none."
|
||||
(dolist (content contents)
|
||||
(insert (format "\n\n%s\n\n" content))))
|
||||
backlinks))
|
||||
(read-only-mode +1))))
|
||||
(setq org-roam-current-file file))
|
||||
(read-only-mode +1)))
|
||||
(setq org-roam-current-file file))))
|
||||
|
||||
(defun org-roam ()
|
||||
"Initialize `org-roam'.
|
||||
|
Reference in New Issue
Block a user