masm11 / emacs

Mirror of GNU Emacs
http://www.gnu.org/software/emacs/
GNU General Public License v3.0
198 stars 14 forks source link

tooltip issue with company-mode #57

Closed A6GibKm closed 4 years ago

A6GibKm commented 4 years ago

While using company mode the area next to the childframe changes its color.

image

image

Compare this with the behaviour in company-mode's website

image

Which coincides with the behaviour when run with emacs 27.1.

Steps to reproduce

This is a bit tricky since I was not able to reproduce this without doom-emacs default configuration.

This is not reproducible with the above steps with vanilla emacs 27.1.

Note

I do not know if this is related to childframes or something else.

A6GibKm commented 4 years ago

Some things to note

+childframe Enables displaying completion candidates in a child frame, rather than an overlay or tooltip (among with other UI enhancements). This requires GUI Emacs 26.1+ and is incompatible with the =+tng= flag

masm11 commented 4 years ago

@A6GibKm could you explain what each of the first two screenshots is?

A6GibKm commented 4 years ago

They are the tooltip invoked by company-mode on two different themes.

fejfighter commented 4 years ago

If I understand correctly, doom is configuring for company-posframe when it's not expected to be.

I'm not sure if we are setting something incorrectly, or if this is a doom issue.

does this occur on mainline? if so, we might be advertising a feature incorrectly

A6GibKm commented 4 years ago

This is indeed something that happens due to doom's config, but it does not happen using vanilla emacs 27 + doom, so ultimately there is different (unexpected) behaviour in pgtk.

What I have not yet tested is if this is related to nativecomp as I haven't tested pgtk without it for a long while.

masm11 commented 4 years ago

@A6GibKm I did:

git clone --depth 1 https://github.com/hlissner/doom-emacs ~/doom
~/doom/bin/doom install

and saved the above config as ~/.emacs, did ./doom/bin/doom run, and got an error:

screenshot-20200924-213612

Could you give me step-by-step guide to reproduce?

A6GibKm commented 4 years ago

The idea is that you should install doom to either ~/.emacs.d or ~/.config/emacs so its init file gets loaded first. In this case your .emacs file is getting loaded.

Also personal config files for it should go on ~/.config/doom (~/.config/doom/config.el) or ~/.doom.d, but to reproduce this issue no config is needed as doom bundles an already configured company mode.

EDIT: Note that doom emacs use vi bindings from evil-mod good luck with that :eyes: .

masm11 commented 4 years ago

@A6GibKm thank you. I installed doom emacs in ~/.emacs.d/, saved the above config as ~/.config/doom/config.el, ran ./.emacs.d/bin/doom run, did M-x lisp-interaction-mode, did M-x company-mode, input (des, and I got this screenshot:

screenshot-20200924-222638

It is running on wayland.

What to do next?

A6GibKm commented 4 years ago

You do not need any configuration, the entire procedure should be (without any user config file)

$ git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
$ ~/.emacs.d/bin/doom install
$ emacs

then

C-x C-f ~/.emacs.d/init.el

And type (des or anything which promps company-mode.

NOTE: Incidentally I tried opening the scratch buffer and enable lisp-interaction-mode but I was not able to reproduce in this setting.

A6GibKm commented 4 years ago

I managed to discover the actual cause of the issue. It was solaire-mode. It also turns out that this also happens with vanilla emacs (knowing the actual cause made me able to reproduce it). So closing this, sorry for the trouble :(.