M-% starts query-replace, and when a match is found, ? shows help, which indicates:

Type Space or ‘y’ to replace one match, Delete or ‘n’ to skip to next,

However, pressing Space simply inserts a space rather than replacing text (y still works). As a long time emacs user, this is a frustrating loss of functionality. Any suggestions on how it can be reinstituted?

  • Just to be sure... Do you see the same thing when you start Emacs using emacs -Q (no init file) - however that might be done with Spacemacs? If not, the bisect your init file to find the culprit.
    – Drew
    Aug 24, 2021 at 16:48

1 Answer 1


It seems to be a recent Spacemacs change of the Emacs defaults. Either set dotspacemacs-use-SPC-as-y to t in your dotspacemacs/init

(defun dotspacemacs/init ()

   ... ;; all the other dospacemacs-* variables 

   ;; Accept SPC as y for prompts if non nil. (default nil)
   dotspacemacs-use-SPC-as-y t))

or do (define-key query-replace-map " " 'act) in your dotspacemacs/user-config to return to the classic behavior.

  • 1
    be sure to add the value for dotspacemacs-use-SPC-as-y inside the setq-default list of the dotspacemacs/init function. I edited the answer to be cleaner
    – Émilien
    Sep 7, 2021 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.