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
13 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
30 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
42 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 ...
3
votes
2answers
268 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
1answer
36 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
34 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
1answer
61 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" (...
2
votes
2answers
86 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
115 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 ...
1
vote
1answer
49 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
40 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
1answer
194 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:/...
0
votes
1answer
113 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 ...
0
votes
1answer
119 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
60 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 ...
2
votes
1answer
172 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
184 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
737 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 ...
0
votes
1answer
164 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 ...
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 ...
1
vote
1answer
739 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 ...
2
votes
0answers
130 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
351 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
143 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 ...
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 ...
3
votes
0answers
462 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-...
3
votes
2answers
587 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-...
0
votes
2answers
367 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 ...
1
vote
1answer
129 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 ...
0
votes
1answer
609 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 ...
0
votes
1answer
653 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
120 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 ...
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 ...
0
votes
1answer
987 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 ...
1
vote
1answer
290 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 ...
2
votes
1answer
469 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 ...
0
votes
1answer
96 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. ...
1
vote
0answers
272 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 ...
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 ...
3
votes
0answers
443 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
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.
1
vote
3answers
561 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
3answers
616 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
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 ...
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="...
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?
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 ...
1
vote
1answer
735 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
65 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?