Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

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
0 votes
0 answers
5 views

Avoid contents in M-x term to be shown out of the window

Table of contents The problem The question Appendix: Install and use font 5x7.bdf Appendix: My minimal Emacs configuration NOTE: This post contains many screenshots of the graphical interface of ...
rdrg109's user avatar
  • 418
1 vote
1 answer
26 views

How to make all lines in a buffer have equal height?

The context I'm using term in GNU Emacs 29.3. I usually use tmux inside *terminal* (i.e. the buffer that is opened by M-x term) and in my tmux configuration I made the tmux status bar to be displayed ...
rdrg109's user avatar
  • 418
0 votes
0 answers
13 views

is there any way to use a standard/built-in terminfo (vt100, ansi, xterm..) for a terminal

https://www.gnu.org/software/emacs/manual/html_node/emacs/Terminal-emulator.html says Term mode recognizes and handles ANSI-standard VT100-style escape sequences, which are accepted by most modern ...
Alex028502's user avatar
0 votes
1 answer
26 views

How to have 'emacs' behave like 'find-file' within vterm?

I know that such a thing is possible within eshell; however, I am now using vterm, and I'd like for when I type emacs for it to be as if I typed find-file. For example, for eshell, you could do alias ...
user129393192's user avatar
0 votes
0 answers
35 views

How can I bind a prefix key to escape term-line-mode?

I've figured out how to get out of char mode, but not the other way around;) #+begin_src elisp (with-eval-after-load 'term ;Terminal Orientation ;(define-key term-raw-map (kbd "C-M-e o l"...
Jason Hunter's user avatar
0 votes
1 answer
34 views

`term` often gets filled with random character codes, any suggestion on how to fix it?

I'm running doom emacs, and here's an example of a command I ran and the resulting output. For some reason, term gets filled with these random character codes. Any suggestions on how to fix this?
shintuku's user avatar
  • 121
0 votes
1 answer
109 views

When using ssh in term-mode, how do I get the remote system's hostname for emacs?

I regularly use term-mode then ssh into a remote machine to run bash commands. I want to display the remote machine's hostname in my modeline. I added the relevant code for the modeline but I'm having ...
Matt's user avatar
  • 3
0 votes
1 answer
173 views

How do I quit vterm's command history searching and start editing the command line?

vterm can search the command history by sending C-r to terminal process, but the command line cannot be modified unless it is executed as it is once. In other words, the string to search keeps ...
roomworoof's user avatar
0 votes
0 answers
27 views

When running `term` in standalone emacs on OSX, how can I copy output?

This question maybe sounds a bit strange, but I can't for the life of me work out how to copy output from term when it is running in the standalone version ("standalone" as in when emacs ...
Fergie's user avatar
  • 213
5 votes
0 answers
277 views

run “term” on MS-Windows

I typed M-x term; then Emacs prompted a query string followed by a default pathname: Run program: D:/Progs/emacs-29.1/libexec/emacs/29.1/x86_64-w64-mingw32/cmdproxy.exe Directly typed <return>. ...
shynur's user avatar
  • 5,318
3 votes
2 answers
235 views

Can Emacs render shell escape codes stored in a GNU Screen session log file?

The GNU Screen utility has the ability to log all shell output to a file, a useful feature to log the output of a long running build system, for instance. The log file generated by GNU Screen ...
PRouleau's user avatar
  • 796
1 vote
2 answers
88 views

How to prevent the character `^[(B` from being displayed on the compilation buffer

When I run the test feature of Rust in Emacs compilation mode, with ansi-color mode loaded, somehow the character ^[(B is always displayed like below: It looks quite annoying. Does anyone know how to ...
Trung Ta's user avatar
  • 301
0 votes
1 answer
17 views

strange squares in term mode

For some time I have been seeing strange squares on term-mode Here a example with 'top' command I am using emacs 28.2.50 with -q option. Any ideas ?
djangoliv's user avatar
  • 3,199
0 votes
1 answer
31 views

Hide divider when opening minimap

I would like disable divider-mode when enabling minimap-mode. How do I ?
mcp's user avatar
  • 67
1 vote
1 answer
1k views

Opening file in emacs buffer when using vterm

My current workflow is often to do things in a terminal and open/change relevant files in a text editor. Transitioning from VSCode to Emacs I am looking for a similar workflow that I got used to when ...
Johannes Nauta's user avatar
2 votes
1 answer
117 views

How to execute a command in elisp (startup script) whenever a new term is created?

I tried adding hook to term-mode-hook to call comint-send-string: (add-hook 'term-mode-hook (lambda () (comint-send-string (get-buffer-process (current-buffer)) "alias t='echo test'&...
AhLeung's user avatar
  • 1,083
0 votes
2 answers
89 views

After establishing a SSH connectia via eshell, "dumb" terminal can't run Emacs. Also vi does not work properly. How to solve this with Emacs?

After running eshell, I was trying to establish a SSH connection and do some changes on the server: ssh [email protected] The connection was successfully established (the real IP address was ...
Pedro Delfino's user avatar
0 votes
1 answer
41 views

A comparitive analysis of shell, eshell, and term: what are the similiraties? What are the differences between them? When to use each of them?

This question was previously answered in Unix Stack Exchange. It has not been answered here, in Emacs Stack Exchange. I believe new answers in a community fully dedicated to Emacs could go deeper. But ...
Pedro Delfino's user avatar
1 vote
1 answer
207 views

Why does `eshell` not create an active process In Emacs while `shell` and `term` do?

In Emacs, the features shell, term, and eshell are different commands used for similar goals. When executed, shell and term create active processes in Emacs. I expected the same for eshell. However, ...
Pedro Delfino's user avatar
0 votes
1 answer
99 views

How to enable terminal beeping?

xterm conviniently beeps on a failed unit test (pytest): Beeping (start-process "" nil "/usr/bin/xterm" "-e" "python3" "-B" "-m" "...
jjk's user avatar
  • 744
0 votes
2 answers
314 views

Why does htop command does not work on *shell*?

I tend to prefer shell over term. With shell everything is text and I can use the Emacs bindings to move around. Also, I have been trying to avoid opening my nixOS terminal. I have been trying to stay ...
Pedro Delfino's user avatar
1 vote
0 answers
49 views

How can I change buffer local key binding C-h, C-x, M-x in term raw mode?

I'm running a specific console application in a term window (char/raw mode). This application has no need for C-h, C-x, and M-x, so they should just do what they always do in Emacs. However, I don't ...
fred's user avatar
  • 21
0 votes
0 answers
182 views

How to have a multiple line prompt terminal?

Using mainly ansi-term,term or vterm I'd like the prompt to contain a line with informations for directory,user and git, whilst the actual input prompt line to be below. I've heard of zsh though doubt ...
jjk's user avatar
  • 744
-1 votes
1 answer
137 views

Using after-change-functions for an ansi-term buffer

I'm writing some Elisp that compiles code in watch mode using make-term. When the code compiles/tests pass, the compilation output is only a couple of lines. When there's an error, it can be much ...
rlms's user avatar
  • 99
3 votes
1 answer
577 views

How to make 'term' close the buffer when the process exits?

When I press Ctrl-D in a 'term', the buffer stays open with the text "Process terminal finished". How can I make this buffer close instead of staying open with this text displayed? Note, ...
ideasman42's user avatar
  • 8,826
0 votes
1 answer
90 views

How to launch 'term' with my default shell without a prompt to select the shell?

I would like to launch term with my default shell, without being prompted every time for the path of the shell. How can I bind a key to term without being prompted for the shell to run?
ideasman42's user avatar
  • 8,826
0 votes
0 answers
675 views

Interactive terminal solution for Emacs on Windows?

I recently tried to move from over to Emacs but hit a brick wall while trying to setup a terminal. While shell and eshell work fine, they are not really interactive so you can't really run things such ...
daedsidog's user avatar
  • 157
2 votes
1 answer
431 views

Prevent term from asking me which shell to use

I want to use /bin/bash as default shell for term avoiding it to ask me every time. Is this possible?
Francesco Cadei's user avatar
1 vote
2 answers
309 views

How to open `crontab -e` in emacs terminal editor?

I am trying to open crontab -e in emacs terminal editor, but it keeps opening it as GUI. After running crontab -e emacs windows pops up rather than opening it as terminal editor. $ crontab -e no ...
alper's user avatar
  • 1,380
0 votes
0 answers
30 views

Create term horizontal split that is 20% size key binding

I'd like a key binding that can create a term buffer in a 25 percent split. What I mean by that is, with a specific key binding like SPC t c, I'd like to open up a terminal in a split.
abhinav chavali's user avatar
0 votes
1 answer
148 views

What is the keycode of C-TAB?

iTerm does not send ctrl+tab itself, so I need to configure it myself. I can't figure it what key code ctrl+tab is though.
HappyFace's user avatar
  • 830
0 votes
0 answers
51 views

Switch Emacs default shell from bash to zsh or fish [duplicate]

When I deleted the zsh shell to move to fish, alot of my emacs configuration got messed up. It won't recognize my racer (Rust autocomplete) or do syntax highlighting. When I run doom reload, it gives ...
abhinav chavali's user avatar
1 vote
1 answer
358 views

How can I bind F12 in serial-term mode to minicom's F12?

When I use emacs serial-term mode Can I invoke F12 or other function keys as minicom's F12? I tried below... but it doesn't work (global-set-key [f12] nil) Thank you in advance!
hyuk myeong's user avatar
1 vote
1 answer
358 views

Wait for result of fzf without blocking input

I'm trying to make use of the fzf fuzzy finder to search through a list via a term process. The way I do this is very similar to fuzzy-finder.el or fzf.el. This is by launching fzf with: (progn (...
MHilton's user avatar
  • 131
0 votes
1 answer
106 views

Emacs' C-tab seems without effect on my server through ssh

(Emacs 27.1) On my local machine <C-tab> is linked to other-window and works well: .emacs.d/init.el: (global-set-key (kbd "<C-tab>") 'other-window) When I install Emacs on a (...
suizokukan's user avatar
0 votes
0 answers
40 views

Weird UI of term in Doom

My terminal in Doom looks like shown in picture but I can't seem to find a way to solve this. I have term activated in my init.el
DiogoJDO's user avatar
2 votes
1 answer
135 views

Elisp - Changing directory in shell buffer

I want to open an instance of a terminal emulator (in my case term) and go to a specific directory, all with a single Elisp function. My idea was to send a specific string programmatically to the ...
Andrea's user avatar
  • 173
0 votes
1 answer
94 views

Setting `scroll-margin` for `term-mode` using `unless` is not working

I want to set default value of scroll-margin to 3 but for ansi-term I want it to be 0. To do this I have added a hook to term-mode-hook which worked fine. (setq scroll-margin 3) ...
Chinmay Chhajed's user avatar
0 votes
1 answer
65 views

Why does `term-emulate-terminal` get executed every time `read-from-minibuffer` gets executed?

Why does term-emulate-terminal get executed every time I execute counsel-switch-buffer if and only if the *terminal* buffer is open in a window. If the *terminal* buffer is not in a window term-...
John DeBord's user avatar
1 vote
0 answers
111 views

Why does calling `term-send-backspace` (just pressing backspace) create a newline in the `*terminal*` buffer in `term-mode`?

Specs: i@debord:~$ emacs --version GNU Emacs 26.3.50 Copyright (C) 2019 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the ...
John DeBord's user avatar
1 vote
1 answer
244 views

M-x compile hangs with WARNING: terminal is not fully functional

I have been using M-x compile for ages. Lately (our sysadmin has updated many things) it hangs after giving this message: WARNING: terminal is not fully functional - (press RETURN). Pressing return ...
Gopal Patnaik's user avatar
1 vote
1 answer
61 views

How to override Q in term-mode with passthrough if the shell process is still live?

I wrote the following emacs lisp procedure to kill a dead ansi-term buffer. It works well if called with M-x. Also, it appears to run correctly when the called in a living term buffer. However, dead ...
wdkrnls's user avatar
  • 3,707
0 votes
0 answers
21 views

How to wrap visual program with term? [duplicate]

I have installed visidata and am trying to integrate into my Emacs workflow through term-mode. As a proof of concept, I'm trying to successfully explore the mtcars data set as it would work when ...
wdkrnls's user avatar
  • 3,707
0 votes
0 answers
794 views

Python : name '__file__' is not defined

So as you can see, in my terminal, I was able to execute the file without error, but once I tried from the python shell, whether in the terminal or the one integrated in Emacs, there is an error, it ...
sinekonata's user avatar
1 vote
0 answers
128 views

emacs -nw & gnome-terminal or xterm: can't distinguish C-M-v and C-M-S-v

emacs (v.26.3) can distinguish, out of the box, C-M-v (scroll-other-window) and C-M-S-v (scroll-other-window-down). On the other hand, emacs -nw, when run in either gnome-terminal, mate-terminal or ...
Diagon's user avatar
  • 147
0 votes
2 answers
564 views

How to get kill-buffer-hook to detach a screen session prior to kill-buffer?

I keep many screen session running in the backgroud, which I access with M-x eshell-command "screen -r <myscreen>". Before I kill the *screen* buffer, I have to detach the session with C-a d. ...
petermao's user avatar
2 votes
0 answers
40 views

How to restore a coding environment?

Every other day I continue work on a coding project which involves these steps: Open a file in the project Open a terminal buffer e.g.: m-x term Change to that term buffer Enter command in termin e.g....
jjk's user avatar
  • 744
0 votes
0 answers
1k views

How do I stop a process with Ctrl-C in Term?

I'm very new to Emacs. I've opened a terminal with M-x term, and started a server running on localhost. It says Press CTRL+c to quit. However, Ctrl-C appears to be mapped to Emacs commands. How can I ...
Josh Friedlander's user avatar
0 votes
3 answers
2k views

How can I use Emacs and iTerm for the same key binding?

In my .emacs file I have also set ctrl-o to delete a word: (defun backward-delete-word (arg) "Delete characters backward until encountering the beginning of a word. With argument ARG, do this ...
alper's user avatar
  • 1,380
0 votes
1 answer
398 views

How to quit serial-term?

I opened a serial-term to /dev/ttyUSB0. I can't quit it. C-x k results in the following message: term-quit-subjob: Process /dev/ttyUSB0 is not a subprocess
Harvey's user avatar
  • 978