Tuesday, January 09, 2024

Have you ever been so enamoured with plain-text-static-html publishing that you're willing to burn down a month of implementing a blog using Kirby CMS in order to go back to using Emacs and Markdown and Hugo?

I have.

Org-web-tools

I just wanted to give a shout-out to Adam Porter for his Org-web-tools Emacs package.

I only discovered his package a month or so ago and I've used it daily since. Put a URL in the clipboard, then in an Org-document run M-x org-web-tools-insert-web-page-as-entry and bam!, the page is converted into Org's format and inserted as a heading in the current file. For example, here's Jason Velazquez's post about Blogging Platforms, all tucked away nicely in my "Blogging Platforms" Denote note...

<# Screenshot of Emacs buffer #>

I ran the above function, and org-web-tools grabbed the page, formatted everything, and inserted a link as a heading, the date, and the meat of the article nestled under the "Article" subheading.

Nice!

There are a number of other helpful functions in the same vein. If you frequently save links or other web content in Org-mode, it's worth checking out.

Permalink #

Prose.sh

I don't need a new blogging platform, but if I did, I'd certainly be looking at Prose.sh. It's blogging via sftp and rsync, which sounds awesome.

Permalink #

Obsidian is not at all joyful to use

I spent some time in Obsidian again yesterday. I do this once a month or so just to see if somehow it's changed into something I'd like to use. Obsidian is great software, in theory, but I still find it boring and unpleasant to actually use.

Ending my OpenBSD experiment (Almost)

I did this fun thing from Derek Sivers because I wanted to play with OpenBSD and with Vultr for hosting.

Well, I played with it. It was fun. I got to see how Dovecot works and I learned how to configure Relayd and the OpenBSD httpd server.

I think I'd end up liking it. BSD feels lighter and simpler and therefore probably more secure than the Ubuntu servers I'm running.

However, I don't need another server to manage. I don't need to run my own mail server or CalDAV server. My VPS at Digital Ocean has been running (::knocks wood::) smoothly for years and I've got the configuration down.

I'll be deleting the OpenBSD server once I've moved the few sites I'd migrated there back to Digital Ocean.

Remember, Reduce and Simplify.

I may try again later with stock OpenBSD and Caddy, without all of the Sivers' stuff.

2 hours later: I was right. I spun up a fresh OpenBSD server at Vultr and configured it myself. No services running but relayd->httpd and so far the only site it's running is jackbaty.com. I like the idea of BSD so much that I couldn't give up quite yet.

Permalink #

The care and feeding of my system

It's taped right there on the wall, Jack.

Yesterday, for some reason, the menu bar stopped showing when launching Emacs. Good grief. I had to add an explicit call to (menu-bar-mode) in my init.el. Why? Who knows. I'm sure I did something to cause it, but my commit logs don't point to anything obvious.

It's another one of those mysteries, I guess ¯_(ツ)_/¯.

Thing is, I'm weary of mystery. I want things to work all the time and require as little fuss as possible. My current situation requires a lot of care and feeding and I need to find a way out of it.

I'm not blaming Emacs, specifically, although Emacs is frequently the day's scapegoat. Yesterday I was testing the idea of moving my Daybook back to Tinderbox. I copied last year's file and cleaned out the existing entries. Then, when I'd add a weight log entry in the new file, the entry would disappear a few seconds later. That's fun. I figured out why it was happening, but it took me thirty minutes. How much of my life is wasted on these thirty-minute (or longer) interruptions while I fix or tweak something that didn't need fixing or tweaking yesterday?

Sure, much of this is self-imposed because I tweak. But I'm beginning to tire of having to babysit the things that should just be basic infrastructure. I've gotten myself into this mess, and it's my problem to fix, but how? Maybe it'll mean declaring config bankruptcy in Emacs. Maybe it'll mean dropping all my "fancy" tools and going with the simple, stable ones (are there such things?).

Reminder to self, from Thomas Paine: "The more simple anything is, the less liable it is to be disordered." Things are disordered right now.

I'm still noodling on it. It's all related to my grand Reduce & Simplify plans for this year. I just wanted to vent a little.

Permalink #

Synology drive replacement

A few months ago I became twitchy about my aging Synology so I replaced it with an old Mac Mini. The idea was that I understand how Macs work and if something breaks I can more easily deal with it.

I never unplugged the Synology, though. You know, just in case.

A week ago I started getting emails from the Synology that Drive 1 was failing. What I should have done is to unplug the thing and move on. But what I did was to order a new 8TB Seagate Ironwolf drive.

Yesterday, I powered down the Synology, pulled out the bad drive (it required no tools) and put the new drive in its place.

I booted it up and was told that the pool was degraded and needed repair. I clicked Repair and 8 hours later everything is running smoothly. I didn't need to restore files from a backup or anything.

Of course this means that I'm second-guessing my move to the Mini. The Synology has always been easy to manage and has just worked. My unease about how to fix it if something breaks is probably unnecessary.

Great, now I have two servers to deal with. This is how I "fix" things and I need to stop it.

Reduce and Simplify

If forced to come up with a theme for 2024, I'm going with "Reduce & Simplify".

I haven't formally defined it yet, but the gist of it is to use what I already have, remove things I rarely use, and rely on fewer, simpler things.

Having many choices is great, until it's not. I crossed that threshold a while ago and it's not good for my brain.

So, one app per task. One notebook. One bag. Less software. Consolidate and remove. Those sorts of things.

The "simplify" part means I should choose the simple option. An example of this is that I'll be narrowing my eyes at anything that needs to be paired, synced, or charged. Opt for the other thing where feasible.

The Org-mode Island

The more I lean into using Org-mode files for everything, the more isolated I'm feeling. It may be irrational, because "plain text", but having to export or otherwise translate everything when I post to my blog or other tools is becoming less fun. Org-mode Island is beautiful, but lonely.

Later: Jeremy Friesen reacts to the above with his take on the isolation of using Org-mode. Here's some follow up.

Printing my 2024 calendars using pcal

I keep printed calendars for the current year and month pinned above my desk. It's often easier to just glance up to see dates than to open a calendar on the computer/phone.

I used to use timeanddate.com and that works great, but I'm now using pcal because it's...nerdier I guess?

Here's the shell script for the yearly calendar (I just execute it within Emacs). It runs pcal with some options, then converts the postscript to PDF, then opens in it Preview.

Pcal script for yearly calendar

And here's the one for only the month of January.

Pcal script for monthly calendar

I like that I can include a little note in the footer (e.g. "Reduce and Simplify").

The output for the monthly PDF looks like this:

Permalink #

More about Org-mode Island

Earlier, I wrote...

Org-mode Island is beautiful, but lonely.

Jeremy Friesen reacted to my post with his own thoughtful take on the isolation of using Org-mode:

Amongst the Org-Mode Archipelago // Take on Rules

Org-Mode is my home hearth. Here I prepare my food. And sometimes I bring that food, wrapped up for transport, to a public place so that I might share. On a few occasions, I bring partially prepared ingredients and throw them in the collaboration soup; where we churn the ladel together.

I’m alone during my Org-Mode usage, but I don’t feel lonely in being here.

I quite like that, and it made me think about what I meant by "lonely". Using Org-mode pretty much requires that I also use Emacs. I love Emacs, but I love other apps, too, and often like to change what I use. With Org-mode, that's not feasible.

So, maybe "isolated" or "lonely" aren't the right words for how I'm feeling. Maybe it's "restricted" or "confined". Maybe it's not "Org-mode Island" making me feel lonely, but rather "Emacs Prison" making me feel trapped 😅.

This is a hot topic for me right now, as I've spent the past couple of days in my usual year-end frenzy of "what should I be using for notes/tasks/journals?!". Should I go all-in on paper? Should I just use Apple's default apps? Should I use best-in-class apps like DEVONthink or Tinderbox or OmniFocus?

What I've realized is exactly what Jeremy said, Org-mode is where I live and I'm comfortable there. I'm staying.

Permalink #

Beyond the Infinite Denote

My Beyond the Infinite folder is now its own Denote silo.

A Denote "silo" is just a folder that contains a .dir-locals.el file. The .dir-locals.el file sets the denote-directory variable, causing Denote commands to look only in that folder (and subfolders) rather than the default Denote folder. It's like opening a separate "vault" in Obsidian, etc.

Since I use the Beyond the Infinite folder so differently than my main set of notes, a separate silo seems appropriate.

My .dir-locals.el file is just the basics...

;;; Directory Local Variables.

((nil . ((denote-directory . "~/Desktop/Beyond the Infinite"))))

To make things easier, I added a Hazel rule that watches the "Beyond the Infinite" folder and renames new files using Denote's conventions.

Hazel rules for renaming new files using Denote conventions

I haven't created any custom commands for switching between silos yet. The Beyond the Infinite folder is bookmarked in Emacs so it's already easy to get to.

Looking for a photo of Lincoln in Denote

Denote has become the place where I put nearly everything. I really like it.

Permalink #

Not taking the photo

I have never regretted taking a photo, but I always always regret not taking one.

I've been planning to do a series of environmental (large format film) portraits of my close and extended families. The idea is to travel to their homes and photograph them using natural light, if feasible, in their favorite spaces. I would then make two archival silver gelatin fiber prints, one for them and one for me.

I've not done this even once.

Wherever I go, there is a camera with me. It often remains in the bag, unused.

I was walking yesterday and passed a man on the sidewalk wearing a hard hat and face shield which was tipped up so it didn't hit the cigarette hanging from his mouth. He had a great face and I thought it could make a fun photo. But, I was afraid to ask him if I could photograph him and only nodded as I walked by.

I'm ashamed of myself and it makes me want to sell everything and find another hobby.

Permalink #

I won't be joining RSS Club

When I first learned of RSS Club I thought, "Cool! How fun!"

The website says:

Congratulations on joining a secret society! RSS Club is a collection of blogs (personal and otherwise) committed to providing RSS-only content. It’s like a newsletter delivered to your feed reader in order to celebrate the medium of RSS and breakaway from social media.

Something has been bugging me about it, though.

I love RSS. I spend a crazy amount of time in a feed reader. I want everyone to use RSS and I want every website to publish an RSS feed or three.

So what's the problem with having some content only available via RSS?

Fair question. For me it's because it feels exclusionary with a touch of Insiderism. Mostly, though, it's that blogging itself has enough problems with adoption. I'm not sure it's a great idea to be "hiding" blog posts. Good blogs are hard enough to find these days. Why limit your writing to only those people who've already discovered you?

I totally get, and agree with, the concept of getting our stuff out of social networks, but aren't blogs already doing that?

My current thinking is that our little blogging society doesn't need secrecy, it needs visibility.

RSS Club is a fun idea and I do like the "it's like a newsletter delivered to your feed reader..." bit. What I don't love is it feels like it's advocating for RSS (a good thing) by limiting the visibility of cool content (not a good thing, IMO).

There's also some hypocrisy on my part here. I've created a way in my blog to publish things on the home page that never appear anywhere else, including the RSS feed. You need to actually visit my site in order to read it. Perhaps that's what the RSS-only content is meant to be, too.

Anyway, I love experiments like RSS Club. What I've written here are just my current feelings about it, and they are very much subject to change.

Permalink #

Safari and Arc

Switching from Safari to Arc as my default browser several months ago was a big deal for me. I've always been a Safari user. Arc, though, does innovative things that I find useful (such as Little Arc and Spaces).

Lately, however, I've noticed that I spend a lot of time "managing" things in Arc. I organize the sidebar. I pin and unpin tabs. I make spaces for no good reason. I "traffic control" sites so they open in specific ways. There are many things one can tweak Arc, and I've been tweaking all of them.

Yesterday I did this:

Making the switch

After using Safari all day, I remembered why I like it. It's tight, somehow, you know? It fits on macOS like nothing else does. It integrates with everything.

Arc's sidebar approach to tabs/bookmarks is awesome. What I found is that I don't like having the sidebar hidden, but when it's showing I tend to scan the list of tabs and click things at random, looking for things to do/read. This isn't Arc's fault, but still. Safari uses its UI to focus on the current page. This is better for my brain.

I'm going to keep using Safari for a spell and see how it goes. I've missed it, but it remains to be seen if I'm drawn back into Arc's orbit by all the neat stuff Arc does.

Permalink #

Sending Org-journal entries to Day One

I mentioned that I should create a lisp function for sending my org-journal entries to Day One. Turns out I'd already done it. The only problem was that the original version assumed I was using a new org file every day. I'm now doing monthly files, so I needed to change how the text selection was made. Here's the new function.

(defun jab/dayone-add-note ()
  "Sends current subtree as Day One entry"
  (interactive)
  (org-mark-subtree)
  (shell-command-on-region
   (point)
   (mark)
  "/usr/local/bin/dayone2 -j=Journal new"
  nil))

It's not perfect, since it includes any PROPERTY drawers and leading stars, but it works and was easy to make.

Permalink #

Implementing Daily Notes in Kirby

Dave Winer's Fargo blogging tool worked exactly how I wanted my blog to work. It collected a bunch of individual posts into a single group for each day, with each post also linked to its own page. (Dave's site still does this at scripting.com). Fargo was great, but support waned and Dave's attention went elsewhere, so I felt it was best to move on.

When I began using Tinderbox to build my Daily Notes blog, I reimplemented most of my favorite features from Fargo. The big one was the daily container of notes. Another was the small icon shown on the right of individual posts. I now have both of these here at baty.net, using (link: https://getkirby.com/ text: Kirby).

Here's the (abridged version of) how I did it.

Since Kirby's static content model reflects the underlying folder structure, individual notes go right in the day's journal folder. That way, listing the notes on a day's journal page is simple as looping through $page->children().

Kirby

Of course getting the notes where they belong is best done via Kirby's panel, so this meant creating Blueprints. Kirby's Blueprints are pretty cool. They're YAML files that define the UI and properties for content in the panel. As simple as they are, I am still struggling to wrap my brain around how they work. There's a lot of trial and error before I get things right. Eventually, my Journal Blueprint worked, and the relevant bit looks like this:

     daily-notes:
        type: pages
        label: Notes for today
        template: note
        info: "{{ page.tags }} | Title: {{ page.ShowTitle }}"

And here's the panel:

Then I created a Blueprint for individual Notes.

title: Daily Note


icon: 📝

create:
  status: listed
  template: note

columns:
  main:
    width: 2/3
    sections:
      fields:
        type: fields
        fields:
          showtitle:
            label: Show title?
            type: toggle
            text:
              - "no"
              - "yes"
          text:
            type: markdown
            size: large
  sidebar:
    width: 1/3
    sections:
      meta:
        type: fields
        fields:
          date:
            label: Date
            type: date
            default: now
          tags:
            label: Tags
            type: tags
          smallimage:
            label: Small image
            type: files
            max: 1
            multiple: false
            query: page('small-images').images
      files:
        type: files
        template: image

Note that the text, files and cover fields are vestigial and will be removed eventually.

The showtitle field is a toggle that determines whether to show the note's title when rendering the note. I use this for longer, multi-paragraph notes so (I think) things are easier to scan.

The "smallimage" field is fun. It's a Files field that lets me upload a small image to be floated at the right of the note's text. I don't know why, but I really like this. The trick here is that I don't want to upload the same image multiple times, so I created an area on the site.yml blueprint that allows me to upload them to a central location, then I can just pick one when adding a note.

Here's the blueprint section:

# site.yml section
smallimages:
  label: Small Images
  type: files
  uploads:
  template: smallimage
  parent: page('small-images')

And here's that section on the Site Panel page:

Here's what the Note page in the panel looks like:

All that remained was to render all this in the Journal template.

<ul class="note">
  <?php foreach($page->children() as $note): ?>
  <li>
    <?php snippet('note-list', ['note' => $note]) ?>
  </li>
  <?php endforeach ?>
</ul>

This has been an over-simplified account of the process, but hopefully you get the gist. It took me the better part of a day to get this in place, but most of that time was me fumbling around because I'm new to Kirby. Overall, it was easy and working with Kirby is darn pleasant.

I'm sure I'll tweak this incessantly as I learn more, but so far I'm happy with what I was able to put together in short order.

Permalink #

What a blog should be?

There have been a flurry of recent posts around what one should write about or post on a personal blog. "What should a blog be?"

Robin, for example, writes "I am a poem I am not software":

Either way, the more boring personal websites I see the more I want to skip the boring corporate handshake at the beginning. Because you’re more than a list of accomplishments, more than a career, more than a Wordpress template, or SQL query, more than one subject for a narrow audience.

Same.

Thing is, I almost never worry about what goes here. It's just a stupid website. Who cares?

I'm currently looking for work, so I probably should keep things tidy and professional and LinkedIn-ey and talk about how "Super Excited I am for this new journey" (🤮), but I'm not going to do that. If a potential employer reads my blog, they'll either click with it or they won't. I hope they do hire me, but if they don't, it probably wasn't going to be a good fit anyway.

So yeah, I'm a poem.

Permalink #

Why I still use TheBrain

TheBrain might be the original "second brain". I mean, it's right there in the name. I started using it when it was still named "PersonalBrain", sometime before 2011.

At some point around the time Roam Research released Roam, I stopped using TheBrain, mostly because I didn't enjoy writing notes in it and adding new thoughts felt cumbersome compared to Roam. Roam was an outliner and made quick work of adding and linking notes. This was also a heyday of Notion, Obsidian, Craft, etc. TheBrain seemed a bit dated, so I moved on for a while. Of course throughout all this, I was living in Org-mode as well.

But here's what happens: I need to look up some old note or file, and when I launch TheBrain and search, if it's in there, I find what I'm looking for immediately. Not only that, but I get a good sense of context and can jump to nearby "thoughts" quickly and continue digging until I have what I need. Every time this happens, I dive back into using TheBrain. Eventually, I get distracted by newer, shinier tools, but TheBrain never goes away completely. I made the mistake of "starting over" with an empty brain at some point in early 2016, so I lost everything before then. I won't make that mistake again.

So why do I always come back to using TheBrain?

It handles everything: notes, links, backlinks, files, everything. File attachments are important to me, and TheBrain handles them well. As opposed to the janky way things like Obsidian deal with files.

I always find what I'm looking for and can get a sense for context right away. Isn't this what taking notes is for?

There are no limits to how much I put into it. I never need to worry about things getting too large or becoming too slow. See Jerry's Brain as an example with 500,000 thoughts.

Each thought is just a folder on my Mac. Notes and attachments live on the filesystem. They're buried in UUID-named folders, but I can still find stuff outside of TheBrain. One thing I've done is to index the entire brain hierarchy in DEVONthink. I don't fear lock-in.

It's Markdown. The notes editor in TheBrain is a nicely-implemented WYSIWYG editor for Markdown. The actual note is just a Notes.md file in the thought's folder. I can edit it using BBEdit or Emacs if I want.

The Notes editor is pretty good. For a long time, adding notes in TheBrain was...unpleasant. Recent releases have turned this completely around.

There's a web and iOS versions. My brain is synced and available via both a web client and iOS apps. I don't need to worry about getting at my notes when I'm not sitting at a computer.

Are there drawbacks? Sure. Getting things into TheBrain takes some work. There is the BrainBox extension, but it's not great. (I understand they're working on a new one, though). Otherwise, getting things in is drag-and-drop or nothing. Some form of global quick-capture features would be nice. Perhaps with the newly-released API, someone will make one. And I need to put everything somewhere. I mean, that's kind of the point, but still. Another thing is that TheBrain is expensive and requires a subscription. I pay $159/year for the Pro edition and sync services. (That's actually cheaper than Obsidian with Sync and Publish subscriptions, but still.)

I'm a "notes first" person. I prefer to work with notes over files. But, I also manage a lot of files. TheBrain makes doing both of these things easy. It connects everything to everything. Some thoughts are nothing more than holders for other types of documents. For example, I have thoughts that are just a Tinderbox document. Others contain Org-mode files. Others contain links to Google docs. Thing is, TheBrain connects all of these things. It's powerful stuff.

Permalink #

Philosophy of Tiddlers

My wiki, a single TiddlyWiki file, currently contains 3,594 tiddlers. I look up something in it at least once every day. The following offers a glimpse into why:

The purpose of recording and organising information is so that it can be used again. The value of recorded information is directly proportional to the ease with which it can be re-used.

Philosophy of Tiddlers

This morning I wanted to make a note about my Kobo eReader. I didn’t yet have a Denote note about it so I started a new one in Emacs and started typing. It occurred to me that maybe I’d already written about it. Of course I had. This happens a lot.

My dilemma is that I very much prefer writing and managing notes in Emacs, but to actually find, read, and reuse them, TiddlyWiki works better for me most of the time. (I once tried running TiddlyWiki via Node.js and editing individual tiddler files in Emacs, but that was awkward and ended up not worth the extra effort.)

Longevity is critical when it comes to my notes, so what about the future-proofness of plain text? TiddlyWiki is nothing more than a fancy, self-contained HTML document. One could argue, I suppose, that HTML is plain text, but that’s a stretch. One could also argue that Org-mode documents aren’t really just plain text either. Not if you’re doing anything remotely clever. They’re just easier to read when viewed as plain text than HTML[1].

It’s been surprising and confusing to me that I so often prefer making a quick note, linking it, finding and reading it later in TiddlyWiki than in Emacs. All of my notes are in one HTML document that I can simply double click, browse, and search right there in my web browser.

It’s the "ease with which it can be re-used" part that keeps me coming back to TiddlyWiki.


  1. This may also be a bit of a stretch ↩︎

Permalink #