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
1 answer
29 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
25 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
  • 173
1 vote
0 answers
70 views

“term mode” on MS-Windows

I tried to use term-mode on MS-Windows, but my attempt failed. I first started Emacs: PS D:\Progs\emacs-28.2\bin> .\emacs.exe -nw -q Then I used M-x term, and Emacs prompted a query string (...
shynur's user avatar
  • 2,449
3 votes
2 answers
84 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
  • 724
1 vote
2 answers
35 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
  • 291
0 votes
1 answer
16 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,159
0 votes
1 answer
22 views

Hide divider when opening minimap

I would like disable divider-mode when enabling minimap-mode. How do I ?
mcp's user avatar
  • 47
0 votes
0 answers
24 views

Trigger term buffer moving point to the end after sending command

I'm using: (display-buffer term 'display-buffer-use-some-window) (term-simple-send (get-buffer-process term) cmd) to send a command to a Term buffer and displaying the result in other window. It is ...
gavenkoa's user avatar
  • 3,310
1 vote
1 answer
456 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 ...
J Nauta's user avatar
  • 13
2 votes
1 answer
53 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,063
0 votes
0 answers
28 views

Using Term mode to ssh from Linux to Windows

Windows 10 ships an SSH server. I am using it for running PowerShell from Linux. When I do this from the Linux terminal (I tried in Xfce and LX terminals), everything is smooth. I run: ssh user@192....
antonio's user avatar
  • 1,752
0 votes
2 answers
58 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 root@111.222.333.444 The connection was successfully established (the real IP address was ...
Pedro Delfino's user avatar
0 votes
1 answer
35 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
174 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
30 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
  • 663
0 votes
2 answers
166 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
41 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
115 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
  • 663
-1 votes
1 answer
102 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
330 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,187
0 votes
1 answer
62 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,187
0 votes
0 answers
382 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
  • 123
2 votes
1 answer
308 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
0 votes
1 answer
173 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,140
0 votes
0 answers
27 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
136 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
  • 738
0 votes
0 answers
48 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
262 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
283 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
96 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
39 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
115 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
83 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
62 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
98 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
231 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,617
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,617
0 votes
0 answers
697 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
106 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
  • 133
0 votes
2 answers
428 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
34 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
  • 663
0 votes
0 answers
791 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
1k 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,140
0 votes
1 answer
287 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
  • 968
0 votes
1 answer
62 views

How do I open a .gpg file from the command line?

I have a file located in the directory ~/myfiles/list.txt.gpg. In the terminal, I type emacs ~/myfiles/list.txt.gpg and I get something that looks like this, which I'm guessing is the still encrypted ...
Hitomi86's user avatar
0 votes
0 answers
220 views

Send command to run in eshell, after compiled

So I've been mapping my M-x compile like this, according to c-mode-hook or c++-mode-hook: (add-hook 'c++-mode-hook (lambda () (set (make-local-variable 'compile-command) ...
mle0312's user avatar
  • 295
0 votes
0 answers
40 views

Record command into bash source block using asciinema and org-babel

As you perhaps know, asciinema rec (asciinema rec path/to/file) and generate an asciicast file which contain all commands recorded on terminal. I think using asciinema to replay this file (asciinema ...
reyman64's user avatar
0 votes
1 answer
151 views

How to show colours and clear when running React development server in eshell?

Here is how the usual Ubuntu terminal looks when you run the React development serving using npm start and make changes to your source: Say the server was already running and you tried to do npm ...
scribe's user avatar
  • 896
1 vote
0 answers
83 views

How to make ansi-term wrap lines instead of adding newline so it can fit the window?

See the screenshot. I typed one long line in the buffer, didn't hit enter but cursor is already on line 3. This causes multiple problems, eg. when I copy the output of a command from ansi-term to ...
whysoserious's user avatar