Backlinks in *org-roam* buffer

Hello, I just started using Org-roam V1 (simply installed from Debian GNU/Linux repo) without knowing V2 has been released… Since V2 is in active development, I switched to V2 (org-roam package including dependencies installed from MELPA).

In V1 the backlinks in the org-roam buffer were active links which navigate the user to the files which contain the forward links. Very convenient behavior. However, in my V2 setup, the backlinks are no active links, they are just text, i.e. filename in bold white characters followed by “(Top)”. I can’t imagine this is expected behavior in V2… Do I miss something?

I uploaded V1 and V2 screenshots.

This is my setup:

  • Emacs 27.1
  • Org-mode 9.4.6
  • Org-rom 2.0.0

Screenshot V1:

Screenshot V2:

Use enter key to navigate to the node at point.
If you would like a mouse click to work, refer to this part of the wiki.

Thanks a lot for your prompt answer nobiot.
I did not know it was that simple…

1 Like

Hmm… when I run org-roam-buffer-visit-thing in the org-roam buffer I always get “There is no thing at point that could be visited”, even though the point is on a node name that I can find just fine with “org-roam-node-find”.

How do you do this? M-x?
RET is re-mapped to a different command via various maps depending on where in the org-roam buffer your point is.

I use Spacemacs, so RET is “evilified”, but C-RET has org-roam-buffer-visit-thing bound to it and should work but doesn’t. Just in case, I also tried to just invoke it M-x with the same results.

I see. I don’t know how Spacemacs works. No problem on my Emacs with no framework.

Hi nobiot, Enter key works perfectly indeed (navigates to node at point). I’m still struggling with getting the mouse to work. I followed the instructions you referred to, but get “There is no thing at point that could be visited” message in minibuffer when clicking the backlink in the org-roam buffer. My Emacs is also without framework. Do you have any suggestions? Thanks!

… So the quickest way would be to check C-h k RET and what command RET is remapped to. I don’t like the behaviour of mouse click (hovering over the region does not give you any clue) but see the following.

(define-key org-roam-node-map [mouse-1] #'org-roam-node-visit)
(define-key org-roam-preview-map [mouse-1] #'org-roam-preview-visit)

@jbotz You might like to try these in Spacemacs – it might be the sequence of when the remapping happens in your init and loading of org-roam that causes your issue.

1 Like

This solved the issue; mouse click works now. Thank you nobiot!

1 Like

@aschokker Would you mind updating the section of the wiki? I believe you would not be the only one who benefits from it.

Sure, I’m not experienced in this matter, but I will give it a try!

Thank you. You should be able to do it directly on the website on your browser….

The spacemacs issue is actually about more than just keymaps… the format of the org-roam backlink buffer is all screwed up, things appear out of sequence, the “Backlinks (n)” heading appears on the second-to-last line, etc. That might explain the missing keybindings since those depend on magit-section. I tried both a plain emacs and a fresh spacemacs install to confirm that it isn’t anything in my personal spacemacs config that’s screwing it up, and it isn’t, same thing happens in spacemacs out-of-the-box (well, at least on the devel branch of spacemacs, which is pre-configured for org-roam v2).

I haven’t yet figured out what’s going on because I still don’t understand the code in org-roam-mode.el (especially that magit-sections magic) but I’m getting there… :wink: Once I do, I’ll post here again.

1 Like

There is a few threads on this very topic and a PR created. I can’t find links for you but a solution/workaround has been identified. I’d suggest to search. Probably “spacemacs” as a search term will help.

PR request for spacemacs or for org-roam? Didn’t find anything relevant in either…

Topic is here I believe - Backlinks title not at top of buffer - #6 by swang251 along with a link to a workaround, although it doesn’t look like it has become a PR yet.

Oh yes that’s the one. Thank you. Thought it was turned to a PR; clearly I was mistaken :slight_smile:

So in my case turning off global-page-break-lines-mode did resolve the org-roam buffer problems… both formatting and the keybindings now seem to work as intended. Spacemacs issue#14969 has more info.