Welcome to this small corner of the internet that I've claimed for myself—enjoy your stay.


Integrating Zsh's History Into Eshell ()

I use eshell as my main shell. Still, a terminal emulator with zsh is kept around for longer running processes and scratchpads. One thing that’s essential for this setup to make sense is that eshell and zsh share the same history file. Sadly, this doesn’t work out of the box: zsh stores its history in a metafied format—nothing that’s not fixable on the Emacs side, of course!

Read more – 2023-11-27

Using XMonad with NixOS (, , )

I recently switched to NixOS, and one of the first tasks was to properly set up my window manager of choice—XMonad, of course. Luckily, the project provides a custom flake that makes pretty very straightforward; if you know your way around flakes and Nix, that is. I don’t yet, so I hit some rough spots. Since providing more documentation always sounds like a worthwhile goal, this post is just that: a diff-by-diff guide on how everything was set up on my side.

Read more – 2023-11-13

Fixing Lsp-Mode's Hover Signatures (, , )

By now, lsp servers have become the norm for editor-agnostic language support. As expected, Emacs features at least two packages that implement the protocol: the built-in eglot, and the third-party lsp-mode. I will focus on the latter in this post.

Lsp clients have the option of showing useful things on hover. In most languages, there is an obvious candidate for this: the type signature of the thing at point. Sadly—for some languages—the implementation of the feature is… not great. Buggy even, one might say.
I have reported this as a bug here, but that issue seems to have stalled, so here we are.
Taking this as an excuse to talk about Emacs’s infinite customisability, there is of course a way to fix this within the bounds of our configuration. Let’s do that!

Read more – 2023-10-22

Prettifying LaTeX Buffers ()

A friend recently confided in me that, after years of using Emacs, he was only now getting into using prettify-symbols-mode for editing LaTeX buffers! After overwhelming him with more customisations related to this, I realised that the topic—while seemingly easy on the surface—actually has a lot more depth to it than one would first imagine.

Read more – 2023-09-10

Change the Insides of an S-Expression in Emacs ()

The term “S-expression” is not super accurate, and should be substituted with something like “semantic unit” instead, as I’m also talking about things that aren’t necessarily S-expressions as Emacs knows them. I mainly chose the term for brevity, and because it’s hopefully more familiar—and thus less scary—to the reader.
I have to make a confession: I have an evil past—literally. Having switched to vanilla Emacs keybindings a while ago, one thing that I genuinely miss from that time are the ci( and ca( motions, killing everything in or around the closest encompassing ()-environment. Luckily, the change-inner package provides exactly these commands for Emacs proper. Unluckily, there are some issues regarding whitespace handling—let’s try to fix that.

Read more – 2023-08-26

Notmuch: Warn on Empty Subjects ()

Emacs’s notmuch package has this fantastic concept of an attachment check: adding notmuch-mua-attachment-check to notmuch-mua-send-hook will, before sending the message, check whether the regular expression in notmuch-mua-attachment-regexp matches. If yes—and no attachment has been added—it will alert the user, asking whether one really wants to send that email; otherwise, everything goes through smoothly. Due to some personal idiosyncrasies, I needed a variant of this to check for empty subjects, lest I become one of those people who sends emails like that. As always, Emacs delivers.

Read more – 2023-07-30

Incorporating BibTeX into Hakyll ()

When writing a blog post that feels academic—or pretentious—enough to invoke the need for citations, having them automatically generated feels like a mandatory requirement. I can only shudder to imagine the alternatives.

The good news is that LaTeX has solved this problem long ago; we now have BibTeX as a file format, and any number of programs, like biblatex or natbib, to generate good-looking citations from that. Further, everyone’s favourite document format converter—pandoc—has excellent support for leveraging this functionality. All that’s left is to integrate this into Hakyll; and to play around with it, of course!

Read more – 2023-06-20

The tensor product of S-modules is a convolution product ()

Classically, (algebraic) symmetric operads are defined as certain graded objects, each level coming equipped with a nice action of the symmetric group, which are also monoids in some sense. While it is often noted that the grading and action correspond exactly to the data of a functor, the fact that virtually all of the structure needed to define operads can be expressed categorically is often passed by, which I think is quite the shame! In this post I want to explicitly calculate the Day convolution for symmetric operads in the category of vector spaces—though the argument holds for all nice enough target categories—in order to show that it is nothing but the usual tensor product of modules.

Read more – 2023-06-12

Use-package now has a :vc keyword ()

Just a quick heads-up: use-package, which was merged into Emacs in November last year, now has a :vc keyword!

Read more – 2023-05-18

Keyboardio Atreus Review ()

And now for something completely different—hardware. Even worse: consumerism! I bought an Atreus keyboard from Keyboardio about three weeks ago, and can’t resist writing at least a few sentences about it.

tl;dr: Get it. For bonus points, build it yourself!

Read more – 2023-05-06

XMonad Module Showcase: X.A.Search (, )

I’d like to highlight another xmonad module that has become quite essential to me: XMonad.Actions.Search. Its premise is simple: you enter some text into the xmonad prompt, and it queries a search engine of your choice with this input—straightforward, and yet very effective.

Read more – 2023-03-19

Announcing: latex-change-env Version 0.3 ()

I’ve just released version 0.3 of latex-change-env, featuring some major improvements with regard to inline maths and macro handling; this seems as good a time as any to talk about the package in full. I briefly mentioned it in the post about my research workflow, but I figure now that the library has reached a state where I’m not ashamed of it anymore—at least, not at the time of writing this—it may warrant its own post.

Read more – 2023-02-19

Using Sidenotes with Hakyll ()

I’ve become quite enamoured with sidenotes recently, and so of course this website now has them as well! Thankfully, the integration with pandoc and Hakyll is quite straightforward, because other people have already done the hard work. Depending on your use-case, however, the existing libraries might not entirely fit the bill; for example, by default blocks that are more complicated than just paragraphs of pure text don’t work. In this post, I’d like to explain an alternative approach of integrating sidenotes into pandoc, which does enable the use of these features.

Read more – 2023-01-27

Pygmentising Hakyll's Syntax Highlighting ()

By default, Hakyll uses pandoc to generate syntax highlighting for all kinds of different programming languages. However, even in simple examples the html this produces is unsatisfactory. Thankfully, the two programs are almost infinitely customisable, and changing pretty much any setting doesn’t usually involve a lot of work—this is no exception. Using pygmentize as an example, I will show you how you can swap out pandoc’s native syntax highlighting with pretty much any third party tool that can output html.

Read more – 2023-01-21

Immediately Refile Notes with X.P.OrgMode (, , )

In a previous post I talked about XMonad.Prompt.OrgMode, an xmonad module to rapidly capture thoughts and ideas into an Org file. The functionality that the module provides has proven to be extremely useful to me, and really I couldn’t be happier with it. However, a user recently contacted me by email and told me that they’re missing but one feature: the ability to immediately refile notes.

Read more – 2023-01-14

Duality in Monoidal Categories ()

I have a new preprint on the arXiv! It is joint work with Sebastian Halbig, and concerns itself with the interplay of different structures on monoidal categories that give rise to a notion of “duality”. At five pages, it is a very short paper; yet I’d still like to give a little teaser as to what kind of question we sought to answer.

Read more – 2023-01-10

Announcing: vc-use-package ()

I’d like to announce a small package I’ve written: vc-use-package. It is a first attempt at integrating the new (as of Emacs 29) package-vc.el with the now built-in use-package. I’ve already talked about how these two interact in my last post—you can see this package as automating things juuuust a little more.

Read more – 2022-12-22

Exploring package-vc-install ()

The Emacs 29 release branch was just cut—and it’s chock full of new features! In this post, I want to talk about the new package-vc-install function, which allows one to install packages directly from their respective upstream source; for example, GitHub. It can be seen as a built-in alternative to things like quelpa or straight.el.

Read more – 2022-11-30

Adjusting preview.el for vertical monitors ()

Here’s a fun one: when previewing LaTeX fragments via AUCTeX’s preview.el library (whether it be in a .tex buffer, or—via org-auctex—in Org) things get really messed up when one or more monitors are set up in portrait mode.

Read more – 2022-11-05

A Potpourri of Emacs Tweaks ()

Emacs is the “extensible text editor”, and it wouldn’t be fun if one didn’t at least try to take advantage of that, right? Having just written a readme for my Emacs configuration, I thought it might be nice to somewhat expand on certain ideas and give a little context to some snippets that have accumulated over time.

While there is a post about my version of the query-replace function, most other tidbits have only seen the light of day in places like the “Weekly Tips, Tricks, &c.” thread on Reddit. In the spirit of hosting my content somewhere that I actually control, I chose to showcase these again here, hoping that other people may also find some of this stuff useful.
I am aware of the futility of this—Reddit is almost certainly going to be around longer than my personal site will. And yet, this feels “more correct” in some way.

Read more – 2022-10-22

Understanding Weighted Colimits as Tensor Products of Modules ()

If you’ve been doing category theory for any amount of time, you’ll probably have stumbled upon enriched category theory as a way of expressing categorical ideas internal to some context other than Set. Reading into it, you might have come across these foreign sounding concepts like weighted (co)limits and wondered what that was all about—and then got lost for a few days, trying to decipher what Kelly is talking about and why symbols resembling tensor products are suddenly being thrown around. At least that’s what happened to me.

After scouring the internet for good resources, I found two really enlightening blog posts: one by Todd Trimble and the other by John Baez—and they’re too good not to share. Plus, people always say that you don’t understand a concept unless you can explain it to someone else, so here’s my shot at it!

Read more – 2022-10-15

XMonad Module Showcase: X.A.TopicSpace (, )

One of my favourite—and most used—modules is XMonad.​Actions.​TopicSpace. However, it seems relatively unknown among the general xmonad community. I fear this is due to the fact that the module is quite old and formerly had a rather high barrier to entry. Despite having been given shiny new documentation, lots of people probably did not bother revisiting it and thus still don’t really understand why they might be interested in using topics instead of workspaces. Time to change that!

Read more – 2022-09-11

Rapidly Capture Ideas with XMonad and Emacs (, )

As I’ve said before, basically my entire digital life happens in either Emacs or xmonad. Thus, a lot of time spent on my setup either goes towards working on the two configurations separately, or—as we’ll do today—bringing them ever closed together.

Specifically, I want to showcase a new
Version 0.17.0 onwards.
xmonad module: XMonad.​Prompt.​Org­Mode. Building on top of xmonad’s prompt—which works much like dmenu—it is designed to rapidly capture thoughts and ideas whenever inspiration strikes and, importantly, to do so without disrupting one’s current workflow. The module recently got support for Org priorities, so I figured this was as good an excuse as any to talk about it.

Read more – 2022-08-27

Multiple Replacements with query-replace ()

As its name suggests, Emacs’s query-replace function, bound to M-% by default, can be used to replace occurences of one string with another—and it’s quite good at what it does. However, there is one crucial feature missing from its default functionality: the ability to create multiple from → to pairs. But this is Emacs, after all, which means that I can write that query-replace-many function I’ve always wanted, and even share it with others! The code is packaged as query-replace-many, available on GitLab and GitHub.

Read more – 2022-08-06

Calling Emacs from XMonad (, , )

In the post about my research workflow, I briefly mentioned having to call Emacs—or other external programs—from within xmonad. I figured that this was perhaps something that could be of use to more people than just me. After a little bit of deliberation and coming up with a generic enough api, I decided to turn it into an xmonad module!

These changes now live as part of the xmonad-contrib repository and are—from version 0.17.1 onwards—available for everyone to try out.
Alternatively, one could use the git versions of xmonad and xmonad-contrib; refer to INSTALL for more information.

I’d like to use this opportunity to both showcase the module—how and why one would use it—and talk a little bit about its only redeeming implementation detail.

Read more – 2022-05-25

My PhD Research Workflow (, , )

After reading Gilles Castel’s excellent blog post about his research workflow, I decided that it was as good a time as any to write about mine—deeming it novel enough to hopefully contribute something to the discussion.

Just like Castel, I’m a new PhD student in mathematics, which means no lab work and—in my case—no code. Just you and your inability to understand basic concepts. As such, I often scribble things down on paper or a blackboard first and, when sufficiently convinced that the information is worth keeping around, type it up. Typesetting something is a surprisingly effective way to catch errors in handwritten manuscripts!

As basically my entire digital life happens in either Emacs or xmonad, my setup is heavily skewed in that direction; I will make use of these tools almost every step of the way.

Read more – 2022-05-01