Questions tagged [terminal]

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
0answers
5 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 ...
2
votes
1answer
1k views

256 colors in FbTerm

Is there a way to get emacs with 256 colors in FbTerm? I've seen some old posts on the topic but I haven't seen any confirmation that it will work. EDIT: If I start FbTerm with this command: ...
15
votes
5answers
2k views

Use Super in emacs -nw in linux

I have been struggling to find a simple and direct question to the answer and therefore I have decided to ask here. Q: Is there a way to use Super in Emacs launched in a Terminal in Linux? P.S: I ...
0
votes
1answer
66 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 ...
4
votes
1answer
267 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 ...
1
vote
1answer
56 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 ...
3
votes
2answers
304 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 ...
32
votes
5answers
10k views

Problems with keybindings when using terminal

I have the following line in init.el: (global-set-key [(control \;)] 'comment-region) It works very well in GUI window, but if emacs is invoked with the -nw option then C-; doesn't comment region, ...
0
votes
0answers
37 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 ...
1
vote
0answers
23 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
3answers
301 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
0answers
49 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
0answers
52 views

Can't run emacs from terminal.Cannot open load file: No such file or directory

Emacs 26.1 Linux Mint 19 Open terminal, write emacs, but I get error: Warning: Could not find simple.el or simple.elc. Cannot open load file: No such file or directory
4
votes
3answers
4k views

Emacs colors being set differently when TERM is 'screen-256color' and 'xterm-256color'

I'm using Emacs in a terminal and am finding that when the TERM environment variable is changed between screen-256color and xterm-256color, the default colors within Emacs are set differently. Just ...
3
votes
2answers
322 views

C-x in terminal

In M-x term, how can I make C-x do what it does in line mode in char mode also? I know that C-c is one answer here but (a) that's not good enough for me and (b) I'm using emacs so there has to be a ...
0
votes
0answers
42 views

Start Terminal Process in Named Buffer?

Using (spacemacs/default-pop-shell) we can emulate a terminal in emacs. But is there a way to pop a shell in a named buffer (say *buffer-name*) that will persist outside of our normal popped shell?
0
votes
0answers
19 views

How to build using a tty for output?

When building, some build systems check a tty for nicer output. In the case of ninja this is used for \r to print into the same line (avoid flooding the build log). Color output. Is there a way to ...
0
votes
1answer
42 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
24 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 ...
1
vote
2answers
2k views

Unable to change cursor type in terminal

I'm trying to change the cursor type in Emacs. Here are the steps I'm following, C-h v cursor-type check the value of cursor type. It is set to t. start emacs with emacs -nw -Q and type (setq cursor-...
4
votes
3answers
784 views

How do I page when “ESC - (1 of n) [C-h paging/help]” shows in the emacs status bar?

I am an Emacs newbie having some problems navigating around when using the terminal, but pressing the ESC key brings up a huge list of key options which gives me the option of paging down and possibly ...
7
votes
6answers
4k views

How to open a external terminal from emacs

Brand new emacs user here. I want to have the ability of opening a terminal with current file path from emacs, like what the open terminal here package does in sublime text 2. By terminal, I mean a ...
3
votes
2answers
702 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 (...
0
votes
1answer
365 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 ...
0
votes
1answer
41 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
265 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
2answers
545 views

Set specific TERM variable for only emacs terminals

I'm using multi-term right now in GUI cocoa emacs on OSX, and it works great in general. However, I'm running into a bit of an issue with my TERM variable. I generally set it to xterm-256color for ...
0
votes
1answer
108 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 ...
1
vote
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
480 views

Can not activate a virtual environment in emacs, but can through the usual shell

I created a virtual environment that I can activate used a command line from Terminal (Ubuntu): source/bin activate I did what follows to achieve the same on emacs: M-! then source/bin activate ...
2
votes
1answer
316 views

Speed (timing) considerations in Emacs terminal emulators

I found emacs terminal emulator (M-x term) to be very convenient. However, it is essential for me to time certain portions of my code accurately (in order to compare speed of different algorithms ...
2
votes
1answer
222 views

PS1 under term and shell doesn't match system

I find under both shells and terms in Emacs my prompt does not appear as I would expect based on my $PS1 appears as... # Shell under Emacs ]0;slackline@583.datascience.work.com: /home/slackline@samba....
0
votes
1answer
100 views

How can I get working motion keys with `emacs -nw`?

when I start Emacs without windowing system (-nw), the motion keys are not working. Instead, I get (parts of) the escape sequences, like: ;; This buffer is for text that is not saved, and for Lisp ...
0
votes
0answers
242 views

Fixing Evil inside Emacs terminal mode

I use Evil mode inside Emacs to emulate vim-style editing. In the Xwindows based graphical user interface of Emacs on Ubuntu 16.04, Evil mode works perfectly. When I launch emacs in terminal mode ...
0
votes
0answers
59 views

Spacemacs terminal emulator share history with zsh

In plain vanilla emacs, I can M-x term RET RET. This starts zsh. And it 'shares' history with my non-emacs terminals. So, I can ESC / and search for commands, etc. How do I achieve that for ...
2
votes
3answers
6k views

How can I compile and run my C code from within Emacs like I would with the terminal?

I recently moved from Code::Blocks to Emacs to write C code. The one thing I don't like (because it takes too much time and effort for a simple and repetitive task) is the fact that I can't compile/...
1
vote
1answer
224 views

How to turn off line wrap when opening from terminal

I'm trying to open a file from terminal and ensure that line-wrap will be off. I'm trying the following code, but it won't work emacs --no-window-system --eval '(setq truncate-lines 1)' file I don't ...
2
votes
4answers
754 views

What linux terminal app is compatible with emacs keybindings?

I am using terminal Emacs (emacs -nw). Gnome terminal doesn't behave well with it (key bindings break), and KDE's Konsole is even worse. Surprisingly, when I ssh from a windows machine the behavior is ...
0
votes
0answers
206 views

term without line numbers and highlight for current line

I have the following settings in ~/.emacs: (setq linum-relative-current-symbol "") (linum-mode) (linum-relative-global-mode) (global-hl-line-mode t) In order to supress both these features in ...
1
vote
1answer
176 views

Custom title format in iTerm2 / Terminal

I've been looking all over but none of the guides I saw worked for me. I am trying to have the title of Spacemacs to show a custom format, namely the current project's name (the current folder's name)...
1
vote
0answers
26 views

how to achieve the behavior of :silent !a.out in vim

I am on terminal. I'd like to invoke a ncurses based program a.out. In vim, I do :silent !a.out, which will directly show a.out. In emacs, the closest thing I can do is (suspend-emacs "a.out"). ...
1
vote
1answer
432 views

how to substitute SUPER keybindings in Emacs terminal mode?

In GNU Emacs GUI, I use the Mac Command key ⌘ as super: (setq mac-command-modifier 'super) However, the ⌘ key does not send input to Terminal or iTerm2. Given this, is there a way to simulate the ...
7
votes
1answer
4k views

How to remap backward-delete and help command while using Emacs from a terminal emulator?

I was using Emacs on CentOS 7 from the MobaXterm terminal on Windows 7, but the backspace key instead of backward-deleting a character invokes the prefix command C-h. According to EmacsWiki, I tried ...
2
votes
0answers
178 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 ...
3
votes
2answers
158 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 ...
1
vote
1answer
619 views

Open a frame for emacs instance via terminal?

Say I have emacs open on one screen and on another I'm working in terminal. I see a file I want to open in emacs. Is there a quick way I could do something like emacs myfile and have a new frame, but ...
7
votes
0answers
248 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 *...
1
vote
3answers
1k views

Colors illegible after upgrading OS

After having upgraded a computer from Ubuntu 15.04 to 15.10 the colors in Emacs (which I run in the terminal with --no-window-system) have changed substantially and some text is now illegible. I would ...
0
votes
1answer
121 views

How to run `gprolog` under an Emacs sub-process shell?

I'd like to run the gprolog interactive interpreter in an Emacs sub-process shell (started with M-x shell). The interactive interpret starts without a problem, but it does not respond to some ...
1
vote
1answer
1k 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/...