reddit / emacs

C-j not inserting or evaluating lisp code

LowCom · 2022-05-05 15:53
The manual says this. > You can type the form in the *scratch* buffer, and then type LFD (or C-j) after it. The result of evaluating the form will be inserted in the buffer. But I just get the new line instead of form value being inserted in the buffer. I thought it could be due to my evil mode or evil escape mode but disabling them also didn't work. Typing C-h k C-j revealed that C-j is bound to electric new line function but even disabling electric mode didn't work. What's wrong?
bondaly · 2022-05-05 16:48
What mode are you in?
thetemp_ · 2022-05-05 16:49
Try running Emacs with "emacs -Q" from the command line to confirm that it works as described when no configuration is loaded. Something in your config could be changing the major mode of the scratch buffer (for example, Doom sets it to fundamental-mode to speed up loading). The major mode for the scratch buffer should be lisp-interaction-mode. If you change it, you lose that keybinding.
whudwl · 2022-05-05 22:24
check your major mode `C-h v major-mode`