Linux Ubuntu, Emacs 26.1

I use tool "screen" in Linux. It's very comfortable. Has Emacs any some kind of tool?

  • 4
    Why do you need it? What do you want to run in the screen inside Emacs? – choroba Nov 28 '18 at 14:27
  • 1
    See also this: emacswiki.org/emacs/EmacsScreen – Ian Nov 28 '18 at 14:32
  • Or use this package : ElScreen: github.com/knu/elscreen – a_subscriber Nov 28 '18 at 16:00
  • The thing I considered screen most useful for was re-connecting to a remote session from somewhere else, and Emacs provides for that if you run it as a server, as you can ssh from anywhere to the host running the server, and then reconnect to that Emacs session with emacsclient. – phils Nov 29 '18 at 4:03

If I understand correctly, Emacs is that tool. Let me illustrate. In the following Ctrl + x is denoted as C-x and Alt + x is denoted as M-x (this is the standard Emacs notation).

Open a new instance of Emacs. You can create splits, similarly to screen. To create a vertical split, press C-x 3. To create a horizontal split, press C-x 2. Do that and your Emacs should look like this:

Emacs after doing <code>C-x 2 C-x 3</code>

Now, if you wanted to have separate terminal windows there are several options. Emacs comes with several terminal emulators: eshell, shell, and term. You could open a term with M-x shell1. For me, that opened a terminal instance in the second split:

Opening a shell

You can go to another split with C-x o. You could open another terminal instance if you wanted there. Or you could edit a document. Whatever your heart desires!

Hopefully you can see how Emacs itself functions as a terminal multiplexer.

I highly recommend reading the Emacs tutorial. To access it, simply open a new session of Emacs and press <RET>. People say learning Emacs is hard, but it's as simple as opening Emacs and pressing Enter!

How to access the Emacs tutorial

1 The term command is finicky when using Windows, which I am. So, I use shell here.

  • Something like this: github.com/knu/elscreen – a_subscriber Nov 28 '18 at 16:05
  • To use elscreen, you'll need to create a file init.el in your ~/.emacs.d directory. In that file, you will need to initialize packages. Put this code on one line: (package-initialize). Then you'll need to add a third-party repository: (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t). To run these, do M-x eval-b. That should re-index the repository. Now, you can do M-x list-packages. Search for elscreen. As long as your cursor is on that line, press i to mark it for install and press x to install it. Once installed, do M-x elscreen-start – Lorem Ipsum Nov 28 '18 at 16:12
  • If that's what you needed, let me know and I will update my answer to reflect that. In the meantime you may find this article about installing Emacs packages helpful: emacswiki.org/emacs/InstallingPackages – Lorem Ipsum Nov 28 '18 at 16:15
  • For now , Emacs is enough for me. If , for some reasons, I will be need screen session manager I will install elscreen. – a_subscriber Nov 28 '18 at 16:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.