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

Making a derived major mode based on exwm-mode makes windows disappear #95

Open
lrustand opened this issue Dec 14, 2024 · 1 comment
Open

Comments

@lrustand
Copy link

lrustand commented Dec 14, 2024

I'm trying to make a derived major mode from exmw-mode for a specific type of exwm buffer. It seems that activating a derived mode breaks some exwm functionality, making the window disappear.

Minimal reproducing example:

(define-derived-mode my-exwm-mode exwm-mode "My-EXWM")

When activating this mode in an exwm buffer the buffer disappears.

@lrustand
Copy link
Author

Okay, I see what is happening here. This is hardcoded behaviour in exwm-mode, as seen in the following line in the mode definition:

  ;; Change major-mode is not allowed
  (add-hook 'change-major-mode-hook #'kill-buffer nil t)

Would it be reasonable to add a check here to see if the major mode is a derived mode of exwm-mode or not, and to allow changing to a derived mode?

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

1 participant