remove check for org-mode in maybe-update-buffer

Some packages like org-journal define their own major mode. In
addition, the checks that the files are part of the org-roam ecosystem
should be sufficient.
This commit is contained in:
Jethro Kuan
2020-02-07 13:06:54 +08:00
parent c66b8a7c2c
commit e544323499

View File

@@ -309,8 +309,7 @@ Valid states are 'visible, 'exists and 'none."
This needs to be quick/infrequent, because this is run at
`post-command-hook'."
(with-current-buffer (window-buffer)
(when (and (eq major-mode 'org-mode)
(get-buffer org-roam-buffer)
(when (and (get-buffer org-roam-buffer)
(buffer-file-name (window-buffer))
(not (string= org-roam-current-file-id (org-roam--get-id (file-truename (buffer-file-name (window-buffer))))))
(member (file-truename (buffer-file-name (window-buffer))) (org-roam--find-all-files)))