Org-roam buffer blocks mini-buffer from expanding vertically

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?

What’s this setting?

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

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

;; 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-" "~/.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
               (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)

I am using the display-buffer-in-side-window setting described at this site 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.

It is a side-window.

1 Like

you’re too quick @nobiot :smile:

it works perfectly!

1 Like

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

the issue seems to originate from (preserve-size . (t nil)). More here. 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.

Thank you. Interesting — the whole window management somehow intrigues me :slight_smile: 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…