Hung-Yi’s Journal

Front-end Developer, Emacs Adventurer, Home Cook

02 Apr 2021

Split a List Into Batches Using Emacs Lisp

Sometimes a list of things is too large and it needs to be split into batches before it can be processed effectively. A quick google didn't reveal any quick copy-pastable elisp (a.k.a. Emacs Lisp) functions that did this kind of batching, so I cobbled together what I found and came up with this cl-loop implementation, which is hopefully performant.

17 Mar 2021

How to Quickly Get evil-mc Working With Smartparens

evil-mc is great for working with multiple cursors and smartparens is great for working with lispy s-expressions. But can they work nicely together without putting in a lot of effort writing glue between the two? Read on to find out.

03 Mar 2021

Convolute Lisp S-Expressions With Smartparens

"Convoluting a lisp s-expression" sounds like computer science ivory tower bollocks, but after I actually learned what it was and how to use it, I'm seeing it pop up quite regularly when writing lisp. Let me show you the magic; I promise every time you get to use it, you'll feel like a king!

01 Mar 2021

How to Emojify Selectrum Candidates

If you use both emacs-emojify and selectrum and you're having trouble getting emoji to show up properly in the list of completion candidates, especially after the latest round of selectrum updates (commit 21cee86) then I have an elisp configuration snippet that may help you. Read on to see it.

24 Feb 2021

The Programmer's Way to Write in Title Case Using Emacs Lisp

It turns out that writing in proper title case can be important for a front-end developer, since there are often things on screen that need to appear as a title to convey importance: dialog headers, menu items, buttons labels, to name a few.

The problem is I had always dismissed it as something for school, academics or "real" writers, so I never bothered to learn the rules properly. This meant many distracting trips to https://titlecase.com/. Realising this, I used Emacs to make a quick way to convert something to title case without relying on my brain. This post is my journey on how I wrote that thing.