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
Closed

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

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

Comments

@Alexander-Shukaev
Copy link

@Alexander-Shukaev Alexander-Shukaev 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
Copy link
Author

@Alexander-Shukaev Alexander-Shukaev 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
Copy link
Collaborator

@basil-conto basil-conto commented Dec 3, 2018

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

@Alexander-Shukaev
Copy link
Author

@Alexander-Shukaev Alexander-Shukaev commented Dec 3, 2018

Cool, thanks.

@mookid
Copy link
Contributor

@mookid mookid 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
Copy link
Author

@Alexander-Shukaev Alexander-Shukaev 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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants