Emacs from Scratch...again

Occasionally, maybe two or three times a year, I become determined to move away from Emacs. I swear that I’m sick of Configuration Fatigue and I’m done for good this time!

It never sticks. I don’t enjoy editing anything without proper Vim bindings and I’m not interested in going back to Vim. I don’t enjoy writing in VS Code. I also love Org Mode so much it hurts. So, Emacs with Evil Mode it is!

When I want a complete, wildly complex, kitchen-sink-included Emacs setup that’s managed for me, I rely on Doom Emacs. Sometimes, though, I feel like I’m fighting with Doom as much as relying on it. It’s always being updated, which is great, but it means that things are always changing. I feel like I don’t understand it and that I’m not in control. Isn’t Emacs all about being in control?

So, for maybe the 6th time, I’m going to build my configuration from scratch.

OK, not exactly from scratch. I’m bringing in the best bits from Nano Emacs, a nice-looking basic configuration that isn’t looking to be a “framework”. For the moment I’m including the desired individual nano emacs files as-is. I’ll probably live with it for a while and move the theming bits over by hand and basically fork it for myself.

The other change I’m making is letting Emacs be Emacs by installing packages using package-install and also using the built in Customizer UI when I can. Maybe if I stay away from fancy it’ll stick this time.

Here’s what this post looks like in Emacs…

Nano Emacs screenshot

I started a brand new repo to keep track of it all, too.

Org-roam vs other Roam-alikes

As you probably know, I struggle with where to keep my notes. For a few months now it’s been a battle between Org-roam and Roam. Org-roam has been in the lead, mostly due to Roam being unstable and (soon to be) expensive. Also, my infatuation with Org mode is on again.

Using Emacs takes work on my part. It takes mental energy. I’m nearly always OK with that, because Emacs has Org mode and Org mode beats everything at what it does. On the other hand, sometimes I’m lazy or tired. I just want to lean back and point-and-click my way around. That’s not how Emacs works. I wrote earlier that, “Getting to a link I have stored in Org-roam takes me about five seconds longer than the same link in Roam.” In other words, Emacs with Org mode (and by extension, Org-roam) is better, but it’s a lot harder.

Yesterday, I tried the Roam-alike, Obsidian. Obsidian could be, for me, a viable replacement for Roam. It looks good, has all the necessary features, uses local storage only (by default), and is based on Markdown. I played with it for only a couple hours, but I really liked it. It’s easy! Well, crap. Now what?

I took a breath and thought about it. Honestly, Obsidian shifted the battle lines. Now, it’s Org-roam vs Obsidian. I can live without block-level transclusion and queries in Roam. I can, reluctantly, live without an outliner. I can certainly live without founders I’m uncomfortable with.

But, I don’t think I can live without Org mode. My ~/org directory has everything. It’s not just my notes repository. It’s my Journal, my todo list, my authoring environment, my reference manager, my time tracker, my PDF viewer/annotator, and sometimes my email and RSS client. I love the idea that I can ripgrep in ~/org and find anything. I love that everything always behaves the same way (bindings, editing, file handling, etc.). I love that it’s all local and free and is more likely than any of the alternatives to be around for decades.

Yes, Emacs can be difficult and frustrating. It is a tweaker’s dream and at the same time can be a nightmare for someone trying to just be productive. This is crazy-making if you’re both of those people.

So right now, Roam and the other Roam-alikes will have to sit on the sidelines. I’m writing this on Friday, May 29, 2020. Just making a note.

Keeping Org-roam Daily Notes in a separate folder

Org-roam continues to impress.

I use org-roam’s “Daily Notes” feature every day as a frictionless place to put notes that may or may not need to be moved or otherwise dealt with later. It’s the Org-roam version of a similar feature in Roam.

One thing about it I didn’t care for was that the Daily Notes .org files were starting to pile up in the root of my ~/org directory.

Most of the time, file names and locations do not matter in org-roam. Everything is easy to find/browse right in Emacs. There are times, however, when I’m poking around in my org files using Dropbox or the Finder. All those daily files started getting in the way, so I decided to try moving them into their own ~/org/dailies/ folder.

Trouble was, the way I get to or create daily files is by using org-roam-dailies-today and that function creates the file in the root org-roam-directory folder. I asked about the possibility of a new setting for where to store dailies, but it turns out that the capability is already in org-roam with org-roam-dailies-capture-templates. This is an org-roam specific version of the org-capture-templates feature. Jethro helpfully sent me the following snippet for my config:

(setq org-roam-dailies-capture-templates '(("d" "daily" plain (function org-roam-capture--get-point) ""
                                            :immediate-finish t
                                            :file-name "dailies/%<%Y-%m-%d>"
                                            :head "#+TITLE: %<%Y-%m-%d>")))

And poof! new daily notes files are created in ~/org/dailies.

But what to do about the 3-months worth of existing files? They are full of links to other org files and those are all relative to the root ~/org directory. Moving them would break all those links. I had seen some comments about proper link handling when files are moved using dired, so I tried that. I fired up dired, marked all the daily notes files using %m2020-, and moved them to ~/org/dailies. I then deleted the org-roam.db database and ran org-roam-db-build-cache and guess what, all of the links and backlinks were updated and everything worked.

Now, all my “dailies” files are nicely tucked away in their own folder.

So cool.

Part One of My Battles with Emacs - macosxguru

macosxguru on learning Emacs:

There was no good reason to do this. Absolutely no damn reason.

and a little later…

Like I said. This was a bad idea.

But then…

I am learning. I am having fun. Also tearing my remaining hair out. Frustration is a part of the learning curve. It is the most geeky thing I have attempted and the little successes add a tremendous amount of pleasure to my quarantined soul. This series is going to be continued…

I’m looking forward to it.

org-mode In Your Pocket Is a GNU-Shaped Devil - Mike Hall

Mike Hall:

With Emacs, you don’t just go “la la la … I’m gonna add org mode back and call it a day!” You think to yourself, “I love org mode. I wish there was an easy way to turn an e-mail message into a todo …” and the next thing you know you’re dealing with how to configure GNUS.

Then you think “All my calendar stuff is in Google calendar … how can I get it into my org mode agenda?” and that means you’re off reading this guy’s page and just getting angrier and angrier.

Then you go in the kitchen and make a drink, and while you’re making it and calming down you think to yourself, if I’m doing all this stuff in Emacs anyhow, what would it hurt to follow Twitter in Emacs?

Now you’re not drinking because you’re angry … you’re drinking because you wonder what happened to you and it makes you sad. But you’re drunk, so it seems like a perfectly good idea to build an entire Web site using nothing but Emacs because then you can get a LaTeX version of it for if the asteroids hit and their radiation destroys all HTML. And having decided to do that, part of you thinks about how glad you are you have org mode, so you can organize the lengthy process of making sure you never have to leave Emacs again.

That’s right … because org-mode is just a collection of lisp running in an editor. It cannot impose more complex features on you. The genius of org-mode is that you will eventually impose more complex features on yourself.

This is exactly me every other week.

Doom Emacs vs my custom Emacs config

I’ve become catatonic over whether to use Doom Emacs or my home-rolled Emacs configuration, so I’m jotting down a few notes to help me think it through.

Doom has very good defaults, looks great, and continues to fine-tune a bunch of behaviors in a way that I generally get along with. (I like it more than the other big contender, Spacemacs). On the other hand, Doom’s behavior feels out of my control and things change frequently, forcing me to pay attention to my editor in a way that I’d rather not. That’s not the way Emacs is supposed to feel. It should feel like it’s 100% mine.

So you can see the dilemma.

This also ties in to my Vim vs Emacs keybinding debate. I have (or had, at least) a decade or more of Vim binding muscle memory. Using stock Emacs bindings for the last couple of years has erased most of that memory. Now I suck at both.

Evil Mode in Doom works great. I want to use it. I tried adding Evil to my own config but its behavior was inconsistent and it would likely take me weeks to build something usable out of it.

Of course I can customize Doom, but in doing too much of that I feel like I’d end up with an unmaintainable combination of done-for-me config and my own tweaks. Worst of both worlds?

So right now I’m using Doom because it’s so very nice. My own config, as light and personal as it is, is missing a lot of Doom’s many niceties. Still measuring the trade-offs.

My day so far in Roam and/or Emacs

A quick rundown the chaos in my head around Roam and Emacs and how it has affected my day so far.

6:00am Realize on the way to work that Roam just isn’t a great idea for holding my (hopefully) long-term “second brain”. $30/month forever in a proprietery blah-de-blah? Nope, and by the way org-roam is perfectly suited for this. I want long-term stability and control for this sort of thing and what could be more long-term-stable than Emacs and plain text files, right?

7:00am Tweak Emacs a little and settle in. Move some of the things I “accidentally” wrote in Roam yesterday into org-roam. You see? Now everything is in Emacs and I can stop thinking about it. This will be fine.

11:00am After spending 90-minutes down a rabbit hole trying to get better at managing tables in Org mode and then fumble-fingering a couple commands that messed up my file because my Emacs keybindings are a mess, I decided that NO! maybe Emacs isn’t the best tool for the job and Roam is made for this, for crying out loud. Also, Airtable is great at spreadsheets, why suffer the pain (and admit it, it’s painful) of tables in Org mode when I can just paste an Airtable link into Roam? Best tool for the job, yada yada.

11:30am Go to lunch and think about all this the entire time even though I just want to enjoy my damn lunch.

1:00pm Quit Emacs in anger and put all my notes from this morning into Roam and my tasks into OmniFocus where they belong. Right!? Tasks are way simpler in OmniFocus anyway and it hooks right into email and so on. My second brain is basically useless when it’s nothing more than a bunch of text files. Notes need to be used to be useful. They aren’t useful if they are just written once and forgotten. You know what makes my notes useful and is nice and easy to use? Roam!

2:00pm Realize I’m doing it again. I kind of knew I was, but now it’s become obvious so I jump into another tab and start writing so I can share this nonsense with everyone because everyone wants to read post after post of me whining about how indecisive I can be.

The Future No one knows, the day’s not over yet!

Reining in Emacs

So far this year I’ve deleted Emacs from my Mac’s dock at least 4 times.

You know this story, but I’ll keep writing it anyway.

I’ve only been using Emacs seriously for five years or so, and in that time it has become the center of my text/information/editing/productivity/publishing universe. I’m not sure that’s a good thing.

For example, I spent a couple hours one weekend setting up Elfeed for reading RSS feeds. Why? Because it’s neat to be able to read RSS feeds right in Emacs. But, it’s not pleasant. It’s janky and not pretty and a little finicky.

I don’t know if you’ve noticed, but reading walls of monospaced text is uncomfortable. It is for me, anyway.

What about email? Mu4e is awesome. I can fly through my inbox with it. And editing email with Emacs is great. Searching in Mu4e is super fast and flexible. But, the rest of the experience is less great. Reading most modern emails requires proper HTML support and that’s not what I get with Mu4e. I can open the HTML version of any given message in a browser, but that’s certainly not ideal. I often need to deal with multiple messages at once, and Mu4e doesn’t make that at all easy. As bad as parts of Apple’s Mail app are, it’s a significantly more pleasant, easy-to-deal-with experience for how I use email.

Let’s talk about Org mode. Oh my. For me, Org mode is the best reason to use Emacs. It’s probably the most powerful thing on my computer.

I can do pretty much anything with Org mode. I can write and post to my blog, I can create properly-typeset PDF documents, I can manage my time, tasks, habits, schedule, journal, notes, you name it. Org mode can do it all!

You know what they say, “Just because you can, doesn’t mean you should.”

It’s time to take inventory of my Emacs use once again. Last time I did this I was waffling about a lot of this as well.

And what about now? I’m still thinking about it. Part of the problem is that I’m experiencing my regular bout of text file fatigue. I’m tired of staring at plain, monospaced text all day for everything.

Another issue is keyboard fatigue. I have a fantastic keyboard, and it’s great being able to do everything without taking my hands off it. But sometimes I want to take my hands off the keyboard. Sometimes I want to lean back, grab the mouse and drive with one hand while maybe occasionally typing something. I don’t want to sit up straight with my hands on the home row and remember complex and sometimes obscure keyboard combinations for every little thing. Maybe I just want to click a tab and start typing in, say, Roam.

Speaking of Roam, what a mess it’s made of my note-taking process. Roam is so good at being an intertwingled second brain that I don’t want to take notes anywhere else. Trouble is, Roam is going to be priced at something like $30/month and it’s a third party app, and who knows how long it will be around, and so on. There’s org-roam, which is quickly becoming quite good. But it’s not Roam. Org mode can be an outliner, but it’s not a very good one. Roam is a decent outliner, along with all the other things it does well. This is hard for me, because I’d rather take my notes in Org mode, but just knowing Roam exists causes me to second guess everything.

And finally, task management. Org mode is the most sophisticated, extensible, full-featured task management option I know of. It’s built for managing tasks. Once configured to my tastes, Org’s agenda is a fantastic way to keep on top of everything. The catch there is “once configured”. That process never ends. Go ahead, read the manual, I dare you.

I’m tired of thinking things like, “I wonder if I could make that heading show up over here instead.” and then spending hours making it happen. Or “How do I filter by category again?” Doing all this can be fun, but it’s not anything approaching productive.

You know what makes task management easy and pleasant? Things does. Things is just so very nice, you know? Hell, even OmniFocus, with it’s noisy UI and fidgety perspectives, and stupid giant round checkboxes, is way more pleasant to use in anger than Org mode. The overall superiority of Org mode is incontrovertible, but dammit it exhausts me.

So, where does this leave me? Here’s what I’m going to try using Emacs for.

Note taking “second brain”: Org mode and org-roam. I don’t know how long I’ll be able to resist putting everything into Roam instead, but what I want to do is keep it all locally in neat little text files forever. At the rate that org-roam is improving, this may just work out fine.

General text editing: When I need to process a bunch of text in multiple files, BBEdit wins for me, but otherwise I’ll use Emacs.

Journaling: org-journal. My use of Diarly or Day One is waning, even though they are nice and handle images wonderfully. My daily journal is 90% text and org-journal is terrific for that.

Code: Emacs (But who’m I kidding, I almost never write code these days)

And here’s what I’m taking (or keeping) out of Emacs…

Task management: This is a tough call, but I’m sticking with OmniFocus or Things for the time being. I expect this to get sucked back into Org mode before too long, but here we are.

Email: Apple Mail. It’s always there, looks good, and mostly works. I almost wish I could continue to use Superhuman but I’m trying to move away from Gmail and I don’t want to pay $30/month for a fancy Gmail wrapper. Mu4e is cool, but too much work.

Blogging: Ghost. Ghost is pleasant, fast, reasonably lightweight, and makes managing my blog generally hassle-free. I love the idea of a static site, and Hugo is great for that, but like I said, I usually just want to click a tab, start typing, and hit “Publish”.

Personal finance: I’m very tempted to restart my Ledger setup using Emacs' ledger-mode but it’s so much work that I doubt I’ll stick with it for long so I’m back in YNAB and Banktivity for now.

So it appears that I’ve been able to rein Emacs in a little. Enough at least so that it doesn’t swallow everything I do and wear me out in the process. A little variety in apps keeps things interesting. None of this is set in stone, and who knows what moods will strike, but for now, I’ve got a plan and I can keep Emacs in my dock without it stressing me out.