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
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 ...
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.
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 ...
3
votes
1answer
307 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. ...
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 ...
5
votes
3answers
716 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 ...
3
votes
1answer
727 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 ...
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 ...
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 ...
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 ...
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/...
5
votes
2answers
110 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-...
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
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
211 views

How do you grep from within emacs ( git grep 'foo' | grep baa )

I do this often after shelling out to bash $ git grep 'banner-image' | grep mb3 Can I do it without leaving emacs?
1
vote
1answer
79 views

Copy or paste between terminal emacs 26 and Mac apps

I am using terminal emacs a lot, and the method from Copy text from Emacs to OS X clipboard works for a long time. But after upgrading to Emacs 26, if I kill a string like "你好" from emacs, and paste ...
1
vote
1answer
784 views

How to use menu bar at the top via mouse?

I am opening emacs in --no-window-system mode and I switched xterm-mouse-mode on. Mouse clicks within a buffer work. However, I want the menu at the top of the window to open when I click on it. I.e.,...
1
vote
1answer
154 views

send-string-to-terminal but hide output

I'd like to send some commands to the terminal Emacs is running in, using send-string-to-terminal. However, some terminals don't support the command I have in mind. When this is the case, the command ...
1
vote
2answers
63 views

Add additional function to cua-mode processing for `C-c`

I'm running cua-mode, and I'm trying to override the cua binding for C-c so that I can insert a function somefunc before passing the baton to the original cua binding which is cua-prefix-override-...
0
votes
2answers
356 views

Emacs not taking full space inside terminal

Image for description: If you notice carefully, blue background of gnome-terminal is visible below where emacs ends. This probably means that emacs isn't taking full space inside gnome-terminal. How ...
0
votes
3answers
128 views

Dired+ key binding issues in terminal emacs

Using the Dired+ library, and running Emacs in a terminal, all arrow keys in dired buffers invoke M-O (which is bound to diredp-chown-this-file) instead of correct <left> <right> <up&...
0
votes
1answer
163 views

Weird behavior: GUI won't start, but terminal emacs will

As I said in the title, I'm having a problem with starting Emacs, whenever I try to start it with rofi, nothing happens, and when I try and start with terminal (using emacs), it returns "Args out of ...
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 ...
0
votes
1answer
468 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 ...