anler / centered-window-mode

Keep your text centered when there's only one window.
142 stars 12 forks source link

Does not work with EIN buffers. #27

Open lgmoneda opened 7 years ago

lgmoneda commented 7 years ago

Expected behavior

Center an EIN buffer.

Actual behavior

It works for other buffers, but not with EIN ones. But i can center it manually using fringes (is that what the mode does?) with (fringe-mode '(200 . 200)).

Steps to reproduce

Backtraces if necessary (M-x toggle-debug-on-error)

Versions of centered-window-mode, Emacs, OS etc.

anler commented 7 years ago

Hi @lgmoneda by default all buffers starting by * (except *scratch*) are ignored, is the name of your buffer like that?

lgmoneda commented 7 years ago

Indeed, @anler, the EIN buffers all start with a *. Is there a variable to customize it? Thanks for helping!

anler commented 7 years ago

@lgmoneda the customization variable is cwm-ignore-buffer-predicates which is a list of functions to test if a a given buffer should be ignored, by default it contains only the function cwm-special-buffer-p. If you want to activate the mode in all special buffers just add (setq cwm-ignore-buffer-predicates nil) to your emac's init, otherwise you can create a new function that uses internally cwm-special-buffer-p but also checks that the buffer is not an EIN one.