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 other frames #9

Closed Pilen closed 6 years ago

Pilen commented 6 years ago

I think it would be nice with a feature/option so that only the selected window in the selected frame is highlighted/un-dimmed. This way only one window in all your frames will be highlighted, everything else will be dimmed.

gonewest818 commented 6 years ago

Do you mean the situation where you have a buffer being displayed in more than one window?

If that’s the case, then unfortunately it’s not possible to do given the face manipulation functions we’re using. I’ve mentioned this in the “Caveats” section of the readme.

I’m happy to keep this in mind in case the emacs project maintainers someday add the flexibility we need. I agree it would be great to have.

If I’m misunderstanding and you mean something else, then please explain and I’ll take a look.

Thanks!

Pilen commented 6 years ago

Yes, i am unfortunately aware of that, I also run in to that problem when I change faces for dedicated buffers.

What i am suggesting is that if you have eg. two emacs frames, frame 1 with windows for buffer A, B and C, and frame 2 with windows for buffer X, Y and Z. In frame 1, A is selected and in frame 2, Y is selected. Currently B, C, X and Z are dimmed, while both A and Y are highlighted/un-dimmed.

What I would suggest is a option that when set enables frame aware dimming, so if frame 2 is selected / has focus, then A is also dimmed so it is only Y that is highligthed. If I then switch focus to frame 1, A is highligthed while Y is dimmmed.

I don't have any suggestions if neither frame 1 or 2 are selected. I guess the frame in focus can be found with something like (selected-frame).

gonewest818 commented 6 years ago

I see. Then that's a bug because multiple frames did work as you suggest at one point.

I'll take a look at this. I have a hunch what introduced the bug.

gonewest818 commented 6 years ago

I just pushed a fix for this. When the next MELPA build appears can you please update and let me know if you have further problems?

Thanks for the feedback!