jgru/consult-org-roam

consult-buffer doesn't show capture buffers

Closed this issue · 4 comments

With consult-org-roam enabled, capture buffers are no longer listed with consult-buffer. They are visible with switch-to-buffer or when I disable this package.

And not sure if this is related to this bug or even related to this package, or more Consult / Marginalia related, but an error appears when I press the narrow button for the org-roam category while having a capture open (wrong-type-argument stringp nil).

Backtrace

jgru commented

Hi @bram85,

thank you for reporting this issue. I think this is related of how consult-org-roam-buffer deals with org-roam-buffers that have not been written to the roam-db yet. I expect the error to happen somewhere around here

(defun consult-org-roam-buffer--get-title (buffer)
"Get title of org-roam BUFFER."
(if (org-roam-buffer-p buffer)
(let* ((title
(with-current-buffer buffer
(org-roam-db--file-title)))
(filename (buffer-file-name buffer))
(fhash (consult-org-roam-db--file-hash filename)))

Best regards,
jgru

jgru commented

Hi @bram85,

commit 1167832 should fix the issue. Could you please this and confirm that these changes resolve the bug for you?

I propose to use the following use-package snippet to pull head of main:

(use-package consult-org-roam
   :straight (:host github :repo "jgru/consult-org-roam")
   :after org-roam
   :init
   (require 'consult-org-roam)
   (consult-org-roam-mode 1)))

Best regards,
jgru

Nice, it works. Thank you 🙂

jgru commented

Nice, it works. Thank you slightly_smiling_face

Good to hear. You are welcome. Happy that you use this package.