Questions tagged [ansi-term]

is for the Emacs ansi terminal emulator. Emacs supports ANSI-standard VT100-style escape sequences recognized by such modern terminals as xterm. M-x ansi-term command starts a terminal, which by default runs in a sub-shell in a buffer named *ansi-term* with term-mode.

Useful Links:

99 questions
10
votes
1 answer

Stray trailing 4m before prompt with Zsh in M-x ansi-term

I recently read Running Shells in Emacs, and spend some time to adapt my elaborate Zsh prompt to work with the limited capabilities of M-x shell and M-x ansi-term. Following this effort I'm now finally able to use Zsh from within Emacs, however…
user227
6
votes
2 answers

How to define a function that calls a console process using ansi-term?

I'm using Julia within emacs, and I've found that despite the existence of ess and julia-mode, the best way for me to do that seems to be to use ansi-term and execute: ipython3 console --kernel=julia-0.5 This way, I get behavior identical to the…
Zorgoth
  • 840
  • 6
  • 14
2
votes
2 answers

Why can't I use my custom keybinding in ansi-term's char mode?

I'm an emacs noob —why can't I use this key (global-set-key (kbd "M-o") 'other-window) defined in my emacs config, in ansi-term char mode? Are all meta keybindings simply passed raw to the terminal process?
edmqkk
  • 125
  • 3
2
votes
0 answers

Multiline prompt with ansi-term

Running plain Emacs with emacs -Q then running ansi-term, if I input some long text in the prompt such that the text breaks into the next line (without hitting Return), then I hit C-x 2 to create another frame, for some reason the prompt is half…
Tohiko
  • 1,649
  • 1
  • 11
  • 24
2
votes
1 answer

Killing ansi-term says: "... has a running process"

Whenever I kill an ansi-term buffer I have to confirm due to the fact of: "ansi-term has a running process; kill it ?", (even if nothing is running btw). How could I have Emacs killing the term without requiring this confirmation regardless of…
wizmer
  • 917
  • 1
  • 7
  • 9
1
vote
0 answers

pv console utility brokes ansi-term

Every time I use pv in ansi-term it brokes my terminal. There are two possibilities: broken terminal clears every time i press enter and hides output it stops understand \n or something and writes output line by line in a bottom of a window,…
olmstad
  • 111
  • 2
0
votes
1 answer

How can I clear all text in a buffer using `ansi-term`?

Emacs 27.1 M-x ansi-term run some process that outputs lots of text. Then C-c and type Linux command clear. Only the current page is cleared, in the buffer. But I need to clear all text from the buffer.
a_subscriber
  • 4,062
  • 1
  • 18
  • 56
0
votes
1 answer

How disable ask me about Run /bin/sh in ansi-term?

Emacs 27.1 When I run ansi-term, it every time ask me about Run programm /bin/sh I every time answer - yes Is is possible to disable this question and immediately run ansi-term?
a_subscriber
  • 4,062
  • 1
  • 18
  • 56
0
votes
2 answers

How to put ansi-term state in mode line?

Is there a way to put the ansi-term state (char-mode or term-mode) in the mode line?
0
votes
1 answer

Sending code to an ansi-term via isend-mode: How to modify default buffer chosen and how to automatically open ansi-terms?

I use isend-mode (see here) to send (bash) code to an ansi-term as follows: 1) `M-x ansi-term` # open ansi-term 2) Open buffer with code I want to send to *ansi-term* 3) `M-x isend RET *ansi-term* RET` # => associates code buffer with…
Marius Hofert
  • 369
  • 1
  • 9
0
votes
1 answer

Why is M-x remapped in ansi-term char mode?

I understand that you can use M-x in ansi-term's char mode by doing C-x M-x, but why can't it just be used normally? Is there some historical reason? I can use other meta commands (like M-f or M-b), why does M-x need the C-x prefix key? (Also, I…
edmqkk
  • 125
  • 3
0
votes
1 answer

Launch Emacsclient in ansi-terminal mode?

I connect to an emacs server via emacsclient. Frequently the first thing I want open is a new buffer with an ansi-terminal in it. Is there a way to launch emacsclient and to send the command "open a new buffer with an ansi-terminal"? EDIT: Or better…
George
  • 919
  • 5
  • 17