Emacs Elisp

October 09, 2018

Emacs LISP is a programming language, that most of Emacs is implemented in, except for a small C core. This is what you use to configure Emacs or to extend it. I’m not going to do a real introduction to it here. The Emacs LISP introduction available in Emacs or on the GNU website is a great place to start.

LISP looks weird, but it is beautiful, and you either learn to accept it or love it once you get used to it. But there are a few things you should know that I thought was useful while I was learning to code in LISP for the first time.

Everything is a function in lisp. You don’t have operators like = or !, but instead everything is a function. What you would write as functionName(param1, param2) in Java or C would be (function-name param1 param2) in LISP. It is not that different to be honest. e

It can take a while to get used to it, but I honestly love it. My dream job is to have one where I can write LISP all day.


October 08, 2018

I have been planning to do a blog post series about Emacs for a while now. This is not about using emacs however. It is about the configuration of Emacs.

There are two editors that programmers and power users have relied on for a really long time, both of them started in the second half of the 70s. VI and Emacs. Both are still alive today, not in the exact same form they started out in, but the same prinicipal form. VI lives today as VIM and NeoVIM. And Emacs lives today as GNU Emacs.

Emacs is a very powerful editor, that can be configured to do more or less anything. Emacs can be extended and customized through Emacs LISP. This could simple, like changing a font or more complex like writing an entire email client.

When you start using software that started before most of the conventions for naming and keyboard shortscuts was coined, you should expect them to be a little bit different. And there is no expection for Emacs. The two things that are the most different are the Emacs Keyboard Shortcuts and the naming conventions for some stuff.

In Emacs the Frame is what most computer users calls a Window, and a window can be divided into multiple windows. You can split a window horizontally or vertically. Then you have the buffers. A buffer is some kind of content, it can be a file, a unsaved file or something more like an app. All of these can be visible in none, one or multiple windows.

This is a very powerful concept, because you can have lets say 100 buffers open, and at any time re-configure what is shown without closing them. Or if you work on a large file have two of that buffer open at once.

Emacs keyboard shortcuts are kind of weird, and they don’t follow normal conventions like Control / Command S etc. They are weird, and you can customize it how you like. But they are very powerful. And how you use them are up to you.

There are however two things you should learn imediatly, C- means Control + something and M- means Alt + something on most systems.