We’re rewarding the question askers & reputations are being recalculated! Read more.

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
0answers
40 views

Truncation of text in Emacs terminal emulators

When I log in to the cluster using shell or eshell, I get the following message: 2018-04-11: The MEM1024 node is now back in the queue. The hardware had to be completely replaced, which means there ...
1
vote
0answers
57 views

spacemacs opens file in terminal split

I'm using neotree and as you know it opens a file in the most recent window split you accessed before switching to neotree (window 0). Sometimes this last accessed split is the ansi-term window I ...
0
votes
1answer
37 views

Sending code to an ansi-term via isend-mode: How to modify default buffer chosen and how to automatically open ansi-terms?

I use isend-mode (see here) to send (bash) code to an ansi-term as follows: 1) `M-x ansi-term` # open ansi-term 2) Open buffer with code I want to send to *ansi-term* 3) `M-x isend RET *ansi-term* ...
1
vote
2answers
51 views

Why can't I use my custom keybinding in ansi-term's char mode?

I'm an emacs noob —why can't I use this key (global-set-key (kbd "M-o") 'other-window) defined in my emacs config, in ansi-term char mode? Are all meta keybindings simply passed raw to the ...
0
votes
1answer
53 views

Why is M-x remapped in ansi-term char mode?

I understand that you can use M-x in ansi-term's char mode by doing C-x M-x, but why can't it just be used normally? Is there some historical reason? I can use other meta commands (like M-f or M-b), ...
0
votes
1answer
51 views

ansi-term - wrong type argument: characterp, return

When using ansi-term on Emacs a get the following error whenever I press enter in char-mode: wrong type argument: characterp, return I used toggle-debug-on-error and get the following: Debugger ...
2
votes
2answers
114 views

How to make M-x ansi-term behave like M-x shell (opening in new window)?

I use (global-set-key (kbd "C-c a") '(lambda () (interactive) (ansi-term "/bin/bash"))) to open a bash ansi-term. Unlike M-x shell, this "occupies" the whole buffer/frame. I am wondering if one ...
1
vote
0answers
161 views

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 ...
2
votes
1answer
63 views

How to have a buffer interpret C-m as an actual carriage return

I'm using the following elisp snippet in a dedicated buffer to track progress of a wget download. (with-current-buffer buf (setq proc (apply 'start-process "my-download" buf (list "wget" (...
1
vote
1answer
53 views

Launch ncurses application and cleanup once it exits

I'd like to occasionally use hg split and hg commit --interactive from Emacs, but those commands bring up a GUI. At the moment I either use a separate terminal or ansi-term for those, but would like ...
1
vote
1answer
48 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-...
0
votes
1answer
135 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
64 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
252 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
196 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
209 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 $ ...
1
vote
2answers
839 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
957 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
119 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
142 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
373 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
160 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
184 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
639 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
2k 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
717 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
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 ...
3
votes
2answers
285 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
394 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
138 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
319 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
322 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
106 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
500 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
476 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
586 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
135 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
681 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 ...
4
votes
1answer
3k 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?
14
votes
1answer
1k 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 ...
1
vote
4answers
1k 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
489 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
860 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
69 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
234 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
561 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
225 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
347 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
222 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 ...