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

**URL:** <https://org-roam.discourse.group/t/org-roam-v2-backlinks-context-in-org-roam-buffer/1854>\
**Category:** How To\
**Created:** [July 29, 2021, 11:36am UTC](https://org-roam.discourse.group/t/org-roam-v2-backlinks-context-in-org-roam-buffer/1854 "2021-07-29T11:36:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pietervo](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/pietervo/32/848_2.png) [@pietervo](https://org-roam.discourse.group/u/pietervo)\
**Post date:** [July 29, 2021, 11:36am UTC](https://org-roam.discourse.group/t/org-roam-v2-backlinks-context-in-org-roam-buffer/1854/1 "2021-07-29T11:36:00Z")

</div>

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](https://github.com/bc-abe/plain-text-bibles)) 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.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [July 29, 2021, 12:56pm UTC](https://org-roam.discourse.group/t/org-roam-v2-backlinks-context-in-org-roam-buffer/1854/2 "2021-07-29T12:56:55Z")

</div>

The behaviour you report was probably introduced by [this commit](https://github.com/org-roam/org-roam/commit/9c10a3c04c06d1658a63d44927e385e2d97854d6) recently:

> (feat)preview: improve org-roam link preview ([#1655](https://github.com/org-roam/org-roam/pull/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](https://github.com/org-roam/org-roam/blob/a84da59b41842c0982aa68dd94636fdc87307778/org-roam.el#L543-L549))

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…

---

<div class="post-metadata">

**Author:** ![pietervo](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/pietervo/32/848_2.png) [@pietervo](https://org-roam.discourse.group/u/pietervo)\
**Post date:** [July 29, 2021, 1:48pm UTC](https://org-roam.discourse.group/t/org-roam-v2-backlinks-context-in-org-roam-buffer/1854/3 "2021-07-29T13:48:05Z")

</div>

> [@nobiot](#):
>
> The behaviour you report was probably introduced by [this commit](https://github.com/org-roam/org-roam/commit/9c10a3c04c06d1658a63d44927e385e2d97854d6) recently:
> 
> > (feat)preview: improve org-roam link preview ([#1655](https://github.com/org-roam/org-roam/pull/1655))

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.

---

<div class="post-metadata">

**Author:** ![nobiot](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/nobiot/32/159_2.png) [@nobiot](https://org-roam.discourse.group/u/nobiot)\
**Post date:** [July 29, 2021, 2:46pm UTC](https://org-roam.discourse.group/t/org-roam-v2-backlinks-context-in-org-roam-buffer/1854/4 "2021-07-29T14:46:08Z")

</div>

> [@pietervo](#):
>
> 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?

```auto
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)

```

> **[Hitchhiker's Rough Guide to Org roam V2](https://github.com/org-roam/org-roam/wiki/Hitchhiker's-Rough-Guide-to-Org-roam-V2#navigation-in-backlink-buffer)**
>
> Rudimentary Roam replica with Org-mode. Contribute to org-roam/org-roam development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![pietervo](https://yyz2.discourse-cdn.com/free1/user_avatar/org-roam.discourse.group/pietervo/32/848_2.png) [@pietervo](https://org-roam.discourse.group/u/pietervo)\
**Post date:** [July 29, 2021, 3:50pm UTC](https://org-roam.discourse.group/t/org-roam-v2-backlinks-context-in-org-roam-buffer/1854/5 "2021-07-29T15:50:04Z")

</div>

> [@nobiot](#):
>
> `(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.
