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
28
votes
1 answer

What are all the ways of launching a shell from inside emacs and what are their various properties?

I know of at least four possibilities: eshell term ansi-term shell What's the complete list of tools built-in to emacs to launch a shell, and what benefits and drawbacks do they offer?
Trevoke
  • 2,375
  • 21
  • 34
16
votes
1 answer

Getting more than 8 colors in a terminal emulator inside Emacs

My understanding is that ansi-term only supports 8 colors (a good discussion of this in reddit here). Meanwhile, an increasing number of terminal emulators (e.g. tmux or iTerm2 in OS X) support True color (24 bit, i.e. 16 million colors). A good…
Amelio Vazquez-Reina
  • 5,157
  • 4
  • 32
  • 47
12
votes
1 answer

Automatically update default-directory when PWD changes in shell-mode and term-mode

Are there any options or packages which cause default-directory to be updated if the working directory changes in shell-mode and term-mode? I.e. when using cd, but the solution would have to be more robust than just look for this particular command…
tarsius
  • 25,298
  • 4
  • 69
  • 109
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
9
votes
3 answers

Any way to make prompts and previous-output uneditable in shell/term-mode?

This is admittedly a superficial question. Although ansi-term starts out behaving correctly when I first open it, it seems to degrade into an 'editable' mode after a few commands, e.g., when I do C-a (start of line) followed by C-k (kill line), it…
iceman
  • 1,078
  • 1
  • 9
  • 19
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
  • 810
  • 6
  • 14
6
votes
3 answers

locale when launching Emacs.app on OS X

I'm running OS X Yosemite and Emacs 24.3 from Homebrew. The locale setting for my user…
pwalsh
  • 245
  • 2
  • 6
5
votes
1 answer

How to copy command output in ansi-term mode?

In ansi-term mode, is there a way to copy the command output? This is quite easy in eshell, but sometimes eshell behavors not exactly the same with bash. For example: eshell doesn't know how to auto-complete sudo apt-... command. eshell requires to…
Nick
  • 4,423
  • 4
  • 24
  • 41
5
votes
0 answers

Can't run Windows 10 Bash with ansi-term

I've got this error, when running M-x ansi-term C:/Windows/System32/bash.exe RET Spawning child process: invalid argument after running M-x debug-on-entry RET start-process RET when running M-x ansi-term I've got this stack trace: Debugger…
jcubic
  • 691
  • 1
  • 4
  • 16
5
votes
1 answer

Can't use M-x in ansi-term mode

When in ansi-term, i can't use M-x, the keyboard shortcut doesn't do anything. Does anyone know how to fix this?
unskilledidiot
  • 185
  • 2
  • 7
5
votes
0 answers

FZF broken displaying in emacs terminal

I'm struggling to run fzf in emacs but cannot figure out whats my problem. When I run fzf - and start typing - text gets mess up, similar to this: I tried run fzf in term, eshell, ansi-term, multi-term modes, with and without --color=no option,…
sandric
  • 1,221
  • 9
  • 19
4
votes
1 answer

How do I configure moving by and deleting words in ansi-term?

In ansi-term's "char run" mode, I can use C- and C- to move around in steps of one word, but as soon as I start typing again, the point moves back to where it was. They work fine in "line run" mode (C-cC-j). How to I get the point to…
4
votes
0 answers

Tmux and term-mode

I've been running tmux inside of my term buffer but when I do that there are some issues and the buffer often becomes messed up, with the cursor being in the wrong spot and overwriting text or other various small issues. These issues arise from…
Jules
  • 1,275
  • 7
  • 12
4
votes
2 answers

Always enter emacs mode with ansi-term

I have a freshly installed spacemacs installation and I want to make it so that I ansi-term is in emacs mode. However, I try to add (add-to-list 'evil-emacs-state-modes 'term-mode) to my .spacemacs in the dotspacemacs/user-config and/or…
4
votes
1 answer

Undesirable Cursor Jump After Movement with M-left or M-right in Term-Mode

When I reposition the cursor in term-mode or ansi-term with M-left or M-right, it always returns to its original position (see animation below). Is this behavior standard? Is there a way to change it so that it behaves as it would in other buffers?
user9688
1
2 3 4 5 6 7