gonewest818 / dimmer.el

Interactively highlight which buffer is active by dimming the others.
GNU General Public License v3.0
267 stars 14 forks source link

Dimming causes issues with posframes #36

Closed kgs1992 closed 4 years ago

kgs1992 commented 4 years ago

I'm using dimmer with ivy-posframe. Seems like the popups inherit the dimmed foregroud/background. The first posframe to be created on staring emacs (before any buffer has been dimmed) has the right colours, post that, all of them seem to be dimmed.

gonewest818 commented 4 years ago

Hi, thanks for reporting this. So far I've created a trimmed-down config that reproduces the behavior, so now I just need to set aside some time to hunt down the actual bug.

gonewest818 commented 4 years ago

Can you try adding the following to your config and testing again?

(add-to-list 'dimmer-exclusion-regexp-list "^ \\*ivy-posframe-buffer\\*$")

If you find this works for you, then I'll make a convenience function dimmer-configure-ivy-posframe and push that to MELPA.

kgs1992 commented 4 years ago

Hi, thanks for your reply and suggestions. I've been able to get it to work by adding the regex you provided to the exclusion list. I've also added the same for company-posframe and flycheck-posframe.

This is what my dimmer-exclusion-regexp-list looks like: ("^ \\*flycheck-posframe-buffer\\*$" "^ \\*company-posframe-buffer\\*$" "^ \\*ivy-posframe-buffer\\*$" "^ \\*Minibuf-[0-9]+\\*$" "^ \\*Echo.*\\*$")

It generally works for all of them, but it does get dimmed occasionally. One example of when this happens is if emacs loses and regains focus.

Could you please check if there is any way to exclude all posframe buffers permanently? Thanks.

gonewest818 commented 4 years ago

I’ve looked at posframe itself, and a half dozen packages that use it. There isn’t great consistency in the naming of posframe buffers but I can at least make a regexp that catches the more common cases.

I haven’t seen the frame focus error yet, but you can turn that particular feature off for now, and that might make things a little smoother for you.

gonewest818 commented 4 years ago

I'm about to push a change that implements a dimmer-configure-posframe function that adds a regexp a little more general than your setting, and should catch the posframe buffer in many (unfortunately can't guarantee all) of the packages that use posframe.