Org-roam v2 backlinks context in *org-roam* buffer

I am just starting with org-roam (and org-mode by the way). I am using Abe Peter’s system for Bible study with org-roam (GitHub - bc-abe/plain-text-bibles: Plain text bibles of KJV and WEB versions for .md and .org) and converted the files to org-roam v2.
Each Bible chapter is a separate org-roam file, and the verses are an enumerated list.
In version 1 when I made a link to another file in a verse, the backlink in the org-roam buffer would show the verse (basically the line) in which the link was, which is very neat.
However, in version 2 the org-roam buffer shows the whole node that contains the link, which in this case is the whole file. This isn’t very useful to me. You can only switch between hiding and showing the whole node.

Is there a way to restrict the context of the link to just the line in which it appears, like in version 1? I couldn’t find a setting for this, and neither did I see a possibility in the code.

The behaviour you report was probably introduced by this commit recently:

(feat)preview: improve org-roam link preview (#1655)

  1. If it the link is at a headline, it shows the headline’s content instead of just repeating the headline
  2. If the link is a bullet item in the plain-list, show the full list instead

I do not see any option to change this standard behaviour.

By the looks of the org files you cite, each Bible chapter is a separate Org file and starts with a headline AND it’s an ordered list (probably considered as “plain-list” by Org element parser) – meeting both of the conditions above.

I see two options:

  • file a feature request to enable a different behaviour
  • locally override function org-roam-get-preview (probably this part)

Edit:
Alternatively, when you create a link to a verse (I don’t know how you go about it with Org-ID), you could remove the number so that the verse becomes a paragraph (rather than part of a plain list) – this might get what you would like…

Yes, it seems like that is the cause. I’ll try to make my own version of org-roam-get-preview, probably with some variables to choose the behaviour. And if I’m satisfied I might submit it as a PR.

I also noticed another change: it is no longer possible to click in the *org-roam* buffer to go to the original file that contains the link. I think this is a serious omission.

This?

Navigation in the backlink buffer is intuitive (use RET, C-u RET).

For mouse users, to add back mouse click to visit the node in the backlink buffer:

(define-key org-roam-mode-map [mouse-1] #'org-roam-visit-thing)

Thanks, that helps. I had that in my v1 setup (with org-roam-mode-map obtained indirectly), together with a number of other key bindings, but the latter didn’t work any longer in v2, so I put everything in org-mode-map. And then the mouse click no longer worked.