-
Notifications
You must be signed in to change notification settings - Fork 22
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
Using popper independently per frame #71
Comments
Huh, it looks like |
When I did a quick search, it seemed that |
I'm quite new to Emacs Lisp, but I seem to have hit the same problem. I'm trying to customize FWIW here's the display function I'm using (It's most probably very broken): (defun my-popper-display-buffer-in-posframe (buf &optional alist)
"Display BUFFER in a posframe. ALIST is ignored."
(posframe-show buf
:poshandler #'posframe-poshandler-frame-center
:width (floor (* (frame-width) 0.8))
:height (floor (* (frame-height) 0.8))
:internal-border-width 1
:internal-border-color "gray50"
:accept-focus t
:cursor 'bar
:respect-mode-line t)
(with-current-buffer buf
(setq-local popper-popup-status 'popup)
;; Return window for popper's reference
(let* ((win (frame-selected-window (buffer-local-value 'posframe--frame buf))))
(select-window win)
win))) |
I'm quite new to Emacs Lisp, but I seem to have hit the same problem. I'm trying to customize `popper-display-function` to make the pop-ups show up in a floating posframe. I found the "POP" in the mode-line in the posframe upon running `popper-toggle`, but running it again spawns a nested posframe instead of closing the already open pop-up. This seems to be because `popper-open-popup-alist` is not updated.
Using popper with childframes is tricky. It used to work, but I haven't tried in a couple of years. I think you need to find an appropriate hook in which to run popper--update-popups -- I'm not sure which hook that should be. Your display function looks fine at first glance.
|
Hi, I'm seeing some odd behavior that is preventing me from being able to reliably toggle popper across frames using
popper-toggle
(without the workaround below).If I hop between frames and run
M-x popper-toggle
then popper will, as expected, toggle the popup window for the current frame. However, if I bindpopper-toggle
to a keybinding then I don't get the same results. I suspect that by switching frame and invoking a keybinding (rather thanM-x popper-toggle
) thatpopper--update-popups
is not called and sopopper-open-popup-alist
is not updated.As a workaround, I've added the following to my config to ensure the
popper-open-popup-alist
is up to date prior to toggling:This line stood out to me as a potential cause for this behavior as
select-frame-hook
does not exist for me (currently on Emacs 30):The text was updated successfully, but these errors were encountered: