Spacious-Padding Emacs package

Protesilaos Stavrou updated his spacious-padding package. I’d ignored this earlier but installed it today and it’s a nice, subtle, quality-of-life improvement to Emacs.

It increases the padding or spacing of frames and windows on demand.

The idea with this package is to provide the means to easily toggle between terse and spacious views, depending on the user’s needs.

Protesilaos Stavrou

Here’s a before and after from my config (running the ef-dark theme, also from Prot)

Before enabling spacious-padding-mode
After enabling spacious-padding-mode
Permalink #

When a minor annoyance sparks an unreasonable change

This morning, I had trouble finding something that I was certain I'd written yesterday. I was pretty sure I'd written it in one org-mode file or another, but it seemed to be missing. Turns out it wasn't missing. I just couldn't see it because of the way the results show up when searching for something in Emacs. The display of search results when running projectile-ripgrep is pretty awful, and I missed what I was searching for. Here's what it looks like in Doom Emacs by default.

I don't know about you, but I find that difficult to scan. Here's the same search (although with different content) in Obsidian's "Omnisearch":

If I'd written my note using Obsidian, I'm convinced I would have found it straight away[1]. This bugged me so much that I fired up Obsidian and thought, "There, I'll just put my notes in Obsidian. Problem solved!"

Except you know what came next. I don't enjoy using Obsidian. Emacs is better at nearly everything. Once again I'd overreacted to a minor annoyance and was going to burn it all down and start over. That's a silly thing that I do. I avoided it this time, thankfully.


  1. I understand that some people might feel the opposite. Not the case for me. ↩︎

Permalink #

Display list of org-attach'ed files in buffer property

I use org-attach a lot. There's no way to see which files are attached without calling "org-attach-open" or whatever. Apparently something changed in Org-mode years ago that removed the function that did what I want. Found the following on the mailing list...

(defun org-attach-save-file-list-to-property (dir)
    "Save list of attachments to ORG_ATTACH_FILES property."
    (when-let* ((files (org-attach-file-list dir)))
      (org-set-property "ORG_ATTACH_FILES" (mapconcat #'identity files ", "))))
  (add-hook 'org-attach-after-change-hook #'org-attach-save-file-list-to-property)

Works great.

Permalink #

App Defaults (2023 Edition)

C’mon, everyone’s doin’ it.

Here is my list of default apps (in alphabetical order by task):

  • Backups: Backblaze, Arq
  • Blogging: What day is it? I mean Kirby.
  • Calendar: BusyCal, Apple Calendar
  • Chat: Apple Messages, Signal
  • Clipboard Manager: Raycast
  • Code Editor: Emacs
  • File Manager: Forklift, Dired (Emacs)
  • Journaling: Org-journal (Emacs), Day One
  • Launcher: Raycast
  • Mail Client: Apple Mail, notmuch
  • Mail Server: Fastmail
  • Music: Roon, Qobuz, Apple Music
  • Notes: Org-mode (Emacs), TiddlyWiki, Tinderbox
  • Password Management: 1Password
  • Photo Editor: Capture One
  • Photo Management: Capture One, Apple Photos
  • Podcasts: I don’t listen to podcasts
  • RSS: NetNewsWire
  • Read It Later: Omnivore
  • Screenshots: Cleanshot X
  • Search Engine: Kagi
  • Shopping List: Apple Reminders shared with wife
  • Social Networking: Mastodon (web UI)
  • Terminal: iTerm, Kitty
  • Text Editor: Emacs, BBEdit
  • Task Manager: Things, Org-mode (Emacs)
  • Weather: Hello Weather
  • Web Browser: Arc
  • Word Processing: Emacs Org-mode -> LaTeX
Permalink #

Are we back on Hugo?

It's possible that no one will ever see this post. I'm writing a Hugo-formatted markdown file in Emacs. This means it will be published to a defunct copy of my blog[1]


  1. Unless of course I decide to bring it back as baty.net. If that happens, then 👋! ↩︎

Permalink #

Subscriptions

Update I'll keep this list updated here.

A few folks[1] have been posting about their current subscriptions. Here is a list of my subscriptions, in alphabetical order, because I didn’t want to try categorizing them.

  • 1Password: $5 – Apple’s password manager needs to improve a lot before I’ll consider replacing this
  • Adobe: $10 – I’m trying the Lightroom 1TB plan. Seeing if I can live with just Lightroom Desktop.
  • Amazon AWS: $2 – I don’t even know where this charge is coming from
  • Amazon Prime: $9 – Indispensable
  • Apple One: $37 – I really only want Music, TV+, and 2TB of iCloud storage but they make it impossible to cherry-pick
  • Capture One: $15 – Raw photo editing. I keep trying to replace this with Adobe but can’t
  • Day One: $2 – On-and-off journaling app for over a decade. I’m currently On again.
  • DigitalOcean: $15 – My VPS
  • Fastmail: $5 – Great email service
  • Flickr: $6 – It’s sad to see the world slowly stop using Flickr. I’ve got thousands of photos over nearly 20 years stored there. No way I can quit now.
  • Glass: $3 – Modern social photo sharing. Glass is really nice and it’s all about the photos (as opposed to, say, Instagram)
  • Hulu: $12 – I’m surprised by how much stuff I watch on Hulu
  • Max (HBO): $18 – This can probably go
  • Neatnik (omg.lol): $2 – My Mastodon account. Also a ton of other nice services.
  • Netflix: $17 – This may go soon, too.
  • NYTimes: $25 – Paper of record, whether we like it or not.
  • Photomator: $3 – The only way I can deal with editing iPhone photos
  • Photoscan: $4 – If I ever get around to scanning my grandfathers 24 photo albums, I’ll need this
  • Put.io: $10 – Such a handy service for managing torrents
  • Qobuz: $11 – Music. It works seamlessly with Roon so I kind of need it.
  • SetApp: $10 – Like Netflix for apps. I use a dozen of them nearly every day. Easily worth the $10/month.
  • Sourcehut: $2 – Now that I’m using my own Gitea instance again, this can probably go.
  • Spotify: $15 – My kids prefer this to Apple Music. I may put my foot down and make them switch.
  • The Atlantic: $6 – A favorite
  • Tinylitics: $5 – A new, nice, privacy-focused analytics platform.
  • YouTube Premium: $18 – Don’t tell Google, but not seeing ads on YouTube is worth double this to me.

For a total of $256 per month. That seems like a lot, but I have another list of canceled subscriptions totaling around $125 so I'm improving!


  1. Kev Quirk and Manu, for example ↩︎ ↩︎

Permalink #

Reason I love Org-mode No. 257, archiving TODOs

Just a quick appreciation of a common Org-mode feature.

By default, archiving a TODO in Org-mode moves it to another file:

"The default archive location is a file in the same directory as the current file, with the name derived by appending ‘_archive’ to the current file name."

Moving subtrees (The Org Manual)

I never gave this much thought and sort of assumed that it was just how things worked. Of course this is Emacs, so yeah, it can work however I want it to work.

I use TODOs in a couple of ways. First, I keep fleeting, repeating, and future TODOs in a single, giant "todo.org" file. TODOs here are normally not related to specific projects. When I'm done with them I want them out of the way, so I archive them using org-archive-subtree, which behaves as described above, by default. I also keep an "inbox.org" file for newly-captured TODOs and notes. This means I have two separate _archive files. I prefer to keep things together, so I started looking for a better way to handle things.

Of course there's a better way to handle things. It looks like this:

(setq org-archive-location "~/org/archive.org::datetree/")

Now, everything I archive goes into a single Org file, organized by date within an Org date tree[1], like so:

Screen shot showing an org-mode datetree

For projects, I create a separate Org file and I keep all TODOs related to the project within that file. It's nice and tidy this way. What's not as tidy is when I archive things in project files, by default I end up with a bunch of matching _archive files. Or, using the above configuration, they end up mixed in with everything else in "archive.org"

I want project TODOs to remain in the original project file, but I also want to archive old ones, so, instead of calling org-archive-subtree I use org-toggle-archive-tag. This adds an :archive: tag to the TODO, which prevents it from showing in my agenda and excludes it from exports and sparse trees, etc. This effectively removes it from my normal routine, but the TODO remains right there in the project file. Neat!

Much of this is obvious and well-known to Emacs users, but I wanted to call it out as something that makes using Org-mode so much fun.


  1. A date tree is an outline structure with years on the highest level, months or ISO weeks as sublevels and then dates on the lowest level. I love date trees so much. ↩︎

Permalink #

Gitea

Why would anyone host their own Git repos when Github exists? Fair question!

For me, it's mostly because Github has become too much like a social network. It feels like LinkedIn for nerds.

I moved most of my repos to Sourcehut last year. Sourcehut has that fun, Craigslist sort of retro simplicity that I like. On the other hand, it's just kind of weird. I have a hard time finding my way around. I don't really understand the Projects hierarchy. I love the built-in mailing lists, but otherwise it's mostly too difficult for me.

A few years ago I moved my stuff to a self-hosted Gitea instance. Gitea is nice. It's familiarly Github-esque. It's fast, and it's a single Go binary. You know how much I love self-contained software.

Gitea and I drifted apart when I went through a "let someone else deal with hosting" phase. I'm less inclined to want to geek out with hosting still today, but between the ultra-nerdiness of Sourcehut and the increasingly showoffy nature of Github, I thought it might be time to revisit running my own repo server.

Installing Gitea was a breeze. I followed their own instructions to the letter and was up and running in less than 30 minutes. Here's a quick summary (I'm basically paraphrasing the installation guide):

Download latest (Ubuntu) and make executable:

wget -O gitea https://dl.gitea.com/gitea/1.20.5/gitea-1.20.5-linux-amd64
chmod +x gitea

I already had a git user on the server, but if not, I would run this:

# On Ubuntu/Debian:
adduser \
   --system \
   --shell /bin/bash \
   --gecos 'Git Version Control' \
   --group \
   --disabled-password \
   --home /home/git \
   git

Then this:

mkdir -p /var/lib/gitea/{custom,data,log}
chown -R git:git /var/lib/gitea/
chmod -R 750 /var/lib/gitea/
mkdir /etc/gitea
chown root:git /etc/gitea
chmod 770 /etc/gitea

(I reset the permissions after installation)

Then I set it up as a service using their instructions and sample service file

By default, Gitea runs on port 3000. I wanted to run it on the standard web port so I needed to configure Caddy as reverse proxy, which is as simple as adding this to my Caddyfile:

git.baty.net {
        reverse_proxy localhost:3000
}

There are no default users configured, so I added myself as an admin via the Gitea CLI.

gitea admin user create --username  myuser \
                        --admin \
                        --password mysuperlongpassword \
                        --email jack@baty.net \
                         -c /etc/gitea/app.ini

That was it. By the way, every self-hosted app should use SQLite by default. It's so great and simple.

This feels good. As long as things don't get weird on me, I'll try and stick with it for a while. One odd thing is that almost all of my repos are private, so I have no real need for a hosted git service. But I feel better having somewhere "out there" to commit changes to, and Gitea works well for that.

Permalink #

I'm doomed...again

Doom Emacs

Emacs is less than friendly out of the box, so we customize things to suit our own personal tastes and preferences. When starting out, some people even enjoy that part. It's one of the best things about Emacs, but I hated it. I just wanted to do stuff, ya know?

I muddled through (this was in 2011), but eventually I tired of having to figure everything out on my own, so I tried a few "starter kits". That was much better! I could piggyback on someone who knew a lot more than me, then edit to suit. A few people scolded me for "cheating", but ¯_(ツ)_/¯.

Long story short, I went through a few of these kits before landing on Spacemacs. As a long-time Vim user, using Spacemacs was awesome. But man, that weird configuration scared me. Along came Doom Emacs, which claimed to prioritize speed and I found that to be true. Doom's configuration was much more reasonable, I thought, so I switched to Doom.

Since then, I've gotten the bug to roll my own config again, so I did that. Three or four times I did that. After many (many!) hours, I would eventually just end up with a shitty version of Doom anyway.

My most recent attempt at building my own config was actually pretty good. It was fast, simple, and reasonable. At first, anyway. Then I'd realize that I missed something so I'd add it. Then I'd add more things. Just a little tweak, is all! Eventually, my startup times were getting longer and things would break that I'd forgotten how I'd made work in the first place.

I get lazy and don't always feel like fixing things or figuring everything out on my own, so yesterday I ditched the whole thing and installed Doom from scratch. I copied over the best parts of my custom config and off I went. Doom is nicer than mine was. It's probably nice than mine would ever be, so why do I keep trying to do it myself?

Permalink #

Other People's Enthusiasm

I get caught up in other people's enthusiasm. It's often fair to describe my entire personality as an amalgam of the blog posts I read that morning.

When someone writes enthusiastically about something, I want to try that thing. It could be software, a camera, a process, or a habit. I tell myself that it's not FOMO, but rather curiosity and a desire to explore new things.

To some extent, this is healthy. Learning about and experiencing new things is fun and useful. To a point. Too much, and it becomes a distraction and counterproductive. I'd say I'm about two decades into the counterproductive-ness of it all.

I feel like I would have been better off had I picked a few things years ago and stuck with them.

Permalink #

My shaving kit - something I've stuck with

People make fun of me for frequently changing the way I do things. This is not undeserved. I like to try things. That's me ¯_(ツ)_/¯.

But as a counterpoint, sometimes I stick with things for a long time. Today's example is shaving. I was so annoyed by the price of disposable blades for my razor that I started shopping for alternatives.

What I found was safety razors, nice shaving cream, and a brush. I use a Merkur safety razor, Vulfix brush (Warning[1]), Taylor of Old Bond Street Almond shaving cream, and Shark double edge razor blades. I've been using this exact setup since 2005.

It costs a little extra up front, but everything after that is better, including costs. And no overpriced, plasticy blades. The last time I bought blades was in 2018 and I paid $8.00 for 100 blades. I have many left. It costs much less than $1.00/month for blades. And a jar of shaving cream lasts for many months.

Aside from saving money, using the kit simply feels better. I don't anticipate any of this changing, which is a nice...er...change of pace for me.


  1. Note that brushes using badger fur are made from, well, real badgers. Those badgers are sometimes badly mistreated. I didn't know that at the time I bought mine. Today, I would recommend a synthetic brush instead. ↩︎

Permalink #

Considering film (only)

I ❤️ film

Whenever I review my recent photos, I am reminded that I prefer film. Film is fun, if sometimes frustrating, to shoot. Film cameras are cooler. And I love the results.

This morning I was tinkering with film emulation styles in Capture One, to see if I could get something close to HP5. The presets are pretty good, but even if they completely nail the look, they're still digital photos manipulated to resemble something they're not. This bugs me.

When I go out, I bring both film and digital cameras. You know, just in case. I tell myself this will ensure that I "get the shot", whatever that means. I'm not sure it works the way I think it does. I often spend so much time deciding which camera to use and then switching that I'm sure I'm missing lots of shots anyway.

Sometimes I'm disappointed with the results from film, sure. There are development issues, dust (OMG the dust!), low light challenges, etc. Thank goodness I have a digital version, right?

Having options is great, but always having to decide...isn't, so I'm thinking about going all-in with film for a while.

Film photography is slow, expensive, and untrustworthy. It's also fun, creative, interesting, and makes for, in my opinion, nicer images.

I have a new iPhone 15 Pro and that should cover any "must-have" documentation photos and selfies, but otherwise I will try shooting everything else with a film camera. For a while.

Permalink #

My paper journal slash scrapbook

Many things I do turn out, in hindsight, to have been a complete waste of time. Journaling in my paper notebook/scrapbook is not one of them.

A page from February, 2023

I just love randomly flipping through them. I revisit these pages much more often than I do my old Day One journals or even my Org journal. I love how permanent they feel; how stable and immutable they are.

At first I tried to be precise and selective about what goes in them. The A4-size Moleskine notebooks I use cost around $25ea., so I didn't want to "waste" them. That was silly. I've found that the more random and haphazard I get, the more I enjoy them. All bets are off, cost be damned!

So, what goes in them? Anything! I mostly add photos with a caption and bit of backstory written next to them. But I also glue in ticket stubs, comics or ads cut from magazines, cut up bits of pages I've typed up on a typewriter, index cards with quotations, business cards, whatever.

It doesn't matter if I skip a week or a month. 10 years from now it'll all be compressed into "the past" anyway. I don't beat myself up about it.

I do wish I would write more and longer actual journal entries. If I'm honest, the notebooks have become more scrapbook than journal, but I don't care. They're priceless.

Permalink #

App Launchers

Mike mentions disabling Alfred and going back to using Spotlight as an app launcher. I’ve been having similar thoughts.

I use Raycast, and its latest release notes are mostly around features of the $8/month subscription version. I thought, there’s no way I’m paying monthly for what’s basically a glorified app launcher, which brought me back to thinking about Spotlight.

My first app launcher was Quicksilver and it immediately became an intregal part of using a Mac. From there I moved to LaunchBar and then to Alfred before settling on Raycast. I still sometimes fire up LaunchBar because it’s great for navigating the filesystem. And it’s faster.

My first week with Raycast was spent installing extensions and writing little scripts: everything from deploying my websites to resizing images to creating notes. Then, I barely used any of them. The only fancy Raycast extension I use regularly is for resizing images selected in the Finder.

So after getting all huffy about not paying for a Raycast subscription, I dropped all the way back to Spotlight. It lasted two hours. I don’t want to even use a computer if there’s no clipboard history. If I need to install another app to get that, then why not just use the one built into the app launcher?

As a way to feel better about all this, I’m going to run with Alfred today and see how it feels.

Permalink #

Moving this Kirby site from Fortrabbit to my DigitalOcean VPS

⚠️ This blog is no longer running Kirby, but I left this here just in case.

I've recently whittled my servers at DigitalOcean down to a single 2GB instance running Caddy. When I started playing with Kirby, I tried getting it running there, but had issues with php-fpm and Caddy not playing well together, so I spun up a hosted instance at (link: https://fortrabbit.com/ text: Fortrabbit).

Running Kirby doesn't require a database or anything fancy, just a web server and PHP, and it bugged me that I couldn't get it working, so yesterday I tried again, and finally figured it out. I'm writing this down so that I don't lose it.

Here's my Caddyfile configuration:

baty.net {
    root * /home/jbaty/apps/baty.net-kirby/public_html
    encode gzip
    php_fastcgi unix//run/php/php8.1-fpm.sock
    file_server
    redir /content/* /
    redir /site/* /
    redir /kirby/* /
    redir /index.xml /feed
    redir /rss/  /feed
    redir /feed/  /feed
    redir /feed.rss  /feed
    log {
        output file /home/jbaty/logs/caddy/baty.net-kirby.log
    }
}

That's it. I'll need to add headers and a whole bunch more redirects, but this works. I don't love that the PHP version number is hard-coded in the socket path, but that's the only thing that worked for me.

The other change I made was to configure php-fpm to run as user and group jbaty/caddy in /etc/php/8.1/fpm/pool.d/www.conf. There's probably a better way to do this, but I couldn't find a combination of permissions that would work for both control panel updates and editing the content files directly.

I like having everything on a single server, so this is better, even though it requires more work from me. Let me know if you notice anything broken.

Permalink #

Saturday, October 14, 2023

I spent the afternoon with my new grandson yesterday. His name is Lincoln. His middle name is Jack. She gave him my name and that might be the nicest thing anyone has ever done for me.

Proud grandpa holding Lincoln

The Kirby experiment continues. I did some work on it this morning. You might notice that the home page now shows a grid of recent posts under the latest Journal entry. Also, the Posts page shows a simple list of posts. No covers or anything. I found the cover images made the page too jarring or erratic or something.

Permalink #

The Kirby Experiment so far

I've been having a blast migrating this blog to Kirby. Setting up new software and learning what it can do is a lot of fun.

This post is mostly a quick summary of how I've found using Kirby so far.

First, I'm typing this in Kirby's "block" editor and I can't tell you how much more pleasant it is to work in than WordPress' Gutenberg editor. I assumed I'd always use the built-in Markdown block, but I find the basic text block is more than enough for most things. I also use the quote, list, image, gallery, and code blocks. I could even build my own custom blocks if I found a need.

In fact, the entire panel is far nicer to use than the WordPress admin. It's clean, light, and fast. It looks like this...

Block content is stored in text files, but the blocks are encoded as JSON objects. This is great for machines, but not as good for people. And I'm struggling with that. Kirby uses text files as a database, which would normally mean I could grab Emacs and start writing. Except when using blocks it doesn't really work that way. Once I've committed to using the block editor, I'll always have to use the block editor. I'm nervous about that. It makes me twitchy, and I've no idea how I could change things later without losing data or at least being forced to translate everything somehow. Like I said, twitchy.

I started out with Kirby's "plainkit" starter kit, which includes only the underlying app. This was good for learning, but quickly became frustrating. I felt like I was building my own blogging engine using PHP and YAML files. That's not what I signed up for, so I started over with Kirby's more complete starter kit. That turned out to be nearly as frustrating, but in the opposite way. It did too much, and it seemed like magic so I struggled with removing things I didn't want without breaking the site. Eventually, I got it working well enough to ship. Okay, maybe it wasn't ready, but I needed to "feel" it in production.

Let's just list the good and bad as I've found things so far. Off the top of my head...

Good

  • The control panel is nice, clean, and easily customizable to suit different workflows
  • No database. This point is debatable (I like databases) but there's no denying the simplicity.
  • I find PHP much easier to work with than Go, and Kirby's PHP is much easier to work with than in Wordpress.
  • The folks in the forum are ridiculously helpful, and the community is small enough so that it's not mostly noise.
  • I like the template/blueprint/snippet system. It mostly makes sense and is easy to deal with. Especially coming from Hugo.
  • Writing posts and managing images is a pleasure overall

Not so good

  • The "ecosystem" is smaller than Hugo's and much smaller than WordPress'.
  • Not free. A license is $100 (but is good for three years). Not expensive, but it eliminated Kirby from little hobby projects where I might otherwise try it.
  • Permalinks are tricky. I've read everything, but can't figure out how to properly and consistently implement a sensible URL structure that doesn't involve confusing hoops and abstractions. And moving content files around later seems like a bad idea. This makes it feel fragile.
  • Blueprints are YAML files and I still haven't figured out all the different ways to break things. Not for lack of trying!
  • I worry that if I don't get things set up perfectly up front, changing my mind is going to be a pain.
  • Blocks are great, but I have a long history with Markdown and I worry that not using Markdown will turn out to be a mistake. Or at least it will be hard to get my stuff out of blocks. Maybe jq or something could help, but still.
  • There are very few theme options, and many of them cost money. I don't begrudge a small fee for a good theme, but I've not found one I'd be willing to pay for. Sometimes all I want for blogging is to pick a nice theme, make a few tweaks, and write.

So, I'm having fun with Kirby. I love being able to drag a bunch of images into a post and have them ready to use with a single click. I like adding complex content using blocks. The control panel is actually pleasant, which is a nice change. I've always found PHP easy to work with.

All this is nice, but what's going to happen when the novelty wears off? I know me, and the novelty always wears off. I can already feel myself twitching over having content in text files but those text files aren't easily readable or portable. I also have a dozen things on my list to implement or change, and it feels daunting.

The thing I miss most is my nice Emacs writing workflow when using Hugo. I can already feel it pulling at me.

Permalink #

Sunday, October 08, 2023

I have now spent many hours reading about Kirby and watching videos. I've learned a great deal. I even built a barebones site with blog posts and camera information and a full-blown panel for managing content and uploading images. I've tried both the empty and the full-blown starter kits. I dig how Kirby works and I quite like managing content via the control panel, but still being able to just edit text files, etc. After all that, I'm stopping for now. There's just too much left to do and I'm out of energy for it this weekend. I'll keep it nearby, and maybe once Kirby 4 is released I'll feel motivitated to finish. You see, I don't know what it's for. I don't know that I have the energy to replace baty.net and move all the content and redirect the URLs and and and. I might make a photo-centric blog with it. Mostly, I started this whole thing as a way to play with Kirby. I've done that. I get it. Now what?

Permalink #

Saturday, October 07, 2023

I spent some of the morning writing a new function for generating posts in Hugo. Then, I spent the rest of the morning building out a scaffolding in Kirby. This can't end well.

Permalink #