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
0
votes
1answer
68 views

Enable cua-mode in term or ansi-term mode

While working with term or ansi-term in term-line mode, I am not able to use cua-mode bindings. Is this possible?
1
vote
0answers
231 views

Fish & ansi-term text background colour

I'm using fish as my default shell and spacemacs config layers in emacs. My default term is an ansi-term. Does ansi-term support text background colours? Foreground (text) colours seem to work fine! ...
0
votes
1answer
550 views

why tmux under ansi-term so slow?

I use colorized output in ghci. And if run it: in comint-mode, or in eshell, then colors displayed fine, but a lot of escape sequences displayed like ^A^Bλ ^A^B> ^A^B^B. in ansi-term, then I got ...
3
votes
0answers
223 views

Emacs 25 + comint + -nw = eaten newlines

I've been building and running Emacs 25 prereleases on a recent Fedora system that I usually access via ssh. I usually run this emacs in a terminal, and I'm fond of using ansi-term inside it. I've ...
0
votes
1answer
335 views

term-raw-map and local-unset-key - Need to pass <M-(left,right,up,down)> to shell

As ansi-term doku tells us: any key which is not in use by emacs will be passed down to shell running inside term-mode. As an example - I have a screen session running inside ansi-term and configured ...
1
vote
1answer
215 views

“smart” ansi-term on start-up?

I have the following line in my .init.el (ansi-term "/usr/bin/bash") , because I usually like to have a terminal running in my emacs. The problem is that sometimes I don't, for instance, when I just ...
1
vote
3answers
370 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
0answers
416 views

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 ...
4
votes
2answers
831 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
228 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
723 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 { ...
0
votes
0answers
182 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 ...
4
votes
1answer
428 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 ...
2
votes
1answer
478 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 ...
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
597 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
194 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
409 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) ...
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
3answers
129 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
2answers
423 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 ...
0
votes
1answer
282 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
291 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 ...
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
623 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-...
4
votes
1answer
559 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
607 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?