Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

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

Term double prompting (duplicate prompts) in Emacs

My term in emacs appear: 0;me@debian: ~me@debian:~$ instead of me@debian:~$ ~$ echo $PS1 \[\e]0;\u@\h: \w\a\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;33m\]\w\[\033[00m\]\[\033[0;35m\]$\[\033[0m\] ...
2
votes
0answers
40 views

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 ...
1
vote
1answer
76 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:/...
2
votes
1answer
106 views

Nano not displaying correctly in term and ansi-term

Nano is displayed incorrectly in emacs when using term or ansi-term. This is what nano is supposed to look like (run in an ordinary terminal emulator): This is nano as run from ansi-term: In the ...
2
votes
0answers
86 views

Output reflow in ansi-term [duplicate]

In gnome-terminal, the output of some commands is automatically "reflowed", in the sense that if the file tmp has content 0000000000 and the terminal has width 9, the output will be displayed as $ ...
0
votes
0answers
46 views

Emacs ansi-term with tig results in glitch

I've used vanilla emacs in Mac and run M-x> ansi-term. And there I ran "tig" command and get glitched result. And FYI, if there's letter something like "é", the results get worse. Two items were ...
0
votes
0answers
33 views

ps output is truncated in terminal facilities: term, ansi-term, eshell

When using terminal (either ansi-term or term) on Emacs and doing a ps to get some processes I would like to get the full command line of a process, though the output gets trucated. For example, ...
1
vote
2answers
355 views

How to paste into ansi-term (evil-mode)

I want to copy some text from my browser and paste it into ansi-term. I am a vim user and I want to give spacemacs a try once again. Naturally what I did was: Opening ansi-term by typing SPC SPC ...
1
vote
1answer
428 views

Emacs incompatible with oh-my-zsh?

I'm noticing something really odd in my ansi-term windows on my new Mac, see below: I am using: GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build ...
0
votes
1answer
93 views

How to properly display script shell command output

I wish to be able to open current shell output in emacs, for that I use script command that logs all the output into file typescript. The problem is that it consist also with terminal codes for colors ...
2
votes
0answers
111 views

ANSI TERM via `M-x TERM`: How to change line highlighting color?

How do you change the line-highlighting color in an ANSI-TERM?: I am using PDB++'s sticky mode for Python debugging. This is how to appears on a regular terminal (lubuntu 17.04): Notice the word ...
0
votes
1answer
286 views

How to change default color theme for ansi-term?

I have the package color-theme-buffer-local, which allows you to change the default color theme on a per-buffer basis. I added this to my config: (add-hook 'term-mode (lambda nil (color-...
0
votes
1answer
109 views

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

Does slime-repl-ansi-color work at all these days?

I was unable to make it display ansi colorized output in Lisp REPL despite this project claims. https://github.com/deadtrickster/slime-repl-ansi-color The code seemingly doesn't do anything except ...
0
votes
1answer
402 views

Normal C-c in ansi-term

In ansi-term, it automatically rebinds C-c to have the same keybindings as C-x. I want to turn this behaviour off, so I can access the keybindings I have behind C-c. (I know about C-c C-j, but that's ...
2
votes
2answers
1k views

Fish shell looks weird in spacemacs

Any other shell besides eshell and shell in Spacemacs with Emacs v25.1.1 (GUI version) looks like this: To compare, the terminal in iTerm looks like this: The font that I use in my terminal is ...
0
votes
1answer
436 views

Ansi-Term not reading .profile

my question is very similar to this one. I use my .profile file to set environment variables, such as EDITOR. However, when I run ansi-term and type printenv I can see that that variable is not ...
0
votes
1answer
758 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 ...
3
votes
2answers
208 views

Calling emacsclient from ansi-term makes emacsclient hang, how do I get around this?

Sometimes I use ansi-term in emacsclient instead of directly using my shell. When I do this, it is not an infrequent occurrence that I forget where I am and call emacsclient someFile, which freezes ...
0
votes
2answers
277 views

backspace and backarrow don't work properly in node.js repl in emacs term

I have opened a terminal using M-x ansi-term. Everything else seems to work as expected. However, when I use the node.js repl, or the mongdb repl, or any other interactive node program, backspace ...
0
votes
1answer
81 views

How to fix <delete> and arrow keys in ansi-term on macOS

I'm running emacs on macOS, and I've run into problems with ansi-term. Using bash itself works fine, but as soon as I run a simple application with a command line interface, my <delete> and ...
1
vote
1answer
223 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 ...
1
vote
0answers
202 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 ...
0
votes
1answer
70 views

How to run rspec from the emacs shell?

I'm following an entry-level tutorial on rspec here, and I've created a very simple test at spec\lib\zombie_spec.rb: require "spec_helper" describe "A Zombie" do #Your 'examples' (tests) go here. ...
2
votes
1answer
351 views

ansi-term scroll problem on fast output

I use a terminal from within Emacs via M-x RET ansi-term RET. The problem is that when I run a program which echoes a lot of output, ansi-term first scrolls with the output (such that the last line of ...
3
votes
0answers
297 views

Terminal Buffer: error in process filter: Invalid face: unspecified

On Fedora 25 with GNU Emacs 25.1.90 (which I am running via an AppImage, you can download it from here and test out your theories as to what's wrong if you would like, remember AppImages will only ...
1
vote
3answers
485 views

How to execute shell command from editor window?

I have two windows open - one in editor mode with some SQL, bash, etc and the other in ansi-term. I want to mark my text and then execute it in the ansi-term window. Yes, I could make a shortcut ...
1
vote
1answer
106 views

Some UTF-8 characters break my ansi-term. How to fix it?

I've got a script that generates some output. Some parts of the output are cyrillic letters, and they cause my ansi-term to break - I guess they are treated as control characters(they are displayed ...
1
vote
3answers
480 views

How to copy text from a buffer to an ansi-term

If I create a second window with a terminal in it like: C-x 2; C-x o; M-x ansi-term How can I copy text from a buffer into this terminal? I seems like the ansi-terminal has its own kill-ring (maybe ...
3
votes
1answer
2k views

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?
13
votes
1answer
837 views

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

From eshell or ansi-term can I open a file in the same window without a new instance of Emacs?

I'm wondering if anyone knows of a clever way in Emacs when in a shell, can I directly open a file without having to open it in another Emacs instance.
3
votes
0answers
378 views

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-...
1
vote
1answer
452 views

ncurses-like based applications won't work in emacs terminals

No *curses applications (like top, htop, Linux kernel's make menuconfig and others) will work under emacs' different terms. However, the only one which seems to work is git add -i It behaves the same ...
1
vote
0answers
17 views

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 ...
0
votes
1answer
53 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
214 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
457 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
198 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
254 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
139 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 ...
4
votes
0answers
332 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 ...
1
vote
3answers
286 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
723 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
192 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 ...
2
votes
2answers
509 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
85 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
358 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
163 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 ...