Closed azzamsa closed 5 years ago
I'll need to get some time to look at this, because I keep thinking the dimmer-exclusion-regexp
should cover this but perhaps it does not. So how would you like it to work? Is it
Now it dim the right buffer. The active buffer not bright as yours, even I set dimmer-fraction
to 0.83
(use-package dimmmer
:ensure nil
:config
(setq dimmer-fraction 0.83)
(dimmer-mode t))
This is the figure. dimmer.el dim my helm pop-up, and dim-and-bright when helm updates the content.
What theme are you using?
On Feb 24, 2018, at 5:31 PM, azzamsa notifications@github.com wrote:
Now it dim the right buffer. The active buffer not bright as yours, even I set dimmer-fraction to 0.83
(use-package dimmmer :ensure nil :config (setq dimmer-fraction 0.83) (dimmer-mode t)) This is the figure. dimmer.el dim my helm pop-up, and dim-and-bright when helm updates the content.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I use zenburn-theme, version 20180222.1757.
Ok, first of all I'm noticing the package name "dimmer" is spelled incorrectly in your use-package
statement (including in your screen capture it says "dimmmer" with 3 m's.). Secondly, setting dimmer-fraction
to 0.83 should make the text nearly invisible. That's really high.
I'm not saying this is the reason dimmer isn't dealing with "helm" properly, but there's something else funny about your configuration. Can you fix the spelling in use-package
and also set :ensure t
and (setq dimmer-fraction 0.50)
, remove the dimmer package in ~/.emacs.d/elpa/
, and restart emacs to reinstall the latest dimmer release? That should look a little more sane.
And then we can go back to the helm thing.
Ok, first of all I'm noticing the package name "dimmer" is spelled incorrectly in your use-package
Oh, really sorry. I don't notice it. Sorry.
Can you fix the spelling in use-package and also set :ensure t and (setq dimmer-fraction 0.50), remove the dimmer package in ~/.emacs.d/elpa/, and restart emacs to reinstall the latest dimmer release? That should look a little more sane.
Done.
Try adding (setq dimmer-exclusion-regexp "^\*helm.*")
That should prevent any of the helm buffers from being dimmed, for example if you switch to buffer C-x b
the helm list of buffers should be highlighted. Unfortunately whatever buffer was active when you typed C-x b
will still be dimmed. I'm not sure what your preference is, but give this a try and let me know.
To prevent dimming the helm buffers and the minibuffer, the regex is this:
(setq dimmer-exclusion-regexp "^\*helm.*\\|^ \*Minibuf-.*")
To make this change I needed to disable and re-enable dimmer, or you can change your config and restart Emacs.
(dimmer-mode 0)
(setq dimmer-exclusion-regexp "^\*helm.*\\|^ \*Minibuf-.*")
(dimmer-mode 1)
To prevent dimming the helm buffers and the minibuffer, the regex is this:
I put this in my config, am I missing something ?
(use-package dimmer
:ensure t
:config
(setq dimmer-fraction 0.50)
(setq dimmer-exclusion-regexp "^\*helm.*\\|^ \*Minibuf-.*")
(dimmer-mode t))
I will try to use this setting and report the updates here.
One adjustment you could make is to exclude the "echo area" as well as the minibuffer like so:
(setq dimmer-exclusion-regexp "^\*helm.*\\|^ \*Minibuf-.*\\|^ \*Echo.*")
I don't know what's wrong with my emacs. but using this
(setq dimmer-exclusion-regexp "^\*helm.*\\|^ \*Minibuf-.*\\|^ \*Echo.*")
makes my minibuffer dimmed since emacs started.
Thanks lot for the help, gonewest818.
Nothing change in my emacs, the minibuffer dimmer since emacs started.
I think the error was in my init.el
.
I will disabled this extension for while, and inspect what's wrong with my init.el .
Thanks lot.
put the setq
in :init
also does not solve the problem
(use-package dimmer
:ensure t
:init
(setq dimmer-exclusion-regexp "^\*helm.*\\|^ \*Minibuf-.*\\|^ \*Echo.*")
:config
(setq dimmer-fraction 0.50)
(dimmer-mode t))
This is the information I can update here. Thanks.
Hmm. In terms of configuration, it is ok to set dimmer-exclusion-regexp
in :config
before enabling dimmer-mode
, exactly like you did back in this earlier comment. I have roughly the same in my config right now and it's working as expected.
However, I don't normally use helm, so all I'm doing is creating buffers named *helm xyz*
by hand to make sure they're not dimmed. I suppose it's possible there is a bad interaction with the actual helm package and I'm not seeing it because I'm not using helm.... When I get some time I can setup helm again and experiment with that.
Or perhaps you could disable helm in your config, restart emacs, and then report back if dimmer handles the minibuffer correctly after that change. I don't want you to stop using helm forever, but I do need a clue what's going on in your case.
I tried your advice soon as you posted. I think I found the problem.
Disabling helm doesn't help, the problem still occur. So I try disabling super-save, I think this cause the problem. Because minibuffer dimmed after x minutes (maybe after I switch to other workspace), but disabling super-save still dosn't solve the problem.
I always run emacs with emacsclient then emacsclient -c (GUI). So I tried emacsclient -t (CLI). and the problem solved
dimmer works fine in emacsclient -t (CLI). dimmer does not dim the minibuffer nor helm. The problem occur only after I switch workspace and come back to emacsclient (GUI). When I switch to other workscpase the minibuffer dimmed immediately. I just notice it.
Trying to enable super-save and helm in emacsclient -t (CLI), and dimmer still works fine.
I use i3wm. Any advice for this ?
Debian 9
Binary i3 version: 4.13 (2016-11-08, branch "4.13") © 2009 Michael Stapelberg and contributors
Running i3 version: 4.13 (2016-11-08, branch "4.13") (pid 910)
Thanks for helping with that. I think that's the clue I needed.
Just now I tried M-x start-server
in an existing Emacs session, then emacsclient -t foo
from a shell. I got the same problem with the minibuffer. In ielm
I confirmed dimmer-exclusion-regexp
wasn't changed, and (dimmer-filtered-buffer-list)
looks correct too. If I toggle dimmer-mode
off and on, then I can get the minibuffer to behave again. So it's something to do with the initialization when emacsclient
opens a new frame.
It doesn't appear to happen when I M-x make-frame
in an existing Emacs session, only when the frame is created via emacsclient
.
I'll need some time to debug that but at least I have the repro now.
I can reproduce this issue using ivy and company too.
@nealot This issue happened when you use emacs frame from emacsclient. But it's solved when you don't use emacsclient.
Really? I might be experiencing a different issue then because although I'm not using emacsclient I still can't get ivy/minibuffer/echo area to obey the regex.
I'm on i3wm too, if that's relevant.
Sorry. didn't pay attention to minibuffer correctly.
Yes I can confirm that the regrex way doesn't work.
Another odd thing I've noticed is that after changing workspaces or opening other applications in i3, dimmer automatically dims the foreground color. Have you experienced that too?
I think no.
Okay I found out my problem was caused by
(add-hook 'focus-in-hook 'dimmer-config-change-hook)
(add-hook 'focus-out-hook 'dimmer-dim-all)
So all I had to do was remove these hooks and the issue went away.
A suggestion might be to include a customize variable that allows you to set whether or not you want dimmer to work on frames aswell.
Toggling that behavior with a config setting sounds totally reasonable to me. Do you want to submit a pull request for that?
@nealot
@gonewest818 nealot seems to be inactive for long time. Do you consider to add nealot's solution to master ?
Sorry, but I stopped using emacs for vscode :cry:
This issue solved for me. Using following config and step described by @nealot https://github.com/gonewest818/dimmer.el/issues/15#issuecomment-386820673
(use-package dimmer
:defer 1
:load-path "~/emacs-packages/dimmer.el/"
:config
(setq dimmer-exclusion-predicates '(helm--alive-p window-minibuffer-p))
(setq dimmer-exclusion-regexp-list
'("^\\*[h|H]elm.*\\*" "^\\*Minibuf-[0-9]+\\*"
"^.\\*which-key\\*$" "^*Messages*" "*LV*"))
(setq dimmer-fraction 0.50)
(dimmer-mode t))
FYI, this is much better in the most recent commits on the master branch.
This issue solved for me. Using following config and step described by @nealot #15 (comment)
(use-package dimmer :defer 1 :load-path "~/emacs-packages/dimmer.el/" :config (setq dimmer-exclusion-predicates '(helm--alive-p window-minibuffer-p)) (setq dimmer-exclusion-regexp-list '("^\\*[h|H]elm.*\\*" "^\\*Minibuf-[0-9]+\\*" "^.\\*which-key\\*$" "^*Messages*" "*LV*")) (setq dimmer-fraction 0.50) (dimmer-mode t))
Looks like this config doesn't work as is anymore.
Note that
dimmer-exclusion-regexp-list
has been changed to dimmer-buffer-exclusion-regexps
ANDdimmer-exclusion-predicates
has been changed to dimmer-prevent-dimming-predicates
I tried changing these, but still could not get it to work!!
Dimmer dim the helm pop-up. and does not dim other window when switching between them.