Styling a Markdown one-line journal in Emacs

I like the idea of making a one-line journal, whether on paper or in some flavor of text file. I’ve tried it a handful of times, but nothing ever stuck. However! I think this new way has the best chance of being lightweight, nice-looking, and easy to update from anywhere.

I’d forgotten about George Coghill’s The One-Line-Per-Day, One-Page Plain Text Daily Journal until yesterday and that gave me the boost I needed. Here’s what I’m doing, which borrows a lot from his formatting:

I have a one-line-journal.md file in Dropbox that I open in Emacs (or in 1Writer on the phone) and it looks like this:

one page of Markdown-formatted one-line journal entries in Emacs

My favorite part of all this is this section of init.el that tells Emacs to format anything that looks like 2024-12-29 Sun in a Markdown file as white + bold. I could make this more robust by changing it to only affect dates that start in the first column of a line, and only match actual days of the week instead of three random alpha characters, but I use Markdown so little in Emacs other than this file that I can live with this setup. And no, I didn’t know how to do this and got ChatGPT to write it:

(defun my-markdown-highlight-dates ()
  "Highlight ISO dates followed by a three-letter day abbreviation in red."
  (font-lock-add-keywords
   nil
   '(("\\b\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [A-Z][a-z]\\{2\\}\\)\\b"
      1 '(:weight bold :foreground "white") t))))

(add-hook 'markdown-mode-hook #'my-markdown-highlight-dates)

I separate all the micro-entries in each day with a bullet, which I can type with the snippet of blt. This is handled by abbrev-mode, which turns on automatically with this line in init.el:

(setq-default abbrev-mode t)


Date
December 29, 2024