Let's try using ox-hugo again

Last year, while looking for ways to create a blog using Org-mode, I ran across ox-hugo. It was clever, but I was uncomfortable with yet another layer of abstration between the source text and the rendered HTML. I may have gotten over that fear.

I’m slowly standardizing on using org-mode files for all of my writing. I’ll hate myself for this if I ever decide to stop using Emacs, but I’ll deal with that then.

Hugo has org-support built-in, but it only supports a subset of org-mode’s features. For example, URLs or org-formatted links in footnotes are not rendered as links in the final HTML files.

Ox-hugo works via the standard org-mode export dispatcher. The result is rendered as a normal Hugo Markdown file. This means that if I decide to stop using Org-mode for blog posts, or even move to another markdown-based site builder, all of my posts are still there and usable as-is.

Another nice feature is that all of my posts are in a single org-mode file, one subtree per post. I like this because I don’t have to create a properly-formatted markdown file in a specific folder in order to create a post. I just set the EXPORT_FILE_NAME property and ox-hugo takes in from there.

Of course I’m using a handy capture template, as provided by the ox-hugo docs. This lets me type C-c c h to quickly create a new draft post.

(with-eval-after-load 'org-capture
  (defun org-hugo-new-subtree-post-capture-template ()
    "Returns `org-capture' template string for new Hugo post.
See `org-capture-templates' for more information."
    (let* ((title (read-from-minibuffer "Post Title: ")) ;Prompt to enter the post title
           (fname (org-hugo-slug title)))
      (mapconcat #'identity
                   ,(concat "* TODO " title)
                   ,(concat ":EXPORT_FILE_NAME: " fname)
                   "%?\n")          ;Place the cursor here finally

  (add-to-list 'org-capture-templates
               '("h"                ;`org-capture' binding + h
                 "Hugo post"
                 ;; It is assumed that below file is present in `org-directory'
                 ;; and that it has a "Blog Ideas" heading. It can even be a
                 ;; symlink pointing to the actual location of all-posts.org!
                 (file+olp "all-posts.org" "Blog Ideas")
                 (function org-hugo-new-subtree-post-capture-template))))


All subtrees marked as TODO are considered to be drafts. Toggling the status to DONE sets “draft = false” and also sets the publish date to the current time.

Tags are set just like normal org headings (e.g. “tag1:tag2”).

Being able to directly publish to my Hugo-based blog while still living in an Org-mode is pretty sweet.



I’ve been testing Syncthing as a replacement for Dropbox and so far it’s been great.

I am currently syncing over 25,000 files in 5 directories across two Macs and one Linux machine. It has worked nearly without a hitch. I say “nearly” because after changing the case of a few filenames those now show as “out of sync”. They synced fine but show as unsynced. I assume this is due to case-sensitive vs case-insensitive file systems. I’ll need to figure this out but it’s more an inconvenience than a problem1.

I’m still using Dropbox for things I’m sharing with others, and probably always will, but for things I don’t want anywhere near a “cloud”, Syncthing seems like a perfectly fine solution.

  1. The case-insensitive rename issue is known and tricky to solve. [return]

Publish Using Org Mode With Hugo

I write nearly everything except blog posts using Org-mode. Wouldn't it be nice to write blog posts with Org-mode, too? It would.

I was perusing the README for Easy Hugo and I'll be darned if it doesn't support using .org files automatically. All I need to do is use .org for the filename when creating a new post. Very nice.

Back to Netlify

baty.net is back to being built and deployed using Netlify. I moved everything to Amazon S3 a couple of months ago as a way to figure out how to do that. I still think S3 is a great way to host static sites that don’t change often, but I haven’t liked it quite as much for hosting a site that is updated frequently, like my blog.

Using S3 required a combination of sync scripts, invalidations, keys, cloudfront distribution configuration, etc. Overall it felt like more trouble than it was worth.

So, back to Netlify. It goes something like this:

  1. Create a “site” in Netlify
  2. Point it at a Github repo
  3. Update DNS

Now I have continuous deployment, automatic SSL, a global CDN, and a bunch of other stuff I don’t even use yet. For free.

Tracking my Time with Org-mode

Org-mode has time tracking built in. Of course it does.

I have been trying to consistently track my time spent on projects. This encourages me to decide what I should do next. It also makes me reconsider my priorities when I notice I’m not doing anything useful. As I tend to do, I have configured a few Capture Templates to help with this.

'(("t" "Todo to Inbox" entry
   (file+headline "~/org/tasks.org" "Inbox")
   "* TODO %? \n %i\n")
  ("T" "Todo and Clock In" entry
   (file+headline "~/org/tasks.org" "Inbox")
   "* TODO %? \n %i\n" :clock-in t :clock-keep t)
  ("e" "Create Event" entry
   (file+datetree+prompt "~/org/events.org")
   "* %?\n%T" :empty-lines 0)
  ("E" "Create Event and Clock In" entry
   (file+datetree+prompt "~/org/events.org")
   "* %?\n%T" :clock-in t :clock-keep t)

I have two versions of my TODO and EVENT capture templates. Using the uppercase versions cause the clock to start as soon as I create the entry. For example, if the phone rings or someone walks into my office, I hit C-c c E and a new “Event” entry will be created with the clock already running.

To help easily manage jumping between clocked entries, I’m using org-mru-clock.

When it’s time to send some invoices, or just to see how long things are taking, I can run a quick Clock Report that looks something like this:

Clock Report


It’s hard for me to remember to always start a clock, so I’m still looking for ways to make that easier. For now though, just building the habit is a good start.

Logging Food With Org-mode

For some reason I enjoy recording what and where I eat. Usually I do this in a paper notebook, but I decided try it using Org-mode files instead.

To make entry as easy as possible, I created a new capture template.

("F" "Food Log" entry
        (file+datetree+prompt "~/org/food.org")
                "* %?\n%t\n%^{Meal}p%^{Type}p")

Now, I can type C-c c F to bring up the capture template and quickly fill in details about a meal. This is then saved automatically in my ~/org/food.org file and put in the proper location, organized by date. It looks like this so far…

Food log

The %^{Meal}p and %^{Type}p parts of the capture template are for setting “Properties”. In this case I am asked to enter the Meal and Type properties. Properties allow Org-mode to act like a rudimentary database. Switching to Column view shows a table of the values for each property, like this:

Column view

I’m including an active timestamp with each entry (using %t in the template) so that they will be included in Org’s Agenda for that day.

There’s no real need to log my meals, but Org-mode makes it quick and painless so why not?

My Photos are a Disorganized Mess

I've made a huge mistake

My photos have become a disorganized mess. For years I’ve known where all of my photos were. I kept them in dated folders, period. Sometimes the specifics of how I organized things changed, but I could always count on any given photo being in something like ~/Photos/2018/04-April-2018/ThisIsANicePhoto.jpg.

Then the iPhone and Apple Photos came along. Initially, nothing changed. I would plug my phone into the computer, copy the photos from it, delete them from the phone, and move them to the proper folder, where they belonged. Go ahead, narrow your eyes at me, but it was a great, predictable system and it meant that every photo ended up in the same place. Be it film or digital, taken with the iPhone or some other camera, a photo went into a folder forever.

At some point I decided not to do it that way. I tired of moving images off the phone and dealing with them. I decided to use Apple Photos to store my iPhone photos. Zero friction, right? I’d continue to manage non-iPhone photos as I always had, then just copy the keepers into Photos so I had a “complete” library.

As you can imagine, I now have two libraries, and neither of them is complete.

This was a huge mistake.

To fix this, I’m going to have to essentially merge two similar-but-not-the-same libraries. What do you think the odds are of me not losing anything or ending up with tons of duplicates? That’s right, the odds are zero.

Don’t ever let me try anything like that again.

Using Karl Voit's File Naming System

I name most of my files with an ISO formatted date and then some descriptive text. For example…

2018-05-06 This is a File.txt

A couple years ago I ran into Karl Voit’s article about Managing Digital Files. I originally wrote it off as a bit over the top and I didn’t give it another thought. Then today I decided to go all in with it.

You can read his entire article if you like, but the gist of it is that he names files using a pattern like this:

2018-05-06 This is some file -- tag1 tag2.jpg
|_date___| |_description___||___tags_____|

It’s a little verbose but that hasn’t gotten in the way. The trick of the whole thing is to use his suite of tools to help manage things.

  • date2name for prepending the file’s creation date
  • appendfilename for adding to the filename without disturbing the date or tags
  • move2archive for moving the files to a dated folder hierarchy
  • filetags for managing tags and creating a tag hierarchy

Seems like a lot of fuss, but the goal is to have a future-proof collection of well-organized files with no chance of lock-in or abandonment. This is one way of achieving that. Voit’s tools aren’t necessary, just helpful. If they went away nothing would be lost. The whole thing lines up nicely with my preference for keeping files in organized, date-based folders.

I often use the Ranger file browser and so I added a few key mappings to make managing filetags, etc. easier. Here’s part of my Ranger config file:

map Fm shell m2a %s
map Ft shell filetags %s
map Fn shell date2name %s
map Fa shell appendfilename %s

I mark one or more files in Ranger and hit “F” then one of m, t, n, or a to move, tag, add the date, or rename them.

A nice side effect of this is that all files named using YYYY-MM-DD… are swept up by my Memacs scripts. This causes any file or photo in the archive to show up in my Org-mode agenda on the day it was created.


That’s a nice bonus. The Memacs thing is going to have to be a whole other post.

Managing Dotfiles With GNU Stow

Every so often I reconfigure the way I manage my dotfiles. There are all sorts of tools out there for this.

You get the idea. I never got along with any of them for one reason or another.

I’m now trying GNU Stow. Stow isn’t made specifically for managing dotfiles but it does the job pretty easily. I like it because I can easily organize things and install/update them as needed. To do this I group related dotfiles into folders in ~/.dotfiles. Like this…

Dotfile tree

Each directory contains the folders full of dotfiles organized the way I want them to be symlinked in $HOME. For example, I can have Stow create and symlink dotfiles for Vim by typing stow vim. This creates symlinks for both the .vimrc file and the .vim directory. I like grouping things by app, but I could also group by environment or machine if I wanted.

I like this because it makes sense to me and there’s not too much magic involved. Stow can be installed on macOS using Homebrew.

brew install stow

Here are a few articles that helped me get started.


IBM Watson Analyzes My Twitter

IBM Watson analyzed my Twitter account and came up with this:

You are skeptical, inner-directed and unconventional.

You are reserved: you are a private person and don’t let many people in. You are independent: you have a strong desire to have time to yourself. And you are self-conscious: you are sensitive about what others might be thinking about you.

You are motivated to seek out experiences that provide a strong feeling of discovery.

You are relatively unconcerned with both tradition and taking pleasure in life. You care more about making your own path than following what others have done. And you prefer activities with a purpose greater than just personal enjoyment.

Try it

SmugMug buys Flickr and hope is restored to the internet

Me, writing about Flickr in 2004:

So far, Flickr rocks. It’s still officially in beta, and things change/improve almost daily. The site is a great combination of easy to use and geek-friendly. The developers are focused on all the right things. There seems to be a core set of ideals that touch on things like standards-compliance, ease of use, extensibility, accessibility and other goodies.

And again, a few months later:

The community features are a great byproduct of the site’s main goal, photo sharing. And they don’t get in your way if you don’t care.

The APIs and RSS everywhere. I’m writing a gallery and can think of a half-dozen cool things to do with it. Flickr is a platform. That fact alone will give them the edge. I bet we’ll see a cottage industry spring up of folks creating Flickr-based apps

I’ve been a Flickr user since Caterina Fake still had time to comment on my photos.

In a perfect world, Instagram would not exist. Flickr would still be the go-to place for posting, organizing, and talking about photos. Flickr is better than Instagram at everything around photo sharing. Everything except the active user counts, I guess.

Yahoo botched such a great opportunity, it’s maddening.

But, here we’ve been for nearly a decade. Last year, Maciej Cegłowski had a great thought about Flickr:

If you could have Flickr back the way it used to be and run competently, everybody would be on there right now. I think it would be wonderful if the old Flickr crew could get the site back and run it the way they wanted to.

My comment then was “Seeing Flickr back in caring, competent hands would be the ideal outcome.”

And out of seemingly nowhere, SmugMug comes along and buys Flickr1. I’ve been a SmugMug user for nearly as long as I’ve used Flickr. They’ve always struck me as a company that cared about the user first, profit second. This is why the announcement yesterday has me so giddy. SmugMug seems like our best chance at the “caring, competent hands” I’d been hoping for. I believe Don MacAskill to be smart, patient, and a photographer at heart.

I dare not guess where the SmugMug purchase of Flickr will lead, but I’m unreasonably happy about it. Hopeful, even.

  1. I’d link to the SmugMug announcement page but it’s a horrible, overwrought, janky mess of a page. This is the only discouraging thing about the whole thing so far. [return]

In Praise of the News on Paper - WSJ

Barton Swaim, WSJ:

The newspaper brings a kind of epistemological definition to the everyday work of being literate. You can hold the day’s knowledge with two ink-stained hands, and when you’re done with it, you can throw it away. It won’t update and demand to be read in a few hours, and it won’t follow you around on your smartphone.

I’m convinced that reading the news “in the paper” is the best way to stay informed without losing one’s mind or dying of anxiety in the process. It feels great to be done with the news for the day.

The Roon Music Player is Awesome

My local music library as shown by Roon

After a recent two-day internet outage I started looking for something better than iTunes for managing and playing my local music library. Streaming music doesn’t work very well without internet access, and iTunes doesn’t work very well for anything.

First, I tried Audirvana. Audirvana is “The Audiophile Music Player for Mac” and is aptly named. I don’t have an audiophile’s ears, but even I could tell the difference in sound between it and iTunes. As an app, though, it’s pretty basic. Functional, not fancy.

While poking around I learned about another app called Roon. Roon is “The music player for music lovers” and is also aptly named. Very aptly named.

Roon is my new favorite thing. It’s been surfacing music from my library in a way that I’ve never experienced. I find the experience of browsing music with Roon far better than that of either Spotify or iTunes/Apple Music. It makes finding something to listen to a fun thing to do rather than a chore.

Roon’s “Core” component basically just sits there and deals with your audio files, whether they’re on a NAS, Mac, external drives, wherever. It’s the brains of the system. Then you install the “Controller” on all your devices. The iOS/iPad controller app is very nice. From each device, you can choose to stream to one or more “Outputs” (“Outputs are devices that make noise.”) You can read more about Roon’s Architecture. Currently I’m running both Core and Controller on my iMac but I may get fancy and spin off Core onto a Synology or some other headless device.

Roon sees all of my Sonos devices and both of my HomePods (via Airplay). No configuration or setup process was necessary.

Roon device list

You can see in the screenshot that I have both HomePods linked. No need to wait for Apple to enable this with Airplay2.

The elephant in the room here is that I recently purchased two HomePods. I love how they sound, but I almost never use the “smart” features. I’m finding that I prefer to choose music visually, so asking Siri to play music is just not something I take advantage of. This is fine, since Siri isn’t great at it anyway. It’s possible I should have just stuck with just my Sonos speakers. Time will tell.

For access to more than just a local music library, Roon works seamlessly with the Tidal service. Tidal offers both “Premium” and “HiFi” subscriptions. The Premium subscription ($9.99/month) uses “standard sound quality” which is basically the equivalent of Spotify. There’s also the HiFi option, which streams Lossless FLAC files. While FLAC does sound a little better, to my ears it’s not yet worth the increase in price ($19.99/month) or bandwidth.

It was a no-brainer to replace my Apple Music subscription with one for Tidal.

A subscription to Roon costs $119/year, putting the combination of Roon and Tidal at just shy of $20/month. I am still in the free trial periods, but I expect to subscribe to both. I may even opt for the lifetime subscription to roon for $499. That sounds like a lot of money, but if I think of it as just another audio component of my system it doesn’t seem expensive at all, comparatively.

The combination of Roon and Tidal is a fantastic way to manage, discover, and listen to music.

Getting the GTD Band Back Together

My doc

This will come as no surprise to anyone who knows me, but I’m stepping away from my text-only, Org-mode/Emacs/Filesystem based setup.


Why did I do this? Honestly, it might be that I just get bored. Changing up my systems is my version of playing video games…it wastes a lot of time but it’s just so much fun. The same thing happend last year. It happens most years. I’m used to it.

I have been trying to reduce the number of apps I use. To this end, I’d gone all-in with Emacs and Org-mode for writing, GTD, publishing, coding, and email. For file management, I’ve tried weaning myself from DEVONthink and just keeping things in folders and using Finder to deal with them and Spotlight to find things.

It’s actually worked quite well, but I must admit that it is more “cool” than it is “easy”. By that I mean that I can do some nifty and clever things with email and tasks and text in Emacs. I’m attracted to nifty and clever. The problem is that doing those clever things takes me hours of searching and trial-and-error and documenting the steps because none of it is easily discoverable. This also makes things fragile.

I also fall into the “But only text is future proof!” trap, forgetting that most of the things that I would like preserved “forever” are already text-based enough. The rest is raw material for things that end up in future-safe formats anyway.

So here I am, back with the old gang of reliable, wonderful apps that I’ve used on and off for many years.

Mailmate for email, Things for tasks, DEVONthink for document management, Tinderbox for notes, The Brain for linking everything together.

I’ll let you know when I change my mind again.

Update 2018-06-09: I changed my mind again. I still cannot find a good way to get long without org-mode.

The Happy Hacking Keyboard Professional 2


I don’t want to write a review of the Happy Hacking Keyboard Professional 2 but I do want to mention that I love it. I’ve been using it for a week, which means I’ve gotten past most of the getting-used-to-it process. Before getting the HHKB I had no idea what Topre switches were, but they’re awesome.

I’m not a keyboard expert, but I am fussy about how a keyboard feels. I prefer mechanical keyboards1. I used an Apple Extended Keyboard II for years but it’s huge and clumsy and I was looking for something smaller. Also, the physical Caps Lock button on the AEKII made it impossible to use Caps Lock as a Control key.

I used the first version of Das Keyboard liked it very much. It eventually failed and I started using the Apple Magic keyboard instead in an attempt to make my desktop experience closer to the iPad keyboard. The Apple keyboard is fine, but I wanted to go back to something mechanical, something better.

The HHKB though, wow. It’s way better. It feels nearly perfect to me. I haven’t measured, but it feels as though I’m very fast and accurate with it. I like the feel of the keys so much that I wouldn’t care even if I wasn’t fast and accurate.

I opted for the white version because I was worried that the dark grey one, as cool as it looks, would be hard to read. I’m not cool enough to have a keyboard I can’t read.

I’m still getting used to having the tilde key at the top right rather than top left. And the Delete (or Backspace, depending on the configuration) key is almost-but-not-quite close enough to reach with my right pinky. I’m trying to train myself to use the pinky because that would mean even less arm movement, but it’s slow going.

The hardest thing to get used to is that the arrow keys are on the function layer. Not having dedicated arrow keys is challenging. The idea is that I can easily reach the function key with my right pinky, then use the first two fingers to manipulate the arrow keys. It’s a fine idea, but it’s not coming naturally to me yet. Whenever I need to use an arrow key, I have to stop, look at my hands, and reposition them carefully. I’ll get it, but it may take a while before it’s comfortable.

The only complaint I have is that the thing slips around on the desk too easily. There are rubber feet on the front side of the bottom but they aren’t sticky enough. I stuck a couple of thin plastic feet on the rear of the bottom and that’s solved the problem.

I was a little worried about spending so much money on a keyboard that I had never tried, but the HHKB exceeded my expectations. I love typing on this thing.

  1. There’s some debate about whether the HHKB is truly a “mechanical” keyboard, as it uses rubber dome switches, but whatever. Close enough. [return]

Headlines making you anxious? Delay reading them - Oliver Burkeman

Oliver Burkeman, The Guardian:

Of the 45 troubling things you saw on Twitter this morning, two or three may prove to be signs of the rise of fascism/the destruction of the environment/the collapse of Brexit Britain. Yet the rest won’t. Once, it was the media’s job to sift stories of lasting significance from the rest; today, any publication that sat on a story for a week, to see if it had legs, would get screamed at for suppressing the truth. The passage of time is the best filter for determining what matters. But being late is the one thing no social network, or modern news organisation, can afford.

Since canceling Facebook, pruning Twitter followers, disabling retweets, and limiting my news intake to The Economist and NYT (print edition), my headline anxiety has dropped to nearly zero.

Baron Schwartz's Twitter Strategy

Baron Schwartz:

Why go to all this trouble myself, instead of letting Twitter’s algorithms do it for me? Isn’t that what Big Data and Machine Learning is for? Ostensibly, yes, but as we’ve seen, absolutely no. There’s a deeper point here: I either take responsibility for my own consumption and learning, or I abdicate it to machines. And I believe that abdication to machines is amongst the most pressing dangers facing our society today.

Curating our own feeds has become a means of survival. I use a similar strategy as Schwartz, except mine also includes disabling all retweets.

A Weekend Back With the iPhone SE

iPhone X and iPhone SE

I spent the weekend with my old iPhone SE and I’ve decided I like it better than the iPhone X.

The iPhone X is a beautiful device. Smooth, sleek, powerful, and the screen is just gorgeous. The iPhone SE, by comparison, is tiny, slow, and practically blurry.

However, the iPhone SE is also easier to carry, easier to hold, and easier to use.

Face ID is clever and it works pretty well, but sometimes having to either pick up or lean over the phone to read notifications is less than ideal. And frequently when I pick it up to read notifications it just opens up to the home screen instead. Haven’t figured out why yet, but I don’t enjoy it. Face ID can be super convenient but I’m not convinced it’s always better than Touch ID.

I don’t like putting cases on things. The iPhone X feels so nice that putting a case on it takes away one of the great things about it. Feeling nice isn’t the same as being easy to hold, and using a $1,000+ bar of soap without a case is just asking for trouble. The SE, on the other hand, is much easier to hold. Also, it’s not nearly as precious so even if I do drop it I’m not out that much.

I find the iPhone SE easier to use than the iPhone X. I’m still not used to the contortions required to unlock or swich apps on the X. I must have small hands because getting to the the control panel one-handed on the X is an exercise fraught with peril. Holding the phone securely and actually using it can feel like mutually exclusive activities.

Here’s something I can’t explain; I type much faster and more accurately on the SE. I can’t seem to type three words in a row correctly on the X.

Oh, and the SE has a real headphone jack. I hate not having a standard headphone jack on my phone.

There are of course downsides to the SE.

The camera on the SE is not as good as the one on the X. Especially the front-facing camera. Selfies look terrible in anything but broad daylight.

The SE’s screen is small. This obviously can be less useful than the big, bright iPhone X screen. Thing is, I don’t use my phone for doing much. I don’t read anything longer than tweets or short blog posts. I avoid writing on it as much as possible. I certainly never use it for watching movies. I do miss the larger screen of the X while using Maps, and I really miss it for viewing photos.

The SE is definitely slower, but not by as much as you’d think.

All in all, I was surprised by how much I enjoyed using the iPhone SE again over the past couple of days. It’s still the perfect form factor for me. If Apple introduces the rumoured SE 2 with upgraded internals and camera, I’ll have a decision to make.

Facebook Is Why We Need a Digital Protection Agency - Paul Ford, Bloomberg

Paul Ford, Bloomberg:

I know that when you think of a Superfund site, you think of bad things, like piles of dead wildlife or stretches of fenced-off, chemical-infused land or hospital wings filled with poisoned families. No one thinks about all the great chemicals that get produced, or the amazing consumer products we all enjoy. Nobody sets out to destroy the environment; they just want to make synthetic fibers or produce industrial chemicals. The same goes for our giant tech platforms. Facebook never expected to be an engine that destroys America. Lots of nice people work there. Twitter didn’t expect to become the megaphone of despots and white nationalists. But the simple principles of “more communication is better” and “let’s build community” and “we take your privacy seriously” didn’t stand a chance under the pressure of hypergrowth and unbelievable wealth creation.

Paul is about as level-headed as they come, and he understands that the problems we’re facing weren’t necessarily premeditated by a bunch of evildoers. But here we are, and we can’t rely on the same people and policies that got us here to fix anything. Maybe it will take something like a “Digital Protection Agency”.