repeat-mode is completely failing to operate as advertised. I get the message saying it's enabled, and thereafter Emacs carries on exactly as if it has not been enabled, with supposed command-repeating keys instead being inserted into the buffer. In other words, I have never seen repeat mode work. No error messages appear. How might I go about debugging this?

Example sequence:

  • Split a frame into two or more windows
  • M-x repeat-mode (I have it on C-R). The "mode enabled" message appears.
  • C-x o switches buffer as expected.
  • o (or uppercase O) is inserted instead of repeating switch-buffer. No error, no debugger with toggle-debug-on-error.
  • M-x repeat-mode. The "mode disabled" message appears.

Ditto for the window-resizing suite of commands.

M-x describe-repeat-maps shows the window movement and resizing suites plus several others as expected. But no!

Emacs 28.1 with native comp, Manjaro, StumpWM.

  • It works for me. The message I get when I enable it is Repeat mode is enabled for 23 commands and 9 keymaps; see ‘describe-repeat-maps’. Try doing M-x describe-repeat-maps and seeing if other-window is in there? Emacs 29.0.50 built about two months ago from git.
    – NickD
    Aug 2, 2022 at 14:19
  • Did you start Emacs using emacs -Q? If not, try that. If no problem that way, then bisect your init file to find the culprit.
    – Drew
    Aug 2, 2022 at 16:01
  • @NickD edited question in response to add already-taken step Aug 2, 2022 at 16:06
  • @Drew Of course I should have done that first and of course it works with emacs -Q, blast it. Unfortunately my config is simply too complex to bisect, a web of interlocking autoloads in 96 files. Anyway, it's obviously my problem to solve alone. I was hoping somebody knew the mechanism that repeat-mode uses to intercept keystrokes. Thanks for your help anyway guys. I'll leave this up for a while in case I come up with a solution. In the meantime, it's back to C-x z for me. Aug 2, 2022 at 16:16
  • 2
    I'd still suggest some form of bisecting your init file. After all, all you're trying to test is whether repeat-mode works. Surely you can load some subset of your setup and check that, to at least narrow the search space somewhat. Anyway, good luck.
    – Drew
    Aug 2, 2022 at 19:08


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.