emacs-exwm / exwm

Emacs X Window Manager
https://elpa.gnu.org/packages/exwm.html
GNU General Public License v3.0
270 stars 14 forks source link

"Buffer is read-only" error in char mode by exwm-input-global-keys misconfiguration - add better error message #84

Open johannesCmayer opened 1 month ago

johannesCmayer commented 1 month ago

Report of unintuitive user error. A better warning for the user would be good.

Every time that I try to enter a character in char mode, I get an Buffer is read-only only. (However I can e.g. press C-c to to interupt a program running in a terminal emulator.)

It turns out that there was a configuration error in the exwm-input-global-keys. Can you spot the error:

  (setq exwm-input-global-keys
          ...
          (,(kbd "<XF86AudioNext>")         . media-next)
          (,(kbd "<XF86AudioPrevious>")     . media-previous)
          (,(kbd "<XF86AudioPlay>")         . media-play)
          ...)

The error is to write XF86AudioPrevious, when infact it should be XF86AudioPrev.

Writing XF86AudioPrevious basically breaks char mode entirely (even when you don't try to use media keys).

So when you notice that char mode is broken, it might be that you are specifying some non existant keybinding for exwm-input-global-keys. exwm just silently eats the keybind which silently breaks char mode.

minad commented 1 month ago

I think our goal is to move to a better configuration method using normal Emacs keymaps. This will make configuration easier and should prevent problems. But I am not sure about the exact problem here. At least usually you can specify <arbitrary> keybindings in keymaps in Emacs and things will just continue to work.