Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to never dim the which-key buffer? #25

Closed
Dima-369 opened this issue Jan 29, 2021 · 2 comments
Closed

Possible to never dim the which-key buffer? #25

Dima-369 opened this issue Jan 29, 2021 · 2 comments

Comments

@Dima-369
Copy link

I am using https://github.com/justbur/emacs-which-key with this amazing package and have noticed that the which-key buffer is apparently always dimmed regardless of what configuration I use:

image

I tried variations of the code below but the *which-key* buffer or frame (or however Emacs calls that) is never messaged, so I guess the below can not be used to detect that buffer.

(defun adob--never-dim-p (buffer)
  (message (buffer-name buffer)
  (not (eq (buffer-name buffer) "*which-key*"))))

Do you know of an easy fix to this? Thank you :)


In the which-key documentation there is the option to display the window in the minibuffer: (which-key-setup-minibuffer) but it turns out that it is broken for me and the keys are only briefly shown and then the window clears. Really no clue why :(

Though in that case, the minibuffer is correctly not dimmed, but as mentioned I can't use that.

@mina86
Copy link
Owner

mina86 commented Jan 30, 2021

adob--never-dim-p is not used in Emacs 27+ so changing it has no
effect. I’ve pushed a new version which introduces
auto-dim-other-buffers-never-dim-buffer-functions hook which can be
used though. You can grab it directly from the repository or wait for
MELPA to update the package.

@mina86 mina86 closed this as completed in f0d48d9 Jan 30, 2021
@Dima-369
Copy link
Author

Thank you! The code below in the commit message works perfectly:

(defun mpn-never-dim-hidden (buf)
  (eq ?\s (aref (buffer-name buf) 0)))
(add-hook 'auto-dim-other-buffers-never-dim-buffer-functions #'mpn-never-dim-hidden)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants