Questions tagged [term-mode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 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) ...
1
vote
0answers
55 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
17 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
2answers
58 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. ...
0
votes
0answers
42 views

add-hook for local-set-key in shell-mode not working

I have been using define-key global-map "\C-x\C-n" 'cmd-clear-and-rerun) for ~ 20 years where cmd-clear-and-rerun is a simple function I wrote long ago (see below). I only use C-xn in term-mode and/...
1
vote
0answers
31 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 ...
0
votes
0answers
37 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
45 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 ...
1
vote
1answer
78 views

previous-line function in term-char-mode

Since emacs 26.1 (changeset 8a1576cc03) I can't do M-x previous-line in term-char-mode. The cursor always returns to prompt line. On the other side, if I use the mouse or M-x scroll-down the cursor ...
3
votes
1answer
55 views

completion for .bash_history

I am considering implementing an ivy-powered bash_history greper for term-mode, but before I do I wanted to know if this has already been done, by some fancy company-bashhistory package or whatever. ...
5
votes
1answer
4k views

Conditional True color (24 bit color) support for iTerm2 and Terminal.app in OSX with Fish shell

I'd like to try and get to a similar setup that I have with N/Vim in OSX, whereby Truecolor support is enabled in iTerm2 (which supports 24bit colors) but disabled in the native Terminal app (which ...
1
vote
1answer
399 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 ...
4
votes
0answers
492 views

Tmux and term-mode

I've been running tmux inside of my term buffer but when I do that there are some issues and the buffer often becomes messed up, with the cursor being in the wrong spot and overwriting text or other ...
2
votes
1answer
1k views

How to run tmux in Aquamacs

I quite like tmux and Aquamacs. I've recently been interested in how to integrate the two together. As far as I know, one cannot run Aquamacs within a terminal even with the Aquamacs CLI tool, so the ...
1
vote
1answer
432 views

how to start term in a separate window at launch

I added the following two lines to my init.el script. (split-window-vertically) (other-window 1) What I now would like to achieve is to start within the current window a term-mode with a bin/bash. ...
0
votes
1answer
153 views

Select the python version in a terminal

I want to open a python interpreter in a buffer with ipython. So I use that, from the term-mode : (make-term "ipython" "/usr/bin/env" nil "ipython" (or filename "") "--TerminalIPythonApp....
2
votes
2answers
3k views

How to disable global Linum mode for certain mode?

in my init.el file I have the following: (global-linum-mode 1) (add-hook 'term-mode-hook (lambda () (linum-mode))) However, when I enter ansi-term-mode linum mode is still on. I have also tried (...
4
votes
1answer
561 views

Undesirable Cursor Jump After Movement with M-left or M-right in Term-Mode

When I reposition the cursor in term-mode or ansi-term with M-left or M-right, it always returns to its original position (see animation below). Is this behavior standard? Is there a way to change it ...
0
votes
0answers
209 views

Incorrect Line Spacing in (term-mode, ansi-term, eshell, shell) Output

The output of certain commands in multiple major modes (term-mode, ansi-term, shell, eshell) is incorrectly spaced (see images). This occurs for numerous commands and does not occur in other emulators ...
4
votes
1answer
689 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
3answers
812 views

dirtrack mode with fish-shell

I recently started using the fish shell. I tried using it in term-mode in Emacs. One characteristic of this shell is that it shortens the current working directory before printing it as the prompt. ...