People who code: we want your input. Take the Survey

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
2
votes
1answer
39 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, ...
0
votes
1answer
22 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?
0
votes
0answers
20 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 ...
0
votes
0answers
35 views

How to use vterm in emacs to edit a file and close it normally?

When use emacs to open a new buffer for vterm, do some terminal operation as edit an ansible-vault file ansible-vault edit foo.yml It maybe use vim by default. When switch to an another buffer then ...
1
vote
1answer
45 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?
0
votes
1answer
30 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 ...
0
votes
0answers
22 views

Create term horizontal split that is 20% size keybinding

I'd like a keybinding that can create a term buffer in a 25 percent split. What I mean by that is, with a specific keybinding like SPC t c, I'd like to open up a terminal in a split.
0
votes
0answers
19 views

What is the keycoode 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.
0
votes
0answers
27 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 ...
1
vote
1answer
58 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!
0
votes
1answer
70 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 (...
0
votes
0answers
30 views

term face font initially works but then falls back to default

I have defined my faces for the term group that way: '(term ((t (:inherit default :family "Courier")))) and all other colours pretty similarly. (I have also tried defining it without using ...
0
votes
1answer
42 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 (...
0
votes
0answers
29 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
1
vote
1answer
40 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 ...
0
votes
1answer
25 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) ...
0
votes
1answer
43 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-...
1
vote
0answers
61 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 ...
1
vote
1answer
118 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 ...
1
vote
1answer
27 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 ...
0
votes
0answers
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 ...
0
votes
0answers
177 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 ...
0
votes
0answers
51 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 ...
0
votes
2answers
169 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. ...
2
votes
0answers
26 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....
0
votes
0answers
151 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 ...
0
votes
3answers
677 views

How can I use Emacs and iTerm for the same keybinding?

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 that ...
0
votes
1answer
91 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
0
votes
1answer
44 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 ...
0
votes
0answers
132 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) ...
0
votes
0answers
30 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 ...
0
votes
1answer
94 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 ...
1
vote
0answers
37 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 ...
1
vote
0answers
89 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 ...
0
votes
0answers
43 views

Is there a pexpect like automation for serial-term or term-mode

Is there something similar to pexpect that can be used to automate a tty connection running inside emacs, i.e. in term-mode or on top of serial-term ? I'd like to automate some repetitive tasks like ...
1
vote
0answers
62 views

In emacs term-mode (not shell-mode), how can we edit a command just like we type C-x C-e in real terminal

In real terminal, if we type C-x C-e, we can edit a typed command using an editor. Could have similar function in emacs term-mode? After typing a shortcut, I would like to edit the current command ...
0
votes
0answers
81 views

C-r in term-mode doesn't access reverse-i-search

I find that in term-char-mode with bash, C-r doesn't activate the shell's reverse-i-search function. How can I do that? PS. Apologies: I was using multi-term mode and had somehow convinced myself ...
2
votes
1answer
179 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 ...
3
votes
2answers
973 views

Howto display unicode character \u2026 in terminal mode in emacs

Magit uses Horizontal Ellipsis unicode escape "\u2026" (which should display as "...") to mark hidden section. How can I configure the Terminal/Emacs to display them when running in terminal mode (...
3
votes
2answers
412 views

Cargo-process does not accept user input

Using the Emacs mode for Cargo, I'm able to build and run Rust code inside Emacs. However, the terminal that opens when executing cargo-process-run does not accept user input. For example, when ...
0
votes
1answer
462 views

Set different highlight-line color for emacs --no-window

How can I set a different color if I am using emacs on terminal (emacs --no-window)? I use a grey highlight line when using emacs with GUI because my background theme is white. Here is the code I use ...
1
vote
1answer
143 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 ...
3
votes
2answers
616 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
1answer
94 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) ...
0
votes
1answer
42 views

How input all params from console without interactively?

Here snippet of my elips function: (defun log-report (filePath uniqueText) "Create log4j record report from any log4j (e.g.traceXXX.log) files. Log4j level MUST be in square brackets. e.g.: [DEBUG] ...
2
votes
1answer
364 views

terminal fringes and diff-hl

I use diff-hl to highlight changed lines. However it doesn't play well in terminal mode. I know that terminal Emacs doesn't support fringes, and it is better to use diff-hl-margin-mode instead, it ...
0
votes
1answer
126 views

Wrong default-directory when inside a tmux session

I'm trying to use tmux inside emacs for a long time. I want to use it to attach to remote (long living) session. Attaching to sessions works fine but I have some problems in my daily workflow because ...
1
vote
0answers
332 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 ...
2
votes
1answer
1k views

Set 24-bit colors terminal (Truecolor) for Solarized theme on Mac

I am trying to get Solarized theme color correct in terminal by enabling truecolor on my Mac, following the instruction from Spacemaces: https://github.com/syl20bnr/spacemacs/wiki/Terminal. But I ...
0
votes
1answer
141 views

how to map <C-M-left>, <C-M-right> etc to the correct hex codes in iterm2

I'm looking to configure iterm2 to output the correct hexcodes that correspond to in emacs. There's a whole bunch of mappings predefined but it's very cryptic. I'm a little bit lost as to how these ...