bmag / emacs-purpose

Manage Windows and Buffers According to Purposes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not compatible with ivy-posframe

yanghaoxie opened this issue · comments

I also open the same issue at ivy-posframe repo.

When all windows of a buffer are dedicated to windows (set by purpose-toggle-window-buffer-dedicated), if I use ivy-switch-buffer to switch buffer, the buffer will be opened in posframe. I give am example as follows (the posframe is in the center).
ivy-posframe-window-purpose-bug

commented

I will need a detailed reproduction recipe and more information about your config to really understand what's going on, but my initial guess is this:

  • after choosing the buffer to switch to, switch-to-buffer, pop-to-buffer or similar is invoked
  • buffer can't be displayed in existing windows in the selected frame because they are all buffer-dedicated
  • Purpose looks for windows in another frame, finds ivy-posframe's window and uses it to display the buffer

I'd like you try the following and tell me what happens in two scenarios:
1.

  • after buffer-dedicating the windows, turn OFF purpose-mode
  • use ivy-switch-buffer to switch to a buffer that isn't displayed
  • after buffer-dedicating the windows, turn OFF purpose-mode
  • set pop-up-frames to t (e.g. with M-: (setq pop-up-frames t))
  • use ivy-switch-buffer to switch to a buffer that isn't displayed

The detailed reproduction recipe should include the exact steps you take to trigger the bug - what is the initial frame layout (including buffer names/modes) and what commands you invoke.

Thanks for replay! Sorry for my poor issue description.

My steps to trigger the bug is:

  1. delete all other windows, make there is only one window.
  2. use purpose-toggle-window-buffer-dedicated to dedicate buffer to current window
  3. use ivy-switch-buffer to switch buffer
  4. the bug shows up.

In scenario 1, ( pop-up-frames is nil)
the minibuffer says
Cannot switch buffers in a dedicated window

In scenario 2, (after I set pop-up-frames to t)
the minibuffer says
Cannot switch buffers in a dedicated window

Maybe purpose should ignore all child-frame's window, posframe just a child-frame

Same here, I guess it's more about https://github.com/tumashu/posframe than ivy-posframe