# Need to refresh every time I open the roam buffer (Spacemacs)

**URL:** <https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204>\
**Category:** Troubleshooting\
**Created:** [November 10, 2021, 10:02am UTC](https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204 "2021-11-10T10:02:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lazzalazza](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@lazzalazza](https://org-roam.discourse.group/u/lazzalazza)\
**Post date:** [November 10, 2021, 10:02am UTC](https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204/1 "2021-11-10T10:02:27Z")

</div>

Hi! I’m using Spacemacs and the latest version of org-roam (2.1.0). Every time I open the org-roam backlink buffer I have to refresh it for it to work (otherwise I get the usuale “There is nothing at point that could be visited”). This issue was already taken note of on Github ([clicking on any link within \*org-roam\* buffer fails with an error message · Issue #1732 · org-roam/org-roam · GitHub](https://github.com/org-roam/org-roam/issues/1732)): the solution suggested there was to disable global-page-break-lines-mode, but that doesn’t do anything…

---

<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:** [November 10, 2021, 11:05am UTC](https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204/2 "2021-11-10T11:05:04Z")

</div>

There is a [pull request](https://github.com/org-roam/org-roam/pull/1943) that aims to fix a similar Spacemacs issue (it appears to me the same issue but can’t be sure). How about trying the commit in the PR and help it move forward?

---

<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:** [November 10, 2021, 12:03pm UTC](https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204/3 "2021-11-10T12:03:29Z")

</div>

… Alternatively,

Look at customizing variable `page-break-lines-modes`. If you see `outline-mode` as an element of the list, remove it from customizing.

 ![Screenshot from 2021-11-10 12-50-47](https://global.discourse-cdn.com/free1/uploads/orgroam/original/2X/4/42ba9082eced62e0ed61912efc4c57a64758043f.png)

I can reproduce the issue by activating `global-page-break-lines-mode` even without Spacemacs. So to me it’s very likely the root cause is some interaction between `page-break-lines-mode` and `org-roam-mode` for the backlink window.

Can you check if this works on your end by removing `outline-mode` from the list, and test? For testing, you could do `(setq page-break-lines-modes nil)` and see if that changes anything.

If this does not do anything, it may be that your issue is a new, unknown one.

---

<div class="post-metadata">

**Author:** ![lazzalazza](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@lazzalazza](https://org-roam.discourse.group/u/lazzalazza)\
**Post date:** [November 10, 2021, 3:00pm UTC](https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204/4 "2021-11-10T15:00:08Z")

</div>

Dear nobiot,  
thank you so much for the solutions and for the great work you put in this amazin project: huge fan!

As for the second solution you suggested, I had already tried deactivating global-page-brake-lines-mode and it didn’t work. Neither disabling outline-mode nor page-break-lines-mode worked.

On the other hand, **the pull request worked like a charm**!!! The problem is solved and I hope the changes will be committed soon in the main branch.

Again, thanks a lot!

Andrea

---

<div class="post-metadata">

**Author:** ![lazzalazza](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@lazzalazza](https://org-roam.discourse.group/u/lazzalazza)\
**Post date:** [November 10, 2021, 3:04pm UTC](https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204/5 "2021-11-10T15:04:04Z")

</div>

Mmmh… Errata corrige: the **pull request** intially works, but if I press q to quit the roam buffer, **org-roam-toggle-buffer won’t reactivate**!

---

<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:** [November 10, 2021, 4:02pm UTC](https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204/6 "2021-11-10T16:02:43Z")

</div>

For the solution I’m suggesting here, global-page-break-mode is **on**.

Also ensure `outline-mode` is removed from the customizing variable **before** opening any org-roam-buffer.

If this is not going to work, Spacemacs community may have to dig deeper. Doom falks don’t seem to have it. I’m on vanilla with no issues.

And… thank you for your kind words 🙂 Much appreciated.

---

<div class="post-metadata">

**Author:** ![lazzalazza](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@lazzalazza](https://org-roam.discourse.group/u/lazzalazza)\
**Post date:** [November 10, 2021, 4:13pm UTC](https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204/7 "2021-11-10T16:13:35Z")

</div>

I’ve done all that… but **it still doesn’t reopen the buffer after the first quitting from the org-roam buffer**. (Thank you again, and I can’t stress this enough, for the amazing things you create!!!)

---

<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:** [November 10, 2021, 5:00pm UTC](https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204/8 "2021-11-10T17:00:18Z")

</div>

Okay, so… I have installed Spacemacs, and confirm that the issue can be reproduced.

I seem to be able to fix it by doing this in `dotspacemacs/user-config` part of the `.spacemacs` file.

 ![Screenshot from 2021-11-10 17-54-40](https://global.discourse-cdn.com/free1/uploads/orgroam/original/2X/a/a3f9b47fc32c97547c2726f9be419f59f70ff277.png)

I had to add the first part to get rid of an Evil issue ([evil-redirect-digit-argument](https://github.com/Somelauw/evil-org-mode/issues/93))

I don’t have to refresh the `org-roam-buffer` and get the correct display order in the first instance. I can press the `Return` key on a backlink to navigate as I expect.

 ![Screenshot from 2021-11-10 17-53-45](https://global.discourse-cdn.com/free1/uploads/orgroam/original/2X/5/5b8ee274bfd82c8ae73687dbb46b1f37d00645a1.png)

I am not used to Spacemacs and it’s hard for me to use it; I can only hope what I did is correct for Spacemacs.

---

<div class="post-metadata">

**Author:** ![lazzalazza](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@lazzalazza](https://org-roam.discourse.group/u/lazzalazza)\
**Post date:** [November 10, 2021, 5:37pm UTC](https://org-roam.discourse.group/t/need-to-refresh-every-time-i-open-the-roam-buffer-spacemacs/2204/9 "2021-11-10T17:37:14Z")

</div>

Put this in my .spacemacs configuration as you suggested (I’m transcribing it here so people might copy that directly):

(fset 'evil-redirect-digit-argument 'ignore)  
(add-to-list 'evil-digit-bound-motions 'evil-org-beginning-of-line)  
(evil-define-key 'motion 'evil-org-mode (kbd “0”) 'evil-org-beginning-of-line)  
(global-page-break-lines-mode -1)

Unfortunately this didn’t work for me. So I went back to the **pull request** and managed to get the whole thing working **by not deleting line 270** :

(display-buffer (get-buffer-create org-roam-buffer))

in the **org-roam-buffer-toggle function**.

So, I guess it’s problem solved for me… Thank you so much.

Andrea
