0

when I start Emacs without windowing system (-nw), the motion keys are not working. Instead, I get (parts of) the escape sequences, like:

;; This buffer is for text that is not saved, and for Lisp evaluation.    
;; To create a file, visit it with C-o and enter text in its buffer.

[C[B[D[A[A[C[B[D[4~[C][B][A][A]

Thats four cursor keys, some function keys, home, end...

Edit: I see this on my debian buster machine as well as in termux on android. Both share the same configuration. Running emacs like emacs -nw -Q gets rid of the problem…

  • What terminal are you using and what's the value of $TERM inside of it? – DoMiNeLa10 Aug 12 '18 at 17:45
  • @DoMiNeLa10: I'm using the plain console (no GUI/X11 installed), $TERM is linux I tried it with an RXVT, TERM=rxvt-unicode-256color : the same With xterm: TERM=xterm: almost the same, just no square brackets. With termux on android: TERM=xterm-256color : the same ... – Markus Grunwald Aug 12 '18 at 17:49
  • What distro and keymap are you using? Does the problem persist with no site files (emacs -Q)? – DoMiNeLa10 Aug 12 '18 at 18:37
  • @DoMiNeLa10: I'm using debian buster and termux on android. With emacs -nw -Q the motion keys work fine in both setups! Seems I have to figure out what's wrong in the configuration... – Markus Grunwald Aug 13 '18 at 7:42
  • If you find out that your problem isn't related to your init file, the problem might be related to site files – DoMiNeLa10 Aug 13 '18 at 16:06
0

The problem was my own keymap definition:

(global-set-key '[(meta \[)]               'mg-match-paren)

Re-defining that fixed my problem.

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.