org-roam-ui icon indicating copy to clipboard operation
org-roam-ui copied to clipboard

Error in readme instructions

Open PreciousPudding opened this issue 4 years ago • 2 comments

The instructions recommend to add org-roam-ui-mode to the org-roam-mode hook. However, this causes errors when using the org-roam buffer. It will call org-roam-ui-mode every time you switch to the org-roam-buffer, echoing an error and causing the contents of the org-roam buffer to be erased.

I think the hook should be changed to after-init-hook instead.

PreciousPudding avatar Aug 02 '21 08:08 PreciousPudding

Ahhh yes I totally forgot that org-roam does not use the org-roam mode anymore, that has been changed to the mode for the buffer. I would not want to put the after-init-hook recommendation in the readme, as that will hinder startup times quite a bit, but I'm not sure what a good alternative is, as it does not appear that org-roam-setup is hookable. For now I'll just remove the reference to the hook.

tefkah avatar Aug 02 '21 08:08 tefkah

How about with-eval-after-load 'org or with-eval-after-load 'org-roam?

Along the line of something like this?

(with-eval-after-load 'org
    (setq org-roam-v2-ack t)
    ....
    (org-roam-setup)
    (org-roam-ui-mode))

nobiot avatar Aug 02 '21 10:08 nobiot