Recent Posts

Gotta make progress with emacs

I keep getting stuck! I want to learn and use Emacs for my reading and writing but I keep falling down the configuration rabbit hole. I have made a number of attempts to create a vanilla Emacs configuration but rarely get further than Prot's's recommended decent defaults (Emacs: decent defaults I shared with Sacha Chua, Emacs: a basic and capable configuration and Emacs: organise your init file (outline-minor-mode or Org literate config)).

So my plan is now to spend a few weeks working with Peter Prevos' Emacs Writing Studio.

I hope to tune this to exploit MacOS using some of the advice from Emacs on macOS.

I also plan to focus on using Gnu Hyperbole under the guidance of Charlie Holland's series HyWiki: Zero Markup Hypertext, Hyperbole Implicit Buttons: Build your Hyperverse, and Hyperbole HyRolo: Search, Retrieve and Insert Records, Not Lines. I also want to make use of Charlie's article Annotate-in-Place Notes with Emacs and org-remark.

Let's see how this goes!

Temporary Outage Fixed

This blog has been a static site since I migrated to Blogmore back in May.

Some time over the past couple of days, my hosting provider, Reclaim Hosting, must have repopulated the directory with WordPress artefacts and my landing page had become a Setup Your New WordPress site page. I managed to remove those artefacts and used the hosting site dashboard (CPanel) to uninstall the whole WordPress app. So, hopefully, this should not happen again.

Shout out to Phil Newton

Prof Phil Newton is a Professor of neuroscience at Swansea University and a former colleague. He has just published three videos on YouTube and I thought I'd post this shout-out to honour that former connection and also to test YouTube embedding on BlogMore.

The first video is entitled Designing Effective Assessments in Higher Education. A pragmatic introductory guide

The other two videos are:

Phil's channel on YouTube is worth a look.

Blogmore now supports LaTeX math markup

In a post published yesterday, Davep has announced that BlogMore v2.41.0 now supports mermaid diagrams and LaTeX mathematics typesetting.

I'm not sure if I'd use mermaid diagrams, but in my professional career as a University lecturer I used LaTeX extensively, and I think that I would occasionally find a use for it here.

Here is an example.

The solution of the quadratic equation

$$ ax^2 + bx + c = 0 $$

is given by the famous formula

$$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}. $$

Typesetting uses either the katex or mathjax libraries. You choose the flavour in your configuration file.

with_maths: true
math_provider: katex|mathjax

I used katex for this example.

The libraries are only included on the pages that actually have LaTeX markup.

Publishing my BlogMore blog with rsync over ssh

BlogMore comes with a built-in facility to post the generated static website to GitHub pages. The host of blog.cpjobling.net is however a standard LAMP) stack which is updated by recursively copying the contents of the public directory to a folder blog.cpjobling.net on the host. That folder has been registered as the base directory for the DNS record.

The easiest way to do that is using rsync over ssh.

I used the advice given in How to Setup Rsync without password with SSH on UNIX / Linux? to set up my publish.sh script:

#!/usr/bin/env bash

cd ~/blogs/blog.cpjobling.net # local files
blogmore build --clean-first # build blog using default`posts` and config `blogmore.yml`
echo "Syncing files using SSH (see https://superuser.com/questions/555799/how-to-setup-rsync-without-password-with-ssh-on-unix-linux)"
rsync -avz --delete -e ssh public/ user@host.hosting.com:blog.cpjobling.net
ℹ️ Note

I use the --clean-first flag for the blogmore build command and --delete in the rsync command to ensure that no orphan files end up on the server.

Exploring Emacs' Markdown Mode

In my second tag-blogmore post (and first category-emacs post), I thought this would be a good opportunity to explore the BlogMore API as well as markdown mode.

I immediately hit a problem because in Emacs on my Mac, M-3 does not enter the "pound" symbol needed to mark a heading/subheading. Is there an "insert heading function" command in markdown-mode? Fortunately there is and it's on the keyboard shortcut C-c C-s 2 (heading 2 because heading 1 is the post title).

This is what I found.

Blogmore commands discovered

  • blogmore-toggle-draft -- toggles the draft: true tag in the current posts' metadata block.
  • blogmore-link-tag -- adds a link to a tag page in the current blog.
  • blogmore-link-category -- adds a link to the category page in the current blog.
  • blogmore-update-date -- updates the post's save date which is useful if you are writing a large post and you want the date to reflect the actual publication date.

Blogmore documentation

Both written by davep:

  • BlogMore -- documemtation for the BlogMore tool that I am now using to create this blog.
  • davep/blogmore.el -- provides tools that help in the creation of blog posts for a BlogMore blog.

Markdown mode commands discovered

  • C-c C-s 2 (markdown-insert-header-atx-2) -- inserts level 2 heading.
  • C-c C-c p (markdown-preview) -- previews content of the current markdown-mode buffer in the default web browser.
  • C-c C-l (markdown-insert-link) -- isert a URL or Reference link.

Markdown-mode documentation

Markdown Mode for Emacs by Jason Blevins.

Fixing the M-3 issue on a Mac

[I found this fix some time ago but I hadn't gotten around to adding it to my latest Emacs configuration.]

On a Mac with a UK keyboard, the keystroke to generate the "pound sign" (S-3) literally produces the currency symbol £. To get the hashtag symbol # we have to press Option-3 (M-3), but this is intercepted by emacs. This makes it very difficult to deal with markdown and org-mode files that use # extensively.

To fix this, we have to redefine the global key M-3:

;; Allow hash to be entered on Mac UK keyboard
(global-set-key (kbd "M-3") '(lambda () (interactive) (insert "#")))

On my prelude-based configuration, this code has been added to ../prelude/personal/01-settings.el.

blog.cpjobling.net is now a static site

After some fiddling about I have moth-balled the WordPress site that hosted blog.cpjobling.net and replaced it with a static site generated by blogmore.

There is a bit of work needed to add proper categories and tags to older posts, and some of the pages that relied on services (like Twitter) that I no longer use, won't work properly.

Hopefully the new version of Fresh and Crispy will start to get some more attention as I use it for note-taking alongside an ongoing project of learning emacs.

Blog More Fresh and Crispy with blogmore?

It's been more than a year since I started to move my old WordPress blog to Hugo. Work stopped around August 2024, and I've just this week come back to it. However, I was getting frustrated by having to reclimb the steep learning curve the for Hugo and yesterday I discovered Dave Pearson's blogmore tool (https://blogmore.davep.dev) which seems much more straightforward. Blogmore is a tool, written in Python, that creates a static website, but without many of the complexities of Hugo and similar static website tools. It's designed to be simple and encourage blogging more.

I hope to relaunch Fresh and Crispy at blog.cpjobling.net and use blogmore to blog more!