1

I'm running a specific console application in a term window (char/raw mode). This application has no need for C-h, C-x, and M-x, so they should just do what they always do in Emacs. However, I don't want to change the behaviour of other term mode buffers, i.e. this should be buffer local. Any idea, how to do that?

E.g. (term-set-escape-char ?\C-x) seems to change all term buffers, unfortunately.

10
  • I'm confused by your question. To run M-x and other Emacs commands in term buffers, simply switch to term-line-mode.
    – aadcg
    Feb 5, 2022 at 18:18
  • It is cumbersome to have to switch modes first, and in my specific case it shouldn't be necessary. More key presses...
    – fred
    Feb 5, 2022 at 19:30
  • Well, but then why do you use term? Use shell or eshell.
    – aadcg
    Feb 6, 2022 at 13:11
  • AFAIK, neither shell nor eshell do provide any terminal emulation features. I'm running a console application, that needs a terminal (think vi or mutt). Only it does not need C-h, C-x, or M-x, so I would like to leave those keys to Emacs.
    – fred
    Feb 6, 2022 at 15:16
  • I'm suggestig that what you're trying to ahieve defeats the purpose of a terminal emulator. A terminal emulator should send input events directly without interceptions, right? And, as mentioned, you can toggle between char and term mode. Eshell is able to give you the illusion that it runs terminal-based programs but in reality it just offloads to (ansi)-term.
    – aadcg
    Feb 7, 2022 at 18:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.