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

Ensure that buffer preview supports general display-buffer #671

Closed
wants to merge 2 commits into from

Conversation

minad
Copy link
Owner

@minad minad commented Oct 16, 2022

The problem is that set-window-configuration only supports the dont-set-miniwindow option since Emacs 28!

Experimenting with these test buffers:

(setq display-buffer-alist
      `(("\\`\\*no-window\\*\\'"
         (display-buffer-no-window))
        ("\\`\\*at-bottom\\*\\'"
         (display-buffer-at-bottom))
        ("\\`\\*in-side-window\\*\\'"
         (display-buffer-in-side-window))
        ("\\`\\*pop-up-window\\*\\'"
         (display-buffer-pop-up-window))))

((buffer-live-p orig-buf)
(switch-to-buffer orig-buf 'norecord))))))))))
(when wc
(set-window-configuration wc 'no-frame 'no-miniwindow)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aki2o The problem is here that we don't have that functionality available on Emacs 27!

@minad
Copy link
Owner Author

minad commented Oct 16, 2022

@aki2o I fixed consult--jump in b5033d2. Please read the code and let me know what you think about it. Does it work in your use case? Unfortunately we cannot merge this for quite some time due to the limitations of set-window-configuration, which doesn't take the no-miniwindow argument before Emacs 28. Do you have an idea on how one could shim that functionality on Emacs 27?

@minad
Copy link
Owner Author

minad commented Oct 16, 2022

Another problem is that the file preview is broken now. When trying to generalize the preview, we really opened Pandora's box :( (EDIT: Actually that works.)

The problem however is that set-window-configuration can still mess with the miniwindow in case the miniwindow is resized during completion. See resize-mini-windows or vertico-resize. The problem also occurs if the mini window is resized via vertico-multiform-mode, e.g. when toggling between the flat or the vertical Vertico display.

minad added 2 commits October 16, 2022 05:57
The problem is that set-window-configuration only supports the
dont-set-miniwindow option since Emacs 28!
@minad minad force-pushed the preview-display-buffer-support branch from 794cffd to e009c90 Compare October 16, 2022 03:57
@minad
Copy link
Owner Author

minad commented Oct 20, 2022

Close this for now, since it is unclear how the issues in #671 (comment) can be resolved in full generality.

@minad minad closed this Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant