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 difference ?
They differ by the calling environment.
Emacs frame - what ordinary people call window.
Emacs window - a place in Emacs where you see some buffer(start emacs, and run
C-x 2 to see one window split into two windows).
When you open emacs in your Window Manager/Desktop Environment, the Emacs creates a new emacs frame. It is managed by X system, and therefore interacts with you(user) through it; this means that you can have some nice features like menus, or mouse pointer - since Emacs recognizes that its called from X system, and opens a more feature-rich version.
On the other hand, you can run Emacs in terminal, which means that you won't have access to some features(because of limitations of terminal), but it's full-fledged Emacs nevertheless. One trick though; by default, the terminal version is limited in colours. Should you wish to increase color range, you need to include the following line in your
Note that Emacs core is the same; it's the interface that changes. You can run emacs daemon, and then connect from both GUI and CLI; both will have their full potential enabled.
Some packages managers provides two different Emacs,
emacs-nox. The core is the same and behave in a very similar way. The
nox version (no X means without X11 support) and should be installed on systems that don't provide a X Window System.
nox versions are compiled without support of X11. The standalone version can be run in the terminal using
emacs --no-window or
nox version of Emacs is often used in servers system administration or for people who needs to run Emacs on a powerful computer for fastest processing. You connect to the server through your favorite SSH client and then you run Emacs on the server.
Another use case of
nox is saving the installation of all the necessary dependencies needed by the graphical version. Emacs also got a sound server in it's dependencies list. Some also prefers to use it only in terminal, for example, I did it during some years to force myself to learn more shortcuts and functions.
A single executable of Emacs can run both in the terminal and in a GUI window by itself. The functionality is mostly the same, although for obvious there's some functionality that doesn't work in a terminal -- for example, you can't click to move point (unless you enable simple mouse support), GUI buttons don't work, and I think there are fewer colors available.
- You won't be able to view images or PDFs directly inside terminal Emacs as you could inside gui Emacs. You'll have to get terminal Emacs to open them using some external program instead.
You won't have real, separate Emacs windows with terminal Emacs -- everything will stay within just the terminal itself.
With gui Emacs you can have separate Emacs windows (what Emacs calls "frames") all under control of the same Emacs instance.
Fonts, text effects, and writing systems
With gui Emacs you can have multiple fonts in one window at the same time.
With terminal Emacs you're limited to just one font for your entire terminal (which it will share with all other programs you run in the terminal).
Gui Emacs is capable of showing some text effects that terminal Emacs is not, such as italic.
Some Asian language writing systems might be available in gui Emacs that might not be available in terminal Emacs.
- Depending on your terminal version and Emacs version you might have more colors available in gui Emacs. Some terminals have True Color (24 bit color) support, and you might be able to get it working with Emacs or you might not. Getting 256 colors in terminal Emacs should be easily achievable in most terminals, however.
- More keys are bindable in gui Emacs than in terminal emacs.
If you want to transfer your gui Emacs configuration to a remote machine and use it directly from the remote machine while logged in to it through something like ssh, it will only be useful if you can X-display back. This limitation is mitigated somewhat if you use TRAMP mode, but not everyone likes it.
Terminal Emacs users, on the other hand, are under no such limitation, and their config should work just as well as on a remote machine they're simply ssh'ed in to as it does locally -- as long as all the ancilliary programs they might use from Emacs are installed there as well.
- To use gui Emacs on unix/Linux/BSD-style systems, X has to be running, while terminal Emacs can be used even when X is not running.
Terminal <-> Emacs transitions and keeping configs in sync
If your Emacs configuration is focused on running Emacs in the gui, and you're doing something in the terminal and you want to edit a file in Emacs, you'll probably want to call up a gui Emacs window to edit that file. This is so much of an annoyance to some gui Emacs users that for quick edits in the terminal they'd prefer to use vim.
Users who's Emacs config is focused on running Emacs in the terminal don't have the above problem and they can edit files with Emacs in the terminal while working in the terminal without much hassle.
Some users have configurations that work equally rare in both gui Emacs and in the terminal, but this is rare unless their configuration is rather small, as most users tend to spend most of their time in one or the other, so either their gui Emacs or terminal Emacs configs will get more attention and care and porting the changes to the less used one is likely to be considered not worth the bother.