Inlägg om emacs

Personal ELPA Archive

There's been a few times over the years when I wanted to install an Emacs package that was not available on any of the common package distributers, such as GNU ELPA or MELPA. Most recently I wanted to install llvm-mode, but that package have recently been removed due to the size of the llvm repository. Previously, I would have just ended up not using the package at all or possibly adding the package to my own configuration repository if I really wanted to use it. This time however, I decided to try to figure out what it would take to setup your own Emacs package distribution server, and as it turns out, with a pre-existing webserver, there's only a few file conventions that need to be fulfilled on the host and client sides to do just that.

Läs mer…

The Simple-Minded Indentation Engine

I've written a few major-modes for Emacs over the years, and every time I start on a new one I take a look at the smie documentation and conclude that it seems too complicated to add a proper indentation engine for the mode.

This time however, I've had enough. It's time to get my hands dirty and write a major mode that utilizes smie.

Läs mer…

Set Variable in Hook

I've just recently started to use helm-dash for most of my documentation look-ups. I did however find it a bit awkward to configure. For it to work its magic, each major-mode should helm-dash-docsets to a list of strings with the docsets it should activate. The most straightforward way that I found to do this was this:

Läs mer…

Clang Format

I often write code in C or C++ and frequently use clang-format to automatically format the code I'm writing. Although, occasionally I get into a situation where I should use a different coding style while I'm in a particular subdirectory.

Läs mer…

Printf Format Highlighting

Most of my work is done in either C or C++, so I frequently use the printf family of functions to write a wide variety of stuff to the display. Naturally, I'd like the format specifiers to stand out from the rest of the characters in the strings, so for the longest time I used this piece of elisp code to achieve that:

Läs mer…

Emacs, Elisp and Org Mode

I have a confession to make.

I'm sort of an Emacs fanatic.

Well, perhaps fanatic is a strong word but it does reflect the manner in which I try to integrate my whole workflow into and around it. And so far, I rarely ever have to leave the leave Emacs or the terminal. Best of all, I almost never have move my hand those dreadful decimeters to the right to use the mouse.

Läs mer…