An old theme throwback

I have lost most of my stuff from when I was blogging ages ago, but I have at least one image of an old version I had:

I remember I never did finish the navigation-part, but was quite happy with the rest of the design. I made it all myself, mostly in Photoshop and then dividing that into HTML elements. I remember thinking it was cool that I could pipe fortune to my page. Those were the days of 2advanced, gabo corp, etc.. This was 100% HTML etc though.

My journey to doom

It took me a pandemic to get back to blogging, but here we are.

A long way back, I was getting into linux. I think I was around 14.

A friend of mine knew some linux, and showed me a few things. He opened vim, and then he asked me to exit it. I tried a bunch of things to no avail, but just before he started laughing and was reaching for the keyboard, I hit c-z, and then kill -9’ed the thing. Not the proper way for sure, but I did feel a slight sense of victory.

I was intrigued, and started playing around with vim at home. After an initial struggle, I was in love. That is now something like 25 years ago, and its modal editing power is something I don’t really see myself abandoning, ever.

Anyway, 5-6 years ago I was working on a project with a brilliant friend of mine, who knew both vim and emacs. It was a great opportunity I thought, so I found Spacemacs and foiled him into abandoning his .emacs.d conf and start using Spacemacs with me (thanks Alf!).

Spacemacs was amazing. It comes with evil-mode and good keymaps for other major modes. That is the most important package for me, since I wouldn’t have been using emacs without it (I still don’t know the standard emacs keys). The self documented way the menu works run really made the whole experience a lot nicer than a default install would have. I started playing around with org-mode and magit, which receives so much praise. Many people say org-mode is the killer app, but for me magit was just.. a game changer. I felt like I had just gained some kind of superpower.

I did do the emacs tutorial, but holy fuck are those default chords insane. I’m proud to say that I have been using emacs daily for about 5 years, and I still don’t know how to exit it with the default keybindings (I know how to find them though). But I still remember ctrl-z, and now I have xkill 😉.

Anyway, after that I did start getting into org-mode. But that was a struggle for me. I spend way too much time tweaking on things (see my dotfiles), and org-mode gives you the motherload of tweaking possibilities. There is no ‘right way’ in org-mode. One file per project? One node? One subnode? Tags? Properties? The possibilities are endless. So of course I ended up with some paradox of choice dilemma and soon entered decision fatigue and just gave up. Honestly, 5 years in and I’m still not sure what the hell I’m doing in org-mode.

I have my dotfiles versioned and on github, but there’s lots of uncommitted stuff, and it differs from my computers. So since I have to be at home all day now with the corona stuff happening anyway, I set out to fix that. After spending 3 fucking hours turning this: into this: , and then another 20 tweaking who knows what, I turned to Spacemacs. I had kind of dreaded my /.emacs.d, because there’s just so much uncommitted stuff, and again, it is very different on my two primary computers.

After a while some things started bugging me about Spacemacs. Speed is perhaps the most important one, but there would be these small issues popping up now and again. Like for instance how mu4e was configured did not really work with my workflow. Most of these things boil down to my own emacs incompetence, but it was my first real meet with a lisp. Spacemacs is massive, and my elisp-fu was/is decidedly not.

Anyway, I thought about it, figured I don’t have enough time left to start my own custom config - and I’ve heard great things about doom-emacs; sensible defaults, bare bones, more true to vi, and of course its speed.

So, fuck it. I finally graduated. I declared /.emacs.d bankrupsy!

I installed doom-emacs, and I would only transfer and tweak the things I actually used. Funny thing that by the way - I know my way around git, I don’t have a problem deleting or changing commit history - but it still does feel kind of ethereal if you commit it, doesn’t it? “I just want to try this thing out” is what made the configs on my computers deviate, so I’ll look out for that now after I finally have synced them back. Since ivy is default, I’ll even stick to that so I finally can try that (I used helm before).

So this is my journey going from vim to Spacemacs to doom-emacs. In general, I will say that Spacemacs has pretty good documentation, and it does work pretty well.

Going forward, I would not blindly copy something that worked but I didn’t really understand.

Things I had to figure out

In general it is very easy to find out what something does in emacs by simply pressing c-h {v, f, k}, which will describe a variable, function or key, respectively.

In general, I prefer to only specify/modify what I need to. The community is huge, and I am sure they will come up with better ideas than me, so I prefer not to override default behaviour. And if there is a default behaviour, I will make an effort to like that first. Example: in Spacemacs, I always used SPC+; to comment stuff. I had entirely forgotten about gc. In doom-emacs, only the latter is supported out of the box. So instead of just adding that keymap, I stuck with gc for a while. I like it!

So I started with a clean slate: /.emacs.d/bin/doom init. From there, I explored the default keybindings (SPC), added a few packages I wanted, and started just using it. Every time I found something I was missing, I first turned to doom itself to see if there is just another way or keybinding of doing it, and if not, I added it myself.

Keybindings

Moving from Spacemacs to doom-emacs was simple in the technical sense, but it was not pleasant at all given how accustomed I had become to the shortcuts. Spacemacs gives you `leader o` to put your own stuff. doom uses that. Fair enough, so I switched to `a`. I had a lot of bindings, and some didn’t even work (or was valid) anymore, so I only moved over the ones I used.

In the end, I kind of liked that not everything was wired up.

Here’s a few things I added to my own config.el:

I not a huge fan of using SPC-W + {h,j,k,l} to move around. I found that doom-emacs binds M+[1-9] to switch workspaces. Try that to see the difference. I mean the workspace switching feels like fucking magic compared to it. I also have alt + {h,j,k,l} set up to switch panes in `tmux`, so I kind of want to override those, knowing I will shadow a few vim keys in the process. The problem is that its not obvious which mode stuff I miss out on by doing this. But, switching windows is something I do all the time, so it makes sense to optimize for that.

In the end I think I only made 20-odd bindings, and I am happy for now.

Packages

Care must be taken when you add packages, so you don’t ruin the optimizations that are in doom. Aside from enabling a few in init.el, I added winum to get that window selection from Spacemacs back, helm-org-rifle, because it is awesome, and mu4e-alert for e-mail notifications.

tl;dr

Well this became a bit of a ramble. So anyway, doom-emacs is awesome, and I can highly recommend it. Some people will tell you that you should Roll Your Own Config, but Jesus Christ. My dotfiles repository is already a sign of some disorder. Maybe later down the line..

Spacemacs was a fantastic start for me. Now that I know a bit more, I feel comfortable moving to doom-emacs, which is faster and more like vim. I can highly recommend it. It doesn’t have all the bells and whistles, but you can always just add that yourself if you miss anything.

org-mode + hugo = ❤

Hello world!

I’ve been using org-mode for years and I write personal journals in it from time to time. I also dabble way too much in optimizing how I use it to actually be productive in it, but I digress..

I’ve read about blogging from org-mode and publishing that directly to static sites. I was intrigued, and I somewhat miss blogging, which I haven’t done in probably 10-15 years by now. So here goes, this will be me just trying out syntax and styles.

If this works as easy as it says on the package, that would be pretty cool.

And of course it does! It really is almost ridiculous all the stuff you can do with org-mode.

Lets try a simple table:

Table 1: This is a table
id col1 col2
1 here is
2 some cool
3 table stuff

Evaluations

Since this is all org-mode, we can evaluate whatever we want and include the results, on save.

Javascript

const three = 3;
console.log(`Hello World and ${three}`);

Output:

Hello World and 3

Lisp

(message "Hello from Lisp")

Output:

Hello from Lisp

C

#include <stdio.h>

int main() {
  srand(time(NULL));
  int res = rand() % 500;

  printf("Hello from C %i!", res);
  return 0;
}

Output:

Hello from C 152!

Well blimey

This works really well! How does a link look like?

Image all the things! ATTACH

The images are fetched from my local source (or external) and added on the fly when we compile this, and then added to the correct post folder automatically. Pretty fly.

My current wallpaper wallpaper:

Some house:

Lists

How about a todo list? [2/5]

  • Things
  • I
  • Need
  • To
  • Do

How about tags? test@life

Does not export. But that’s OK - main page title tags apply.

This is great.

RSS test

A test category - that means RSS should not get this..