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
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.
23
votes
2answers
844 views

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 ...
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/...
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 ...
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 ...
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 ...
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 ...
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 ...
7
votes
1answer
1k views

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

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

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

What are my options for scroll bars in terminal emacs?

I use emacs in the terminal. One thing that I miss sometimes from a more traditional GUI editor are scrollbars. Sure, there's the percentage in the modeline, but sometimes you just want a ...
6
votes
1answer
350 views

What controls things like cursor appearance in a terminal?

In the GUI version of Emacs, it is easy to see that something like (blink-cursor-mode t) makes the cursor blink. However, in a terminal emulator, such as on Mac OS X, it is possible to set things ...
6
votes
1answer
294 views

Check if terminal supports Unicode

I would like to use special mark symbols not only in window-system but also in xterm: (setq gnus-summary-to-prefix (if window-system "▒ " "==> ")) What check I should use?
6
votes
1answer
631 views

0;95;0c escape code is inserted with typeahead in terminal emacs

Whenever I start the terminal emacs and there is typeahead (i.e., I start typing before emacs starts), the escape code 0;95;0c gets inserted into the buffer. For example, if I run sleep 3; emacs -Q ...
5
votes
2answers
109 views

local keymap in mode-line doesn't work in terminal

I'm having trouble with getting local keymap:s to work in the mode-line, but only in terminals (with xterm-mouse-mode enabled). This applies to both the standard mode-line entries (like mode-line-...
5
votes
1answer
1k views

Emacs in PuTTY with xterm-mouse-mode: how to paste?

I'm running Emacs under PuTTY and this works better then I expected. But since I sometimes use the mouse to focus the PuTTY window, I turned xterm-mouse-mode on. This way the focus in the text changes ...
5
votes
3answers
703 views

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

How to hide leading stars in windowless emacs org-mode?

I've been working hard to get emacs and org-mode working inside of my tmux workflow. And i've got a pretty decent setup. :) I installed org-bullets to get utf8 bullets, it worked. But even if I set ...
4
votes
3answers
891 views

How to change green background in magit running in xterm

I am running emacs in xterm with 'emacs -nw'. When examining diffs I find it hard to read text typed in yellow foreground and green background. How do I change it to eg. green/black or green/default ...
4
votes
1answer
367 views

How to detect the term color support inside of a emacsclient session?

I run a emacs daemon on boot as a OpenRC service without info about terminals. When I plug a different terminal on emacsclient so, I don't have env variables instead that was generated inside of emacs ...
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.
4
votes
1answer
234 views

How to stop “emacsclient -t -a '' --eval” output to stdout?

I am running emacsclient with the command: emacsclient -t -a "" --eval "some-exp" The emacsclient -t -a "" is a must. The problem is, for example, if I run: emacsclient -t -a "" --eval "nil" when ...
3
votes
2answers
7k views

How can I quit Emacs from within a term within Emacs?

I'm in a situation where I have to ssh into a machine and do all of my coding on there. For a while I would ssh in and then use tmux and emacs -nw mode. Recently, I discovered the term command. Now ...
3
votes
1answer
2k views

How do I disable menu-bar-mode only for tty frames?

I run both gui frames and tty frames on the same server. I'd like to only have the gui frames have the menu-bar and I want all tty frames to not have a menu bar. I'm confused by the menu bar docs, is ...
3
votes
2answers
6k views

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 ...
3
votes
2answers
407 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
383 views

Set a title to an Emacs instance running in a terminal

On Ubuntu, I usually open more than one Emacs instances in the same time (for frontend and back development). These instances always by default take the name "Terminal" as a title as shown on this ...
3
votes
2answers
1k views

How to turn off bracketed paste mode?

I saw that bracketed paste mode is automatically enabled in Emacs 25.1 running in a terminal. But I want to disable this mode. Because this mode adds text like 200~ 201~ to pasted text, bracketed ...
3
votes
1answer
302 views

Almost working smoothly attempt to get terminal Emacs to copy to clipboard

I'm running this emacs GNU Emacs 25.2.2 (x86_64-pc-linux-gnu) of 2017-09-22, modified by Debian directly in a Gnome terminal by calling emacs, which is actually a link to /etc/alternatives/emacs. ...
3
votes
2answers
122 views

How to save SVG image to disk?

Looking for a tool to programmatically generate SVG images, I found that Emacs 26 can do it out of the box! Example adapted from the Elisp reference manual: (require 'svg) (let ((svg (svg-create 400 ...
3
votes
1answer
697 views

Trying to invoke help (CTRL-H) deletes character on terminal

When I press CTRL-H in emacs running on my xterm, then this is interpreted as backspace and the character before the point is deleted. I've found various discussions about the "opposite" issue (...
3
votes
3answers
974 views

How do I duplicate the 'effective' theme colors resulting from using terminal Emacs with a transparent background?

I'm running GNU Emacs 24.5.4 on Mac OS X 10.10.5 in Terminal.app. In this (stock) setup, Emacs has a transparent background. With a transparent background, the colors that Emacs uses to display text ...
3
votes
1answer
190 views

Avy - Moving Between Terminal Frames

I've only just recently started using avy to navigate inside my buffers and it seems to work nicely. As for my question however, with avy-all-windows set to all-frames I am able to navigate between ...
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 ...
3
votes
0answers
228 views

Emacs 25 + comint + -nw = eaten newlines

I've been building and running Emacs 25 prereleases on a recent Fedora system that I usually access via ssh. I usually run this emacs in a terminal, and I'm fond of using ansi-term inside it. I've ...
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 ...
2
votes
4answers
603 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 ...
2
votes
1answer
99 views

Use emacs syntax coloring when not in emacs

Emacs in -nw mode colors source code files, in this screenshot you see how emacs colors the .rb file I opened. Over the weeks/months I've gotten used to the coloring. Despite how hard I try, there ...
2
votes
1answer
313 views

How to check for emacs being initialized in daemon mode?

I use emacs gui in daemon mode and also in standalone terminal mode. There is a package that I just want to use when I'm using emacs in terminal mode. the problem is that I can't use (display-...
2
votes
1answer
46 views

Previous Line Indenting on RET

It seems that whenever I press RET on my emacs init.el file comment lines that the previous line just randomly indents ~4 tabs. I only have a simple load path (nothing currently in there really except ...
2
votes
1answer
927 views

fix “Terminal is not fully functional”

What can I do about this issue? I'm using psql, inside a ssh tunnel to ubuntu, inside a M-x shell, inside a emacsclient -nw
2
votes
3answers
2k views

My left alt key (OS X) does not work as Meta key in Emacs (terminal)

I have an Italian keyboard layout. My left Alt/Option key does not behave as the Meta key in Emacs terminal (OS X), but it behaves as the Meta key in GNU Emacs (GUI) downloaded from https://...
2
votes
3answers
131 views

adhoc emacs Elisp command to send emacs clipboard text to osx clipboard

When you press 'y' (elfeed-search-yank) in an elfeed-search buffer, the selected entry's permalink url is copied to the emacs clipboard. I don't have any automatic clipboard sync packages installed, ...