Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [term]

is for the Emacs text terminal emulator, which by default runs in a sub-shell in a buffer named `*terminal*` with `term-mode`. `M-x term` command starts a terminal.

Filter by
Sorted by
Tagged with
25
votes
1answer
621 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 ...
11
votes
1answer
2k views

in term-mode, how do I run regular emacs commands?

Upon starting term-mode, Emacs delegates all keypresses to the terminal you're running. That's great for compatibility purposes, but leaves Emacs functionality behind. How do I get back to Emacs ...
8
votes
2answers
1k views

How to override keybindings for `term`

For some tasks like using ruby's pry and tmux both eshell and shell do not behave well. I tried to use term, but my innability to override the keybindings in term makes its use annoying. How can I ...
6
votes
1answer
280 views

Problem with line number limit in linum-mode

I am using the term of Emacs to compile some code, with linum-mode enabled to display the line numbers for the terminal, and the line numbers stop increasing as soon as they reach 2049. If I write ...
6
votes
3answers
3k views

Is it possible to use Bash for Windows as the term in Emacs for Windows

When I run M-x term on the Windows version of Emacs, I am prompted to run C:/Program Files/emacs/libexec/emacs/25.1/x86_64-w64-mingw32/cmdproxy.exe New versions of Windows 10 have the Linux subsystem ...
5
votes
3answers
778 views

How to open and rename several multi-term buffers on start-up?

After each reboot, I have to painfully re-create and rename the multi-term buffers I use in my daily routine. I am completely new to Lisp, but nonetheless, I searched for similar problem on the web ...
5
votes
1answer
273 views

Difference between shell and term [duplicate]

I would like to understand what is the difference between M-x shell and M-x term? Also under which circumstances should be used the first and under which the second?
4
votes
1answer
623 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 ...
4
votes
1answer
225 views

(How) can I emulate {eshell,comint}-output-filter-functions in term?

What I want to do from inside a term shell is have a function called when there is new output or a certain regexp (e.g. a prompt) appears in in a term's output. The callback function should then be ...
4
votes
0answers
189 views

Rename buffer in Ibuffer

A buffer can be renamed with rename-buffer command. Is it possible to rename buffers from IBuffer? A use case is to rename a bunch of Term buffers from Ibuffer. The default name for Term buffers is *...
3
votes
2answers
5k views

How can I quit Emacs from within a term within Emacs?

I'm in a situation where I have to ssh into a machine and do all of my coding on there. For a while I would ssh in and then use tmux and emacs -nw mode. Recently, I discovered the term command. Now ...
3
votes
3answers
132 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 ...
3
votes
2answers
2k views

How to get a fully functional Julia REPL in emacs?

Some people like me prefer to keep as much as possible in one emacs window (it saves screen retail), so want to run Julia as an inferior shell in emacs. The "run-julia" command that comes with the ...
3
votes
2answers
115 views

How to launch terminal.app from elisp

I've been using shell-pop recently, and it's nice how I can pop to default-directory in term immediately. For the times I'd rather use a dedicated terminal, is it possible to create an equivalent for ...
3
votes
2answers
229 views

Emacs term loses characters when using ps and grep

I'm trying to use different terminals on Emacs. The one I'm currently trying is term. When I execute a ps command and grep its output on Emacs, I don't get the same result as in gnome-terminal, xterm,...
3
votes
1answer
86 views

Saving raw ANSI escape codes in M-x shell, M-x eshell, or M-x term

Each of M-x shell, M-x eshell, and M-x term in Emacs lets me save the buffer to a text file. But the terminal colors are not saved. How do I save the raw ANSI escape sequences too?
3
votes
0answers
78 views

Switch between term and shell keeping directory

I am a beginner user of emacs so please answer being aware of this. I use dired to connect to a remote computer and navigate directories. I sometimes want to go to a shell or terminal on the remote ...
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 ...
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-...
2
votes
2answers
953 views

Can I completely replace xterm with emacs' term mode?

What short comings can I expect from this mode, and what are some use cases for which I should really prefer my operating system's terminal emulator?
2
votes
2answers
1k views

TERM, terminfo, termcap. What are they how does Emacs use it?

I have a few questions about the relationship between TERM, terminfo and termcap and Emacs. I do not know exactly what TERM, terminfo and termcap are. I am on OS X. I do not know what values (and ...
2
votes
2answers
116 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 ...
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
1answer
600 views

In term-mode how can I make line-mode the default

Got line-mode to work as for this: in term-mode, how do I run regular emacs commands? Now how do I make it the default ?
2
votes
2answers
311 views

Running a command in term from eshell with arguments

Basically I want to run watch from eshell. Simply running watch date (for example) doesn't work (only the first header line is displayed). Apparently I should run it with term or ansi-term but these ...
2
votes
1answer
562 views

Term buffer font-size

I am trying to make term buffer to use slightly smaller font than of the rest of Emacs. I was able to quickly find that for that I need to customize term face. I changed the font size, and indeed ...
2
votes
1answer
195 views

Is it possible to alias an internal command?

Since I discovered multi-term, I use it exclusively over term or eshell. But, I'm lazy and would prefer to be able to simply type term to activate multi-term. Is this possible?
2
votes
1answer
40 views

How to launch term at startup in Emacs?

I need to have Emacs open a terminal at start-up automatically (in order to use Fish in the terminal and use Emacs to for example search the Fish output). Normally I do this with 'M-x term'. Is ...
2
votes
1answer
95 views

emacs 27.0.50 term.el doesn't play well with zsh

I used to compile emacs from the master branch every month or so and looks like there has been a lot of changes to term.el (move to lexical binding) and when I open term or ansi-term there is always a ...
2
votes
1answer
412 views

How to avoid term turn line wrap into line break for long output

When the output in term is longer than the frame it will wrap the line. But when I copy and paste the output, I found the output will break under the wrap point, because it treat it as line break. How ...
2
votes
1answer
2k views

How do you set colors for term?

I want to run tmux in emacs. I checked that it works in term, but default colors are awfully hard to read: How can they be changed to a sensible setting from .emacs file?
2
votes
1answer
402 views

Strange behavior when killling text in term/multi-term [duplicate]

multi-term is my current goto when I want a command line in Emacs. However, I have noticed a strange behavior, and I am not sure whether it is a bug, or if it can be configured. If I type a command ...
2
votes
1answer
34 views

Emacs term in character mode still catching my keymap

I have the following code in my init.el (defun my-foo (arg) (interactive "^p") (message "We got hit") ) (defvar my-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "C-r") '...
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 ...
2
votes
1answer
132 views

Writing a complex dired function to open xterm and execute a command on all current marked files in dired

I'm trying to write a complex (to me) dired function, where I want to open a xterm window which will launch an application (fbot) with many arguments and input all marked dired files into that ...
2
votes
1answer
276 views

Make comint-mode behave more like term-mode

I am constantly getting frustrated with the GDB comint-mode buffer when using GUD. Somehow my cursor always ends up straying from the bottom of the buffer, and then my input is not interpreted how I ...
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 ...
2
votes
0answers
309 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 ...
1
vote
1answer
456 views

Why does emacs (getenv “TERM”) return incorrect data?

I'm running Emacs 25.2.2 on Ubuntu 17.10. Although my environment has TERM=xterm-256color, (getenv "TERM") returns dumb, which is incorrect. Why does (getenv "TERM") return an incorrect value?
1
vote
1answer
992 views

Spacemacs - start popup terminal window in evil-normal-state

I've added these keybinding configuration in my Spacemacs dot file, so that I can toggle the terminal by press the \ key. ;; Keybindings (define-key evil-normal-state-map (kbd "\\") 'spacemacs/...
1
vote
1answer
236 views

Extra output after every command running zsh in terminal

When running a command in the *terminal* in emacs, I always have the command I executed repeated twice with some extra text before the output of the command. For instance: $ echo "test" 2;echo1;...
1
vote
1answer
73 views

Can emacs be configured to support more terminals?

I recently switched from rxvt-unicode to st. This means I went from $TERM=rxvt-unicode-256color to $TERM=st-256color. I'm happy with the switch and want to continue to use st. However, I quickly ...
1
vote
1answer
75 views

Interactive lambda only calls 1 of several functions called in body

In term-mode I've configured the keybindings for term-line-mode and term-char-mode as follows: (setq term-bind-key-alist (list (cons "C-c C-j" '(lambda () (interactive) ...
1
vote
1answer
224 views

utf-8 characters with eshell, eshell-visual-subcommands, and git

Using the configuration (eval-after-load "em-term" '(progn (add-to-list 'eshell-visual-subcommands '("git" "diff" "help" "log" "show")) (add-to-list 'eshell-visual-options '("git" "--help"...
1
vote
1answer
79 views

have a function to disable close confirmation on terms. work on all terms but shell?

so i have this function i found on the interent (defun set-no-process-query-on-exit () (let ((proc (get-buffer-process (current-buffer)))) (when (processp proc) (set-process-query-on-exit-...
1
vote
1answer
158 views

Where is this cruft coming from in shell-mode and term-mode?

tcsh$ cd ~ ^[]0;sallred@calamity:/home/sallred^G tcsh$ cd bin ^[]0;sallred@calamity:/home/sallred/bin^G tcsh$ What is this cruft that is appearing before my prompt (or perhaps more appropriately, ...
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
186 views

Multi-term issue with line wrapping for shell but not applications

I use multi-term within spacemacs for most of my command-line operations. It works well except some annoying behavior in the shell prompt (zsh but similar for bash) on commands which go over the ...
1
vote
0answers
231 views

Powerline rendering in EMACS

The rendering of term command in emacs runs my zsh shell but doesn't render it properly. Can anyone direct me to a fix? This is how it should look: