M-return is interfering with export (M-return e e) and other functions that I use a lot.

I tried (define-key org-mode-map kbd "M-return" nil), but after loading that (with M-m f e r, since I am using Spacemacs), I still get the binding.


You tried this:

(define-key org-mode-map kbd "M-return" nil)

Try this instead:

(define-key org-mode-map (kbd "<M-return>") nil)

You made two mistakes: kbd is a function, and you want to pass it as argument the key description that Emacs shows you when you use C-h k and hit Meta + Return. That mean use the sexp (kbd ...), where ... is what C-h k shows: <M-return>.

  • That solves it, thanks a lot! – Roland Coeurjoly May 2 '20 at 8:16
  • Feel free to accept and upvote then. ;-) – Drew May 2 '20 at 20:27

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.