Helm: Switching new windows now creates a new window instead of switching to existing other window

Created on 19 Sep 2017  路  3Comments  路  Source: emacs-helm/helm

Expected behavior

From a frame with at least 2 windows (excluding minibuffer,) invoking helm-enabled buffer or file lists (helm-find-files, helm-mini, helm-buffers, helm-projectile among those I tested) and selecting a candidate buffer to open with helm-buffer-switch-other-window ([f2] or C-c o) should show the selected buffer in an existing other window, relative from the window where the buffer list was invoked.

From a frame with only a single window (excluding minibuffer,) helm-buffer-switch-other-window should create a new window for placing the other buffer.

Actual behavior from emacs-helm.sh if possible (See note at bottom)

For the case of a frame with 2 windows, helm-buffer-switch-other-window creates an entirely new window, resulting in 3 windows open.

For the case of a frame with 1 window, the result of creating a new window is as expected.

Steps to reproduce (recipe)

  1. ./emacs-helm.sh
  2. helm-buffers-list (C-x C-b)
  3. Cursor is on *Messages*, open using C-c o; frame is now 2 windows
  4. helm-buffers-list once more; cursor is on *scratch*; open using C-c o
  5. New window opens for *scratch*, resulting in two windows showing the same buffer, plus one for `Messages

Backtraces if some (M-x toggle-debug-on-error)

None seen.

Describe versions of helm, emacs, operating system etc.

helm-20170918.1154 (MELPA), Emacs 25.3, Slackware 14.2-current

IMPORTANT NOTE:

If you are using a Unix or GNU-Linux system there is no excuses
to not use emacs-helm.sh to reproduce your bug in 99% of the cases.

Most helpful comment

Zak B. Elep notifications@github.com writes:

Expected behavior

From a frame with at least 2 windows (excluding minibuffer,) invoking
helm-enabled buffer or file lists (helm-find-files, helm-mini,
helm-buffers, helm-projectile among those I tested) and selecting a
candidate buffer to open with helm-buffer-switch-other-window ([f2] or
C-c o) should show the selected buffer in an existing other window,
relative from the window where the buffer list was invoked.

Should be fixed now.

Thanks.

--
Thierry

All 3 comments

Zak B. Elep notifications@github.com writes:

Expected behavior

From a frame with at least 2 windows (excluding minibuffer,) invoking
helm-enabled buffer or file lists (helm-find-files, helm-mini,
helm-buffers, helm-projectile among those I tested) and selecting a
candidate buffer to open with helm-buffer-switch-other-window ([f2] or
C-c o) should show the selected buffer in an existing other window,
relative from the window where the buffer list was invoked.

Should be fixed now.

Thanks.

--
Thierry

Can confirm! Thanks @thierryvolpiatto! :tada:

I noticed that helm-buffer-switch-to-other-window doesn't use display-buffer routines and hence do not honor split-window-preferred-function customization. This suprises me a bit as I now need to add a prefix arg to C-c o in order for me to open a new window in my preferred setup.

Let me know if this is something I can post in a new issue for your reference.

Was this page helpful?
0 / 5 - 0 ratings