# Org-roam buffer blocks mini-buffer from expanding vertically

**URL:** https://org-roam.discourse.group/t/org-roam-buffer-blocks-mini-buffer-from-expanding-vertically/2366
**Category:** How To
**Created:** [January 14, 2022, 4:28pm UTC](https://org-roam.discourse.group/t/org-roam-buffer-blocks-mini-buffer-from-expanding-vertically/2366 "2022-01-14T16:28:13Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![midas](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@midas](https://org-roam.discourse.group/u/midas)
#### Post date: [January 14, 2022, 4:28pm UTC](https://org-roam.discourse.group/t/org-roam-buffer-blocks-mini-buffer-from-expanding-vertically/2366/1 "2022-01-14T16:28:13Z")

</div>

I use `selectrum` for incremental narrowing and displaying hits. This comes in handy with `org-roam-node-find`, for example.

The problem, however, is that when my org-roam backlinks buffer is open (I have it in a dedicated window on the right), it impedes search hits from displaying in the mini buffer.

I think the issue stems from a setting that refuses or blocks org-roam backlinks buffer from vertical re-sizing.

Do others have this issue, and is there a (hopefully simple) way to fix?

---

<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: [January 14, 2022, 5:18pm UTC](https://org-roam.discourse.group/t/org-roam-buffer-blocks-mini-buffer-from-expanding-vertically/2366/2 "2022-01-14T17:18:49Z")

</div>

> [@midas](#):
>
> I think the issue stems from a setting that refuses or blocks org-roam backlinks buffer from vertical re-sizing.

What’s this setting?

I don’t seem to be able to reproduce the problem.

 ![Screenshot from 2022-01-14 18-14-56](https://global.discourse-cdn.com/free1/uploads/orgroam/original/2X/5/52de2c311dcd5b37125e641fc3cd9c7ef7732029.png)

The image is from vanilla Emacs with only the following script to load selectrum, org-roam, and org-transclusion.

`(setq window-sides-vertical nil)` or `(setq window-sides-vertical t)` does not change the behaviour of selectrum.

`emacs -Q -l ./add-load-path.el`

```elisp
;; cd path/to/dir
;; emacs -Q -l ./add-load-path.el
;; Org version: 9.5

(add-to-list 'load-path (expand-file-name "org-roam-20220102.603" "~/.config/emacs/elpa"))
(add-to-list 'load-path (expand-file-name "f-20210624.1103" "~/.config/emacs/elpa"))
(add-to-list 'load-path (expand-file-name "s-20210616.619" "~/.config/emacs/elpa"))
(add-to-list 'load-path (expand-file-name "dash-20210826.1149" "~/.config/emacs/elpa"))
(add-to-list 'load-path (expand-file-name "magit-section-20220101.841" "~/.config/emacs/elpa"))
(add-to-list 'load-path (expand-file-name "emacsql-20220101.1820" "~/.config/emacs/elpa"))
(add-to-list 'load-path (expand-file-name "emacsql-sqlite-20220101.1820" "~/.config/emacs/elpa"))
(add-to-list 'load-path (expand-file-name "org-transclusion-1.1.1.0.20220108.205254" "~/.config/emacs/elpa"))

(add-to-list 'load-path "~/.config/emacs/elpa/selectrum-20220114.106/")
(require 'selectrum)
(selectrum-mode +1)

(require 'org-roam)
(require 'org-transclusion)

(setq org-roam-directory (file-truename "~/src/org-roam-transclusion-test"))
(setq org-roam-db-location "~/src/org-roam-transclusion-test/org-roam.db")
(setq org-id-locations-file "~/src/org-roam-transclusion-test/.org-id-locations")

(add-to-list 'display-buffer-alist
             '("\*org-roam\*"
               (display-buffer-in-side-window)
               (window-width . 0.25)
               (side . right)
               (dedicated . t)))

(setq window-sides-vertical nil)

;;; Org-roam
(define-key global-map (kbd "C-c n /") #'org-roam-node-find)
(define-key global-map (kbd "C-c n c") #'org-roam-capture)
(define-key global-map (kbd "C-c n i") #'org-roam-node-insert)
(define-key global-map (kbd "C-c n l") #'org-roam-buffer-toggle)

;;; Org-transclusion
(define-key global-map (kbd "<f12>") #'org-transclusion-add)
(define-key global-map (kbd "S-<f12>") #'org-transclusion-mode)

(org-roam-db-autosync-mode 1)

```

---

<div class="post-metadata">

### Author: ![midas](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@midas](https://org-roam.discourse.group/u/midas)
#### Post date: [January 14, 2022, 5:44pm UTC](https://org-roam.discourse.group/t/org-roam-buffer-blocks-mini-buffer-from-expanding-vertically/2366/3 "2022-01-14T17:44:41Z")

</div>

I am using the `display-buffer-in-side-window` setting described at [this site](https://github.com/org-roam/org-roam/wiki/Hitchhiker's-Rough-Guide-to-Org-roam-V2) under the heading `Backlink Buffer`.

When I switch to `display-buffer-in-direction`, there is no problem with expanding the mini-buffer to see candidate choices: the behavior is as you show in your example.

`display-buffer-in-side-window` has some advantages in a multi-window frame. For example, when org-roam buffer is invoked, a new window is created all the way to the right side of the _frame_, not immediately adjacent to the current window. There are some other appealing behaviors to side-windows. BUT, the inability to see candidate list in the mini-buffer when narrowing is a major downside.

It would be nice to get the side-window version of org-roam buffer working.

---

<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: [January 14, 2022, 5:47pm UTC](https://org-roam.discourse.group/t/org-roam-buffer-blocks-mini-buffer-from-expanding-vertically/2366/4 "2022-01-14T17:47:37Z")

</div>

> [@nobiot](#):
>
> ```auto
> (add-to-list 'display-buffer-alist
> '("\*org-roam\*"
> (display-buffer-in-side-window)
> (window-width . 0.25)
> (side . right)
> (dedicated . t)))
> 
> ```

It is a side-window.

---

<div class="post-metadata">

### Author: ![midas](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@midas](https://org-roam.discourse.group/u/midas)
#### Post date: [January 14, 2022, 5:51pm UTC](https://org-roam.discourse.group/t/org-roam-buffer-blocks-mini-buffer-from-expanding-vertically/2366/5 "2022-01-14T17:51:24Z")

</div>

you’re too quick @nobiot 😄

it works perfectly!

---

<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: [January 14, 2022, 5:57pm UTC](https://org-roam.discourse.group/t/org-roam-buffer-blocks-mini-buffer-from-expanding-vertically/2366/6 "2022-01-14T17:57:55Z")

</div>

Do you know which parameter in the wiki caused your problem?

---

<div class="post-metadata">

### Author: ![midas](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@midas](https://org-roam.discourse.group/u/midas)
#### Post date: [January 15, 2022, 12:25pm UTC](https://org-roam.discourse.group/t/org-roam-buffer-blocks-mini-buffer-from-expanding-vertically/2366/7 "2022-01-15T12:25:41Z")

</div>

the issue seems to originate from `(preserve-size . (t nil))`. More [here](https://www.gnu.org/software/emacs/manual/html_node/elisp/Preserving-Window-Sizes.html). I might down the road fine-tune this setting a bit more to address some persistent undesirable behavior (e.g., when using `balance-windows`). For now, this is a relatively low-level annoyance, with your suggestion addressing the main issue. If I have new info I will post.

---

<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: [January 15, 2022, 12:41pm UTC](https://org-roam.discourse.group/t/org-roam-buffer-blocks-mini-buffer-from-expanding-vertically/2366/8 "2022-01-15T12:41:51Z")

</div>

Thank you. Interesting — the whole window management somehow intrigues me 🙂 I’ll also see what balance-windows behave on my end. I’m playing with toggle side-window (the exact name eludes me). I might send a patch to upstream once I know more…
