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`.

Filter by
Sorted by
Tagged with
1
vote
3answers
363 views

Honor default-directory in ansi-term

When I launch an ansi-term in a remote (TRAMP) buffer, I'd like the resulting shell to reflect the current default-directory. That is, I'd like ansi-term to give me a remote shell, so I can do things ...
4
votes
2answers
817 views

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 ...
1
vote
0answers
225 views

Send Python Buffer to ansi-term

I recently started using emacs to code in Python. I currently prefer to use python mode (defined in python.el) alongside ansi-term for the python interactive shell. I'm trying to change the behavior ...
3
votes
2answers
697 views

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-...
1
vote
0answers
98 views

How to htmlfontify an ansi-term buffer?

I am using "emacs 24.4.1; htmlfontify 0.21" and try to htmlfontify a ansi-term buffer. But the style in the generated HTML file does not contain colors. This is how it looks: span.term-bold-0004 { ...
4
votes
1answer
422 views

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 ...
0
votes
0answers
179 views

Incorrect Line Spacing in (term-mode, ansi-term, eshell, shell) Output

The output of certain commands in multiple major modes (term-mode, ansi-term, shell, eshell) is incorrectly spaced (see images). This occurs for numerous commands and does not occur in other emulators ...
2
votes
1answer
470 views

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 ...
3
votes
2answers
588 views

Interpret terminal escape codes in generic process output

I'm running a (start-process) which spits out terminal escape codes into a buffer and it looks ugly. Is there a mode that will interpret these codes into colors? Something similar to whatever ansi-...
4
votes
1answer
595 views

mutt (and others) in ansi-term - terrible refresh rate

I'm trying to run mutt in ansi-term in the GUI on OS X. The refresh rate is really slow for some reason, so when I try to navigate between emails the result is pretty much unreadable. Has anyone found ...
0
votes
2answers
274 views

How to pass `C-u` to `helm-M-x` in `ansi-term` buffer?

In ansi-term buffer, I try to run a command with C-u through helm-M-x. But it seems doesn't work. Here's the key sequence I have tried: `C-x M-x <type the cmd> C-u <RET> But it seems ...
0
votes
3answers
585 views

Combining ssh through 'term' with 'tramp' to open file in buffer

Often I ssh onto a remote machine from ansi-term and wish to open various files in Emacs. As I see it, there are two options: emacs -nw filename - hiding the terminal, opening the file in the current ...
1
vote
1answer
192 views

How can I restart an ansi-term buffer?

I have an open buffer with major mode ansi-term, and with scrollback. This buffer has crashed. I'd like to "recycle" the buffer into a new ansi-term such that scrollback is kept. How can I do this?
0
votes
1answer
401 views

UTF-8 native locale for ansi-term

When I try to connect to a remote machine from an ansi-term terminal using mosh (a remote terminal application), I get the following: $ mosh -- user@host.domain mosh-server needs a UTF-8 native ...
3
votes
1answer
1k views

Why does the Emacs ansi-term and Emacs shell PS1 prompt not match my system PS1?

I'm running Mac OS 10.10.3; Emacs is complied and installed via Homebrew; I run it as a GUI application and it reports This is GNU Emacs 24.4.1 (x86_64-apple-darwin14.1.0, NS apple-appkit-1344.72) ...
5
votes
3answers
1k views

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 is: LANG="en_AU.UTF-8" LC_COLLATE="en_AU.UTF-8" LC_CTYPE="en_AU.UTF-8" LC_MESSAGES="en_AU.UTF-8" LC_MONETARY="...
3
votes
3answers
128 views

Reading info files without knowing their path

If I'm in a terminal, I can just type info glibc and get info about glibc. Since emacs reads info files, it's silly to use M-x term to read info files from within emacs. I know you can use C-u C-h i ...
0
votes
1answer
270 views

Toggling maximize-window in a buffer running ansi-term

I have been using the following function to maximize and unmaximize a window for two years now. (defun toggle-maximize-buffer () "Toggle maximize buffer" (interactive) (if (= 1 (length (window-...
2
votes
0answers
286 views

How to make ansi-term output read only?

When using ansi-term in line mode emacs lets you edit the buffer arbitrarily, not just after the last prompt. I'm trying to make it read only so I stop fudging with command output. The problem is all ...
0
votes
2answers
422 views

Extended Cursor Movement in terminal emulator (CHA and others)

Is there a way to get the Emacs terminal emulator to support cursor movement escape sequences beyond its vt100 features? A specific example is CHA (Cursor-Character-Absolute), e.g. ESC[0G should move ...
1
vote
1answer
123 views

Translating editing actions to keypresses for ansi-term?

For the speech recognition mode for emacs I'm working on I'd like to have support for working with the shell. I have shell-mode working fine but I'd really like to get ansi-term working since some ...
3
votes
1answer
116 views

Mongo console doesn't behave properly in ansi-term

In ansi-term when using mongo console (or 'repl') control codes do not seem to behave properly. When I move cursor it doesn't get redrawn at a expected location. Instead all entered text get appended ...
10
votes
1answer
1k views

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 ...
12
votes
1answer
1k views

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 ...
4
votes
1answer
616 views

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-...
9
votes
3answers
1k views

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 ...
4
votes
1answer
557 views

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

In ansi-term's "char run" mode, I can use C-<left> and C-<right> 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 ...
25
votes
1answer
602 views

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?