A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [terminal-emacs]

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.

Filter by
Sorted by
Tagged with
5
votes
0answers
3k views

Restart emacs daemon from within emacs

Very much like Restart emacs from within emacs, except I'd like to do this for an emacs daemon and client. Specifically, I'm interested in the terminal client, but of course being able to restart ...
1
vote
0answers
221 views

C-S-Backspace not working [duplicate]

When using emacs, C-S-Backspace seems to only delete one char and not the whole line. After reading Here I see the text: "C-S-backspace (kill-whole-line) kills a whole line including its newline,...
1
vote
2answers
141 views

Why is my minibuffer scrolling and preventing me from seeing emacs asking me questions?

My new emacs is scrolling minibuffer text so that I can't see simple stuff, like when emacs asks if I want to save changes to a file before exiting. Doing this both in a mac window or in Terminal. ...
0
votes
1answer
467 views

How do I set cursor colours per evil-state in the (non-GUI) text terminal?

In the terminal, (set-cursor-color "red") has no effect, so the only way I can distinguish insert from normal mode under evil-mode is through the <N> or <I> on the modeline. Is there a way ...
3
votes
0answers
265 views

emacsclient doesn't start when visiting a file that is already open

I start emacsclient with emacsclient -a 'emacs-server-start' -nw --socket-name=$TTY, where emacs-server-start is a script that runs emacs --daemon="$TTY" (I use $TTY to get a different client for each ...
0
votes
0answers
41 views

C-S-n and C-= not working in emacs if running within terminal [duplicate]

I am running emacs inside tmux within iterm2 on OSX. For some reason these key bindings do not work properly C-S-n C-= C-+ C-; And some others too that are similar. All of these work when running ...
0
votes
2answers
59 views

Unusual character elements

I have been noticing two rather "strange" text elements in Emacs which occur when I copy text. I am certain they signify something/have a special formatting purpose, but I am unable to find anything ...
2
votes
1answer
335 views

'C-M--' on Emacs Terminal on OSX fails with “C-M-_ is undefined”

I'm trying to execute C-M-- from Emacs on Terminal (iTerm2) running on OSX, but I keep getting an error saying C-M-_ is undefined. Any ideas how to workaround this?
16
votes
1answer
8k views

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/...
1
vote
1answer
851 views

Open “emacs -nw” and running a command from bash

I would like to know if it is possible, with a single command from bash, to open a file with emacs -nwand execute a command in the same time, for example goto-line 20.
0
votes
0answers
99 views

Emacs doesn't recognize Ctrl+2 in a terminal

Emacs version is 24.5.1, terminal is Mintty 1.1.3. When I press C-2 in Emacs it produces M-[ 5 0 ; 5 u key which is very strange because C-1 behaves as expected.
1
vote
1answer
262 views

Problem with meta key in Emacs

I use Emacs in command-line always on my Ubuntu 14.04 machine. And I use two languages frequently. Bengali/Bangla and English. Problem is when I use Bangla, commands with Ctrl as modifier work fine (e....
2
votes
1answer
991 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: ...
1
vote
2answers
232 views

In terminal, C-) and ) both execute evil-forward-sentence. I want C-) to run paredit-forward-slurp-sexp

If I type C-f paredit-forward-slurp-sexp, Emacs tells me the command is mapped to C-). Yet through C-h k I realized that both C-) and ) run evil-forward-sentence. If I do C-f evil-forward-sentence, ...
2
votes
0answers
706 views

How to disable the map from esc to meta?

I installed the oh-my-emacs configuration and try to use emacs in the terminal. oh-my-emacs configuration enables evil-mode in default, and my problem is that, I found esc is mapped to meta, while ...
14
votes
2answers
8k views

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 ...
0
votes
1answer
379 views

Unable to remap key bindings involving meta under iTerm2

I'm using iTerm2, and I would like to remap some of the meta keys. In my .emacs I have (global-set-key (kbd "M-g") 'goto-line) And in my iTerm2 settings I have both "option" keys set to send +Esc. I ...
2
votes
1answer
164 views

How to find the unicode control string received by emacs for a command?

I usually ssh into a machine at my university and run emacs on screen. I want to figure out what unicode strings code for a particular command ? For example when I changed the preferences in my OSX ...
4
votes
2answers
2k views

Why does the buffer get garbled?

Not sure what's going on here, but if I open a file in emacs (no window mode), and just do a search (ctrl-s), the buffer gets garbled. It fixes itself when I ctrl-l, but that's annoying to have to do ...
2
votes
1answer
155 views

Not getting notifications with rcirc-notify in OSX

I'm unable to get any notifications when getting pinged by people, or sending private messages. I'm running on osx and running terminal-notifier works fine. I've also tried to execute rcirc-notify-...
0
votes
0answers
390 views

normal-erase-is-backspace-mode does not work over ssh when included in .emacs

In my .emacs file I have the following line: (normal-erase-is-backspace-mode) to change <backspace> to backwards delete and ^H to help over the terminal. Unfortunately when I use emacs with -...
2
votes
1answer
718 views

Arrow and M-n M-p don't work with company mode in terminal when ESC aborts completion

In a terminal window, I'm finding that company-mode completion doesn't work, whereas it does work in a graphical window. For example a down arrow inserts the text OB and M-n simply inserts n. As a ...
9
votes
2answers
13k views

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 ...
4
votes
3answers
2k views

Use the command key in Terminal on OSX?

Is there a way to use the Apple command key in Emacs in the terminal? It would be nice to expand the set of easy to get at key bindings I can use.
6
votes
1answer
2k views

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 ...
15
votes
4answers
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 ...
44
votes
3answers
10k views

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.
3
votes
1answer
723 views

emacs --daemon frozen when started with emacsclient file

This is somewhat of a follow up to Prevent emacsclient from blocking other instances. I am using emacsclient -a '' -nw --socket-name=$TTY where TTY=$(basename tty). I use emacs in the terminal and ...
4
votes
3answers
880 views

Custom C-M-; key binding

I have a custom comment-dwim-line command that I want to bind to the key combination C-M-; (in other words, control, meta and ; buttons pressed simultaneously). The built-in comment-dwim command is ...
15
votes
2answers
4k views

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 ...
4
votes
2answers
2k views

Copy and paste between Emacs in an X terminal and other X applications

I am running Emacs in Gnome-terminal on Ubuntu. The way I know to copy and paste between emacs and other applications is by Ctrl+C and Ctrl+V, which I think is by the terminal emulator. A problem ...
8
votes
4answers
167 views

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 <key sequence>, but I use Emacs in the terminal, and my terminal emulator doesn't pass all key sequences through to Emacs. Sometimes ...