A blog about everything, by Jack Baty

Creating Blot Journal entries using Emacs

Here’s the function I just wrote for creating new Journal entries in Blot:

;; Create Blot Journal post
(defun jab/blot-new-journal ()
  "Create and visit a new draft journal post in Blot"
  (let* ((default-directory (concat "~/Dropbox/Apps/Blot/[Journal]/"
                                    (format-time-string "%Y/%m-%B/")))
         (fpath (concat default-directory (format-time-string "%Y-%m-%d-") "journal.md")))
    ;; If folder doesn't exist, create it
    (make-directory default-directory)

    ;; I use YAML metadata in Blot, even though it's not required.
    (write-region (concat
                   "\ntitle: '" (format-time-string "%A, %B %d, %Y") "'"
                   "\ndate: " (format-time-string "%Y-%m-%d %H:%M:%S %z")
                   "\ntags: [\"\"]"
                   "\nsummary: "
                   "\ndraft: Yes"
           "# " (format-time-string "%A, %B %d, %Y"))
                  nil (expand-file-name fpath) nil nil nil t)
    (find-file (expand-file-name fpath))))

I could tidy and DRY that up, but it works.

Wednesday, October 04, 2023

I wrote a lisp function for creating Journal entries in Blot. You know, just in case.

The thing about using Tinderbox as my daily notes blog is that each entry becomes its own post. With other tools, each entry is just another paragraph for the day’s note. Everything is in one bucket…one RSS entry. If I publish early in the day, only part of that day’s notes are included in the feed. I don’t love this.

Oh cool, toilet has been leaking.

Leaky toilet falloutLeaky toilet fallout

Tuesday, October 3, 2023

Thinking about what it was like to do daily notes in Blot. Now I don’t remember why I stopped, but I’m sure it’ll come back to me.

Blot and Org-mode

According to the latest Blot.im newsletter, Blot now supports Org-mode files. I haven’t found much documentation, but my one .org test file is not rendering. (This post is written in Markdown). I’ll keep digging.

Blot and Dropbox issue

Some of the older posts in this Blot blog were rendering as empty documents. I figured it was some sort of Dropbox issue, so I rebuilt the index in Maestral and suddenly there were 287 conflicted copies, each right next to the original zero-byte files. This took me about an hour to fix, but that’s not a situation I want to be in again.

I’m feeling a little gun-shy here.

Blot permalinks

I just noticed that my emacs function for creating Blot posts included a slug” element in the front matter. Slug is not an officially supported item, and doesn’t work like one would expect. I have links configured as YYYY/slug so I would expect this post to end up at /2023/blot-permalinks, but if I put slug: blot-permalinks in the front matter, the URL ends up as just /blog-permalinks (no year).

I normally add slugs to front matter so that if I change the post title later, old links will still work. While I could add a Link:” front matter element that includes the year, I think I’ll just leave it out and let Blot handle things.