exwm icon indicating copy to clipboard operation
exwm copied to clipboard

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

Open johannesCmayer opened this issue 1 year ago • 1 comments

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.

johannesCmayer avatar Oct 11 '24 18:10 johannesCmayer

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.

minad avatar Oct 14 '24 09:10 minad