Emacs can run entirely inside of a TTY terminal, by using the `-nw` flag at startup, or by compiling emacs with the `--without-x` flag.
Questions tagged [terminal-emacs]
259 questions
48
votes
4 answers
Restart emacs from within emacs
I restart my emacs a lot. All I want to do is create a function that kills the current emacs, only to spawn a new one in it's stead. Ideally, this would also work in a TTY.

PythonNut
- 10,243
- 2
- 29
- 75
41
votes
6 answers
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, only inserts ; character. M-x comment-region RET…

WeSenseASoulInSearchOfAnswers
- 1,383
- 2
- 14
- 16
23
votes
2 answers
How to use the menu bar in terminal emacs?
I am using emacs on the remote server, and I have no idea how to click on options in the menu bar across the top in this context.
Here is a screen capture:
For example, I want to click some options under "File" in the menu bar (on the top), how…

lllllllllllll
- 579
- 1
- 4
- 14
23
votes
2 answers
What was Emacs like back in the 80s?
I've looked all around for footage of ancient Emacs distributions, but to no avail.
The source code for Emacs 16.56 from July 15, 1985 is available on Github, but under no circumstances could I manage to build it.
The original Stallman Emacs paper…

Daniel
- 3,563
- 16
- 41
22
votes
3 answers
emacs on terminal does not recognise option as alt-key on mac
I am on a mac and I am running emacs 24.4.1, but I have the same problem also with 22.1.1. When I open mac on a terminal on the remote host, it does not recognise option key (alt) like the meta key. I have modified the .emacs in the following…

simona
- 403
- 2
- 4
- 7
19
votes
1 answer
Different theme for -nw (terminal)
I am running emacs (24.5.1) on Mac osx and using the solarized theme. For the gui version, the theme works well. If I run the application with the -nw flag:
/Applications/Emacs.app/Contents/MacOS/Emacs -nw
the colors for the theme get all wonky. I…

djh
- 325
- 1
- 2
- 7
15
votes
3 answers
Shift+Up isn't recognized by Emacs in a terminal
Very often I use Shift+Up/Down to select a region in Emacs. It works fine in GUI mode, but when emacs is invoked with -nw option I can select lines only with Shift+Down. The Shift+Up doesn't work, I get this error message in the minibuffer:

WeSenseASoulInSearchOfAnswers
- 1,383
- 2
- 14
- 16
15
votes
5 answers
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 read a lot of information about xmodmap but I think…

Andrea Richiardi
- 310
- 3
- 10
11
votes
1 answer
Is there a way to detect that emacs is running in a terminal?
When I run emacs in a terminal (using the -nw option) my theme is broken and some key-bindings don't work.
So, I need to disable the theme and some keybindings when running in a tty.
Is there a way to do that?

Nishant
- 113
- 1
- 6
9
votes
2 answers
#000000 and true black in terminal Emacs colors
I just ran into a weird issue while tweaking my colour theme for terminal Emacs. The background wasn't appearing as black as expected, but grey, even though the background was set to #000000. So I opened the 'customize-face' dialog, and then opened…

Tyler
- 21,719
- 1
- 52
- 92
8
votes
4 answers
Copy/paste between SSH terminal Emacs and macOS
Suppose you are working in macOS, and you decide to SSH into a Linux box and fire up terminal Emacs. How do you copy and paste between macOS and your SSH terminal-Emacs?
Copying and pasting between macOS and local terminal-Emacs is not a problem…

aparkerlue
- 317
- 2
- 8
8
votes
2 answers
less psql, more emacs
I was listening to this song today - https://www.youtube.com/watch?v=ajy71xw351E
Don't Wanna Leave You Now
and I realized how much I don't want to leave emacs.
I often do this after backgrounding (C-z) emacs,
psql datababase_name
select id from…

american-ninja-warrior
- 3,773
- 2
- 21
- 40
8
votes
4 answers
How can I look up help for a key sequence that I can't type
I know that I can look up help for a key sequence using C-h k , but I use Emacs in the terminal, and my terminal emulator doesn't pass all key sequences through to Emacs. Sometimes I'll see the notation for a given key sequence written…

asmeurer
- 1,552
- 12
- 30
8
votes
4 answers
What is the difference between standalone version of emacs and the one that runs inside terminal?
I am not sure if my question makes sense. I am naive to this. I see that there is a standalone version of emacs with the menu bar, tool bar etc. Also, I see emacs version that could be run inside a terminal. Are they both same or is there a…

Veera
- 305
- 2
- 5
8
votes
5 answers
copy from shell and paste in terminal-emacs
How can I copy from the command line and paste in Emacs in terminal mode?
If I select the text with the mouse and paste it from the clipboard with the third button (the wheel) it is OK.
But if I try to run:
$ emacs -nw file_name.sh (for…

Andrea Borga
- 261
- 1
- 4
- 9