company-posframe icon indicating copy to clipboard operation
company-posframe copied to clipboard

On macOS, the new lower-frame call causes Emacs to hide

Open aaronjensen opened this issue 4 years ago • 10 comments

This commit: https://github.com/tumashu/company-posframe/commit/4e8f2056fa71aa5749341d834226e3ec786cea63

Causes emacs to hide when the quickhelp is shown on macOS.

GNU Emacs 27.0.91 (build 2, x86_64-apple-darwin19.4.0, NS appkit-1894.40 Version 10.15.4 (Build 19E287)) of 2020-05-02

aaronjensen avatar May 20 '20 10:05 aaronjensen

why, macos emacs's bug?

tumashu avatar May 20 '20 10:05 tumashu

It's not actually the raise-frame, it's the lower-frame. My guess is that on macOS it lowers the entire application rather than just the one window (emacs frame).

aaronjensen avatar May 20 '20 10:05 aaronjensen

It's a child frame issue:

M-: (make-frame `((parent-frame . ,(window-frame))))
;; In new frame
M-: (lower-frame)

That causes it to lower both the parent and the child.

aaronjensen avatar May 20 '20 10:05 aaronjensen

This reproduces on emacs 28 master, so I'll report.

aaronjensen avatar May 20 '20 15:05 aaronjensen

Reported upstream: bug#41422 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41422

aaronjensen avatar May 20 '20 16:05 aaronjensen

Suggest send a mail in emacs-devel.

tumashu avatar May 21 '20 04:05 tumashu

Once I realized that because pitkali/pos-tip#11 / company-mode/company-quickhelp#42 make tooltips too ugly on macOS. So, I was forced to find alternatives. Now I see even worse result using this project. Sadly, default company doc behaviour is the only viable workaround for me now.

I'll leave a link here to help anyone looking for a discussion on this issue: https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg03253.html

sergeyklay avatar Dec 13 '20 09:12 sergeyklay

@sergeyklay I simply remove the lower-frame call in my local copy of company-posframe. I'm not even sure why it's there as everything seems to work without it. Perhaps a patch should be submitted with a var to disable the lower frame call that defaults to true on macOS?

aaronjensen avatar Dec 13 '20 14:12 aaronjensen

@aaronjensen maybe this is a good temp solution :-), I will disable lower-frame in macos

tumashu avatar Dec 14 '20 00:12 tumashu

@tumashu thank you for the fix.

It looks like it was fixed upstream as well, so it will be fixed in Emacs 28:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41422

aaronjensen avatar Jan 03 '21 18:01 aaronjensen