1

I would like to run Node (or Nodejs) interpreter in an Emacs ansi-term buffer. I found this problem: I can not access the common readline command history through ArrowUp and ArrowDown.

When I press ArrowUp and ArrowDown, instead of the expected previus commands, I get the sequences: ^[OA and ^[OB.

Have you any idea of how to fix this ?

Thank you, Nicola Mingotti

Nicola Mingotti
  • 860
  • 6
  • 15

1 Answers1

0

It sounds like you might be in the line mode of ansi-term (although in this case I would think you would move the cursor up a line rather than displaying the escape squence...). Try using C-c C-k to switch to char. You should be able to go through command history with the arrows as usual. Use C-c C-j to go back to line mode.

elethan
  • 16,408
  • 8
  • 64
  • 87
  • 1
    Thank you for yuor answer. I tired as you suggest and indeed it improves a bit, now ArrowUp gives the previous command (with an extra prompt). But, something else is gone, in char-mode the backspace button repeats the command line instead of what expected ! I moved to to `nodejs-repl` it seems to work well even in `tramp-mode` and `isend-mode` . That is what i needed. bye Nicola – Nicola Mingotti Sep 20 '16 at 14:03