Realized many in this community might have some nuggets of wisdom to share. As that's the case, for those of you who use Emacs, how would you get into it today?
Ask HN: If you had to relearn Emacs today, how would you?
1–3 of 3 posts
Re: Ask HN: If you had to relearn Emacs today, how would you?
#2Re: Ask HN: If you had to relearn Emacs today, how would you?
#3I would start from a completely vanilla emacs (on package emacs-pgtk--that is the graphical version), then enable Options > Cut/Paste with C-x/C-c/C-v CUA mode, then Options > Save Options.
I like and use Emacs, but it is showing its age. The defaults are all bad--but the possible end result you CAN configure is pretty modern [1]. I use emacs for programming (Rust including IDE, intellisense, go to definition, debugging, the works), git (magit), for email (mu4e), and for scientific writing (xenops, latex including preview), pdf notetaker (org-noter), looking at installed system "info" documentation (info), tramp (transparently open files from other computers in your emacs), org mode (note taking, Zettelkasten including search).
org mode is awesome. It's the obvious end result of what happens when you use emacs for everything: you can have org documents contain emacs lisp snippets (or shell scripts) that you then can point at and execute--or not. The resulting output of those commands can go into the same org document there--or not. It's like Jupyter Notebook in that way.
Personally, I got into emacs because I wanted to do more Lisp. You will (automatically) learn a little Lisp to be able to use emacs properly.
I think the best way to understand Emacs is it's a Lisp VM with an editor attached. The editor is almost all malleable at runtime--it's clearly made for programmers. I almost never restart emacs, I just mutate it on the go. It has a debugger and profiler in the Lisp VM, accessible right in the emacs Options menu, in case your weird mutations act up (they will). The feel is like the old home computer basic interpreters, just better. Including getting weird emacs Lisp snippets from magazines (errr... websites) and typing them in, typos and all.
I would start reading at https://ftp.gnu.org/old-gnu/Manuals/emacs-21.2/html_chapter/... (yes, that specific page).
The emacs GUI renderer is surprisingly capable, it can do syntax highlighting (font "locking", fontifying), pictures, hover, variable width fonts (including variable-width tables--vtable) and stuff like that (i.e. your buffer can contain those or you can synthesize those on the fly).
When in emacs, you can press Alt-x (M- means Alt- , so docs say "M-x" [2]) and have a LOT of existing commands at your fingertips. I recommend M-x magit to get a taste of what is possible for anyone to write in emacs gui.
Everything there is in emacs can be looked at via reflection. Try M-x describe-mode, or M-x describe-face, or M-x describe-key (to answer wtf does the key combo "x" do), M-x info, M-x woman, M-x help. Emacs has hyperlinks and pretty good mouse support.
Start customizing Emacs settings using M-x customize-variable (that's Options > Customize Emacs), only later by editing init.el manually.
Remember C-g (ctrl-g), which stops the Lisp interpreter's evaluation of whatever it is doing (like Ctrl-c would be in the terminal, but ctrl-c is Copy to Clipboard, or something else--never is Ctrl-c "cancel" in emacs).
[1] I have a 5000 line emacs config directory that grew over the years. This is not a boast. I hate that it's not the default. See https://github.com/daym/emacs-config -- please don't try using the entire thing. Cobble together your config using copy&paste like I did (start at init.el) :) Don't restart emacs, use the "scratch" buffer and evaluate snippets there.
[2] It's not because they are contrarian, it's because the original emacs keyboard had a Meta key. emacs is OLD.