Closed stevemolitor closed 1 year ago
I'm using Emacs 29 recent master on a MacOS M1 machine.
The position issue with multiple monitors was fixed before, see #2. I haven't tested it on Emacs 29. Does it work fine on Emacs 28? And what's the output of (display-monitor-attributes-list)
?
Thanks for the fast reply!
It does not happen on Emacs 28:
Also note that on Emacs 28 the cider window is below the source window, whereas in Emacs 29 I see it to the right.
To clarify, I see the bug in Emacs 29 on my external monitor and on my laptop with no external monitor connected.
(display-monitor-attributes-list)
on Emacs 28(((geometry 0 0 2560 1440) (workarea 0 25 2560 1415) (mm-size 699 389) (frames #<frame *Minibuf-1* Oct 18 11:26 AM 0x1331c5e30> #<frame 0x178e48620> #<frame 0x13339f430>) (source . "NS")) ((geometry 2560 351 1728 1117) (workarea 2560 351 1728 1079) (mm-size 344 222) (frames) (source . "NS")))
(display-monitor-attributes-list)
on Emacs 29(((geometry 0 0 2560 1440) (workarea 0 25 2560 1415) (mm-size 699 389) (frames #<frame *Minibuf-1* Oct 18 11:36 AM 0x12e98dc30> #<frame 0x146a9ab78> #<frame 0x11d27f158>) (source . "NS")) ((geometry 2560 351 1728 1117) (workarea 2560 351 1728 1079) (mm-size 344 222) (frames) (source . "NS")))
They look pretty much the same. 🤷
In Emacs 29, if i mess with display-buffer-alist
to display the cider repl below the source window it works fine, both using (display-buffer-below-selected)
and display in a bottom side window:
So the issue seems to be the split window on the right side.
Thanks for the feedback. I'll test it on Emacs 29 when I have time.
Update: On Emacs 28, I do not see the bug even when cider is in a right side window:
On Emacs 29 I also do not see the bug if I have two sources windows side by side:
On Emacs 29 I also do not see the issue if cider is in a left side window:
I only see the issue when all these things are true:
The position of the window should not cause this issue. It needs to calculate the position and size of the corfu child frame and the parent frame (display). Can you help test it on the X window system? It may be a bug introduced by Emacs 29.
Can you help test it on the X window system?
Sorry I only have a Mac machine (and don't have XQuartz setup).
Happy to provide any other debugging info though. I did briefly try stepping thru corfu-doc--calc-popup-position
but quickly got overwhelmed!
This should be a bug of the NS port Emacs. I've submitted a bug report. On macOS, you can try the Mac port Emacs, it works fine.
This should be a bug of the NS port Emacs. I've submitted a bug report. On macOS, you can try the Mac port Emacs, it works fine.
Thanks for chasing this down! Do you have a link to the bug report so I can track it? Thanks!
Hi @stevemolitor
This package is being merged into corfu as one of its extensions. Here is the pull request. I have tried adding a workaround for #58627 there. Would you like to try it out and see if it solves this problem? As a reminder, you need to patch corfu.el
, and corfu-doc has been renamed to corfu-doc-popup.
@galeo I tried your PR (via straight.el). I think it's fixed on NS Emacs 29:
Thanks!
EDIT - updated photo, verifying a problem I had before with the overlay that seems to be fixed too.
👍
OK. Thanks. I'll keep this issue open until the PR is merged.
Thanks for the fix @galeo. Good stuff.
Close this issue, please use the new corfu-docframe, which is an extension of corfu.
I sometimes see completions like this, where the documentation frame is way to the left and cut off at the edge of my monitor:
I've only seen this with cider, and mostly in the cider REPL as I recall.
I'm using Emacs 29 recent master on a MacOS M1 machine.
I tried with
corfu-doc-display-within-parent-frame
set to bothnil
andt
; same result.