Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`ivy-occur-press` does not respect `display-buffer-alist` #1838

Closed
Alexander-Shukaev opened this issue Dec 3, 2018 · 5 comments

Comments

@Alexander-Shukaev
Copy link

commented Dec 3, 2018

No idea how is this possible but with the following configuration:

  (setq-default
    display-buffer-alist     '((".*" . (display-buffer-reuse-window
                                        . ((reusable-frames . t))))
                               (".*" . (display-buffer-same-window)))
    even-window-heights      nil
    pop-up-frames            nil
    pop-up-windows           nil)

visiting any candidate in ivy-occur buffer (e.g. after counsel-rg) pops up the visited file in a new frame (super annoying).

@Alexander-Shukaev

This comment has been minimized.

Copy link
Author

commented Dec 3, 2018

Curiously, invoking (display-buffer (get-buffer "...") 'display-buffer-pop-up-window) directly, works correctly. So something is fishy about ivy--occur-press-update-window in particular and/or ivy-occur-press-and-switch in general.

@basil-conto

This comment has been minimized.

Copy link
Collaborator

commented Dec 3, 2018

Just a little hint: the simplest regexp which matches any string is the empty string "", not ".*".

@Alexander-Shukaev

This comment has been minimized.

Copy link
Author

commented Dec 3, 2018

Cool, thanks.

@mookid

This comment has been minimized.

Copy link
Contributor

commented Dec 10, 2018

No idea how is this possible but with the following configuration:

  (setq-default
    display-buffer-alist     '((".*" . (display-buffer-reuse-window
                                        . ((reusable-frames . t))))
                               (".*" . (display-buffer-same-window)))
    even-window-heights      nil
    pop-up-frames            nil
    pop-up-windows           nil)

visiting any candidate in ivy-occur buffer (e.g. after counsel-rg) pops up the visited file in a new frame (super annoying).

I am not super familiar with these config variables. What behaviour do you expect given these settings?

@Alexander-Shukaev

This comment has been minimized.

Copy link
Author

commented Dec 20, 2018

  1. If a buffer is already displayed in one of the windows, regardless of whether it is in the current frame or another frame, raise that frame (don't spawn any new windows).
  2. Otherwise (buffer is not displayed by any window), display it in the current window (don't spawn any new windows).
  3. In general, don't pop (spawn) any new windows or frames (without me doing it manually).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.