0

I've just installed Emacs 26.2 on a Windows 7 machine. This is a clean install, with no previous version of Emacs installed. Editing an Org file, I want to insert a new TODO item using "M-S-return". Typing that key sequence results in an error "ESC <return> is undefined."

Since I'm not running in a terminal, the issue doesn't seem to be the terminal eating my keys, as discussed here. Also, C-h l (view-lossage) results in the following:

 F [org-self-insert-command]
 o [org-self-insert-command]
 o [org-self-insert-command]
 <escape> <S-return> [nil]
 C-h l [view-lossage]

So it appears that the "Shift-return" is making it to emacs.

C-h m lists <M-S-return> as bound to org-insert-todo-heading, as expected. C-h k says ESC <S-return> (translated from <escape> <S-return>) is undefined.

What am I doing wrong here?

  • What does C-h k tell you when you use that key sequence? Where is that key sequence defined (in Org, presumably) - can you show the define-key (or whatever) sexp that defines it? You write ret, but Emacs is telling you it's <return> (which makes sense, since you're not using a terminal - it's not RET). – Drew Aug 27 at 2:38
  • Sorry, "ret" above was an abbreviation on my part. C-h m lists <M-S-return> as bound to org-insert-todo-heading, as expected. C-h k says ESC <S-return> (translated from <escape> <S-return>) is undefined. – J. Dane Aug 27 at 3:24
  • Please put all such info in the question itself. Comments can be deleted at any time. Thx. – Drew Aug 27 at 14:16
  • I'm used to using <ESC> as the emacs "Meta" key, and indeed when I run emacs on Windows machines <ESC> generally seems to map to "Meta." I've just learned that I can also use the "Alt" key as "Meta". That does seem to work in this case, i.e., "Shift-Alt-Return" runs org-insert-todo-heading, which I can live with. – J. Dane Aug 27 at 23:23
  • Hmm, what key did you expect to be the M? In the emacs manual: kinds of user input: We refer to <Alt> as <Meta> for historical reasons – Hubisan Aug 28 at 4:34

Your Answer

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

Browse other questions tagged or ask your own question.