-
Notifications
You must be signed in to change notification settings - Fork 7
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
Meaning of covered-buffers when splitting window #15
Comments
Hmmm I see. (Context.) Usual Emacs behaviour when splitting is to display the same buffer in the new window. In EXWM we disallow an Lines 381 to 390 in 2bb9a57
I should know because I implemented this... but didn't write an explanation in ch11ng/exwm#145. Let us... reconstruct a reason. Please, edit Line 392 in 2bb9a57
(let ((exwm-layout--other-buffer-exclude-buffers nil)) Now perform the following steps:
Why does XEyes suddenly display in the left window again? I just "moved" it to the middle one!
Shouldn't XEyes move back to the middle window, where I placed it? I'm pretty sure that's the only reason I had for implementing this (To clarify, I'm opening this for discussion. I'm not sure what's the better behaviour.) Tangentially, I dislike that we are implementing this at all in EXWM: this should be a Display Buffer Action Function (https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-Display-Action-Functions.html), e.g. |
It make sense now. Maybe I didn't notice that, because I normally have only few X windows. I'm fine with the both behaviours, which can be simply acomplished with checking last command in predicate: (defun exwm-layout--other-buffer-predicate (buffer)
(or (not (with-current-buffer buffer (derived-mode-p 'exwm-mode)))
(and (not exwm-layout--other-buffer-exclude-exwm-mode-buffers)
(or (not (memq buffer exwm-layout--other-buffer-exclude-buffers))
(eq last-command #'split-window-below)
(eq last-command #'split-window-right))
;; Do not select if already shown in some window.
(not (get-buffer-window buffer t))))) I understand that same X window cannot be shown in two places, but I rater see previous window instead of previous non-exwm buffer. (when splitting) Same split behaviour has StumpWM.
I like this idea. |
Hi,
If have next case:
As I saw in code https://github.com/emacs-exwm/exwm/blob/master/exwm-layout.el#L392 there is case which prevent my expected behavior. If I set there
covered-buffers
tonil
it is working fine for me.Is there any case when
covered-buffers
are meaningful?The text was updated successfully, but these errors were encountered: