I spent a while implementing a pretty-printer in elisp, only to realise that ielm already has a fine pretty-printer. Turns out that pp-to-string is built-in to Emacs!
(I missed this initially because of the short name: I only found cl-prettyprint.)
miniblog.
Related Posts
Today I learnt that Lua projects often use *3* spaces for indentation! https://github.com/luarocks/lua-style-guide/blob/master/README.md#indentation-and-formatting
I initially thought something was very wrong with editor config.
I'm fascinated to learn that some distros are including the whole HTML manual in the package!
It seems like a nice thing for users, but I was initially surprised to see JS in the package.
Showing lines of context is a remarkably hard problem for a syntactic diff.
Line 23 on the right is new, but lines 24 and 25 also map to the same line on the left! Initially I thought this was a bug.
It's impossible to show exactly N context lines whilst preserving alignment.
