(bugfi): check for buffer file in post-command-hook (#128)

If you delete a org-roam buffer it can still trigger an update. Need to make
sure that their exists a file for the buffer before we proceed
master
Troy Hinckley 6 years ago committed by GitHub
parent edbe34a1d9
commit 2522b9d2fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      org-roam.el

@ -538,7 +538,8 @@ This needs to be quick/infrequent, because this is run at
(let ((buffer (window-buffer)))
(when (and (or redisplay
(not (eq org-roam--current-buffer buffer)))
(eq 'visible (org-roam--current-visibility)))
(eq 'visible (org-roam--current-visibility))
(buffer-local-value 'buffer-file-truename buffer))
(setq org-roam--current-buffer buffer)
(org-roam-update (expand-file-name
(buffer-local-value 'buffer-file-truename buffer))))))

Loading…
Cancel
Save