Written on 10th March 2025.

This is a blog that I've written in emacs. The blog posts are written in emacs, and the blogging tool is written in emacs lisp. I'm still unsure if doing this is crazy - it likely is. But let's see how it works over time.

Does it work?

I can write stuff, and I can publish it. I think that probably means it works.

Are you sure?

Yes! If you can see this, then I am totally sure.

Can you give me a gratuitous substation image to be sure?

Yes - here are some large components which you shouldn't touch.

PXL_20250302_151336585-2.MP.jpg

Can you write functions to embed into the output?

Yes - thanks to "org babel" - a tool which comes with emacs you can have code blocks. These are executed when the blog post is published, and the results embedded into the output.

For example, you can calculate square and cube numbers in Python, and generate a table from the output:

return [[x for x in range(10)],
        [x**2 for x in range(10)],
        [x**3 for x in range(10)]]
0 1 2 3 4 5 6 7 8 9
0 1 4 9 16 25 36 49 64 81
0 1 8 27 64 125 216 343 512 729

…or write functions in lisp:

(+ 1 (+ 2 3))
6

…or you can do fancier things, like generate charts - from this example

import matplotlib
import numpy
matplotlib.use('Agg')

import matplotlib.pyplot as plt

fig=plt.figure(figsize=(4,2))
x=numpy.linspace(-15,15)
plt.plot(numpy.sin(x)/x)
fig.tight_layout()

plt.savefig('images/blog-demo-matplot.png')

return './images/blog-demo-matplot.png'
./images/blog-demo-matplot.png

python-matplot-fig.png