Introduction

As I mentioned in my previous post I decided to use Emacs as my text editor. While learning the basic keybindings and terminology is not that difficult thanks to its built-in tutorial, getting to an actual dev environment can be quite a challenging undertaking. Even though I only barely scratched the surface of Emacs, I might be able to give you a roadmap towards grasping the basics.

1. Go through the Emacs tutorial (duh)

Ctrl-h followed by pressing t

2. Learn the most important functions of Elisp

You should at least be able to set variables, define functions, set hooks, change keybindings and install/load packages. Furthermore, you should understand how use-package works because it’s fairly commonly used and it will make your config far more manageable. Keep in mind that use-package will immediately load the packages unless you specify a hook or keybinding to load it only when needed.

A few options are:

  • :init executes code first
  • :config executes code after the package is loaded
  • :hook allows you to specify when the package is loaded
  • :after allows you to specify which package has to be loaded beforehand
  • :bind allows you to set keybindings

3. Get a very basic setup for a programming language

I used Ruby because of my job but Python and JS are probably better choices since it will be far easier to find information for troubleshooting.

Don’t make it too fancy. Just try to get some code-completion and maybe a few features for project navigation.

4. Check out yay-evil-emacs

Yay-evil-emacs is a very lightweight Emacs “distro” by ianpan870102 and shows how your config could look like. Most importantly, it is pretty well documented what each piece of code does. Read through the entire config.org file and make sure that you understand pretty much all of it. Search for functions and packages that you do not understand. You can then extend this config or implement some of the ideas in your own. This could be a good point to stop following this roadmap.

5. (Optional) Learn Vim Keybindings

Vim’s modal editing features offer a great productivity boost to many people. Since Emacs offers pretty fantastic Vim-keybindings emulation via Evil it might be a great idea to dive into it now. I recommend this tutorial.

6. (Optional) Get a distro

Many people insist on a completely self-made Emacs config. I’m not one of these people. At least early on it should be a priority to mess around with software instead of needing to completely set up the environment yourself. Emacs is not known to have great default settings. So, having a distro which improves the standard experience can be a great help. You might even continue using it if you don’t encounter many issues.

My personal choice for an Emacs distro would be Doom Emacs. Compared to Spacemacs it is far better optimised and focuses on getting cross-platform issues and various quirks out of the way. It is considered far more opinionated in comparison but I think that’s a good thing.

By focusing on how one type of person wants to use its software you can ensure that this subgroup has the best possible experience instead of trying to appeal to everyone equally. Having different versions of the same core product for different user groups sounds like an interesting concept that I have not seen so often in software products.

Epilogue

That’s it! This doesn’t really go into detail but I hope that this serves a bit as an Emacs learning excercise.