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
3
votes
2answers
774 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-...
4
votes
1answer
451 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 ...
25
votes
1answer
635 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?
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 ...
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 ...
1
vote
3answers
397 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 ...
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 ...
1
vote
1answer
329 views

Startup script for term-mode

In the documentation for shell-mode: Emacs sends the new shell the contents of the file ~/.emacs_shellname as input, if it exists, where shellname is the name of the file that the shell was ...
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
2answers
646 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-...
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
264 views

Emacs opens gitbash in new system window

I've try to follow this question and sulution Git Bash in emacs on Windows I have this function: (prefer-coding-system 'utf-8) (defun git-bash () (interactive) (let ((explicit-shell-file-name "C:/...
1
vote
0answers
337 views

ansi-term changes in line-mode not registered after char-mode

Here's the situation. I start M-x ansi-term, which launches it in term-char-mode. I type the following: echo "hello world" and press RET, which outputs on the next line the expected output hello ...
1
vote
1answer
49 views

How to call lynx on URL inside a program

During my LaTeX typesetting I need to "visually" check if URLs point to reacheable pages. I'd like to do it with lynx in a separate emacs buffer so I wrote this function: (defun urls-check-if-working-...
1
vote
0answers
101 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
1answer
1k views

How do I open an ansi-term on a remote server via Tramp?

I am editing a file on a remote server via Tramp, and I decide that I want to open up an ansi-term session on the remote server (as opposed to relying on shell-command). How do I do this? When I run ...