Terminal Autism (terminalautism@social.076.moe)'s status on Monday, 23-Jan-2023 16:09:58 JST
-
You can do more with the GUI than without it, so it's preferred. You don't lose anything from using Emacs with the GUI, it only has benefits. There's no real reason to use it with ncurses unless you are already in the terminal, and you can still do that in those situations, because ncurses still works on the versions of Emacs with GUI support enabled, so you can run it that way as well, with the same package. And of course, it will default to that if you try to run it in the TTY.
Emacs supports multiple toolkits, and actually, GTK (both 2 and 3) causes a bug that screws with the daemon, while Athena/Lucid (old toolkit, I think based on XEmacs, Ubuntu and variants, Debian and Devuan all package it as emacs-lucid, while on Arch-based distributions, you have to build it from source) does not (which is the reason to use it), and neither does nox. The bug makes it so that the daemon isn't independent from X (as it should be), so it dies if you kill X, and it also can't be used in multiple X sessions at once. But as far as the way that it works and even looks, all of the GUIs are pretty much interchangeable. The themes work on all of them, and the interface is the same. Still, the "default" toolkit is GTK, because that's what the GNU project tends to go with.
Anyway, with the daemon enabled (should be a user daemon, of course), you can access the same Emacs session from the GUI and the terminal emulator at the same time (emacsclient -t for terminal, emacsclient -nc for GUI), so they can be used interchangeably. Other than the limitations of the terminal emulator, they work almost the same. Though the daemon only really becomes necessary once you start adding packages to Emacs, because that will slow down the startup time. A default Emacs should open pretty quickly, but who uses Emacs and doesn't add anything to it? Also, it makes sense to have a daemon anyway, considering that you probably have at least one editor running at all times.
How to create the daemon depends on the system. On OpenBSD, I just kinda had to figure out how their init scripts work. It's too late, and I have to go to bed, but if you want me to, I can boot it up later and copy it. Also, you can just make a ".desktop" file to run things in the daemon. And use an alias for emacsclient -t if you want to use it in the terminal emulator. Though you can use the GUI as well, by making a function (or script) that opens Emacs with whatever options you want and then disowns it. The most basic being:
e()
{
emacsclient -nc $1 & disown
}
This is the desktop file I made (in .local/share/applications). It specifically creates a new frame, and when it's closed, it also closes the buffer:
[Desktop Entry]
Name=Emacs New Window (Client)
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=/usr/bin/emacsclient --alternate-editor= --create-frame %F
Icon=emacs
Type=Application
Terminal=false
Categories=Development;TextEditor;
StartupWMClass=Emacs
Keywords=emacsclient;
And for an example of Emacs' image support, do alt+x and then run image-dired. Or open a website that contains images with eww. It's pretty nice.