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

Dim only buffers associated with files #25

Closed hkjels closed 4 years ago

hkjels commented 4 years ago

As far as I know you can not negate a regular expression in Emacs, but what I want is to exclude all buffers that are not associated with a file. That could be solved with an inclusion-list I guess or some predicate of linked file.

gonewest818 commented 4 years ago

Emacs has a convention that a buffer not associated with a file will have a name that begins with *, ie*scratch* or *Messages*. So you could try excluding any buffer that begins with *, and see if you like the result?

hkjels commented 4 years ago

OK.. That's what I have, but there's a lot of packages etc that obviously don't follow that convention. Looking for a file-extension would work a lot better I think. I'll scratch this itch in a fork :)

hkjels commented 4 years ago

This seems to work pretty well for my use-case. Would you accept a PR? https://github.com/hkjels/dimmer.el/commit/b344659b24926faa30f4448467d9de3b193990ee

gonewest818 commented 4 years ago

Thanks for the PR! Check my comment on the commit... thoughts?