Things I can’t quit, Film photography and Emacs

I know that film photography and Emacs are completely unrelated, but I have been thinking about both of them quite a lot recently. Since moving back to shooting film in 2003, I have regular thoughts of switching to all-digital again. It’s just easier. I have rooms full of “stuff” in support of film photography, and things would become so much faster and easier without all of that. A nice digital camera, a good RAW editor, an inkjet printer, and some hard drives, and I’m all set. ...

February 14, 2023 Â· 330 words

Everything is in ~/org

The more notes I put into Org-roam, the more I want to put there. My Org-roam directory has always been in ~/org/roam, meaning that my database was limited to files I put in that directory. The rest of my org files have been in ~/org, so they’re out of “reach” of Org-roam. Sometimes, though, I wanted link from, say, my Daybook.org file to one of my Org-roam files, thereby making that daybook entry part of my org-roam database. ...

September 30, 2022 Â· 189 words

Tagging deleted messages in Notmuch

I use Notmuch in Emacs for managing my email. It’s fast, powerful, and (once used to it) easy to use. There are a few oddities I’ve learned to work around. The first is with deleting messages. The manual for Notmuch states: Notmuch does not support, nor ever will, the deleting of messages Notmuch manual I’m ok with this, since Notmuch provides a way to essentially bury deleted messages using tags. I don’t necessarily need to actually delete the message file. Any message tagged with +deleted is hidden from searches unless explicitly included. Ignored tags are set in ~/.notmuch-config like so: ...

September 21, 2022 Â· 304 words

iA Writer vs Emacs

Emacs can be ugly, but it doesn’t have to be. Above we have the highly-polished and thoughtful iA Writer on the left and Emacs on the right. I’m using Doom Emacs in “Zen” mode, which is basically a tweaked version of Writeroom-mode. My tweaks include using iA’s Quattro font as a variable-pitch font and a little spacing via line-spacing. (add-hook 'writeroom-mode-hook (lambda () (setq line-spacing 0.5))) iA Writer is wonderful for editing Markdown files. Might even be “nicer” overall than Emacs for that purpose. It’s just so smooth, you know? But, Emacs is Emacs and that’s tough to beat. I alternate between them. It helps that I’ve made them look similar. ...

September 8, 2022 Â· 119 words

Hiding File Permissions in Dired

Dired mode in Emacs is fantastic, but one little thing that annoyed me was that the directory listings show file ownership and permissions, taking up space with information I almost never care about. I started down a rabbit hole of figuring out how to hide those columns. I spent wasted an hour on my way to discovering that, of course, there’s a built-in way to do it: dired-hide-details-mode. Well, that was easy. ...

July 31, 2022 Â· 97 words

C-x C-c

I rage-quit Emacs this morning. By that, I don’t mean that I hit C-x C-c really hard, although I did do that. I mean I stopped using Emacs. ...

June 29, 2022 Â· 283 words

Publishing portions of my Org-roam database

I’m trying something new. I’ve become a pretty heavy user of Org-roam for personal notes. I put nearly everything there now; technical notes, contact information, project notes, vendor info, etc. These notes are all nicely linked and backlinked and live in my main ~/org directory so I can easily find things right within Emacs. A portion of these notes might be useful to other people. So I’m exporting the shareable notes from Org-roam as Hugo-compatible Markdown files. This turned out to be surprisingly easy. You can see the results at https://notes.baty.net and the details of how it works makes a good example. ...

March 27, 2022 Â· 119 words

Aligning comments in Emacs

I want my per-line code comments to line up nicely, so I’ll often add a bunch of spaces by hand to make things just so. I realized that, being Emacs, there must be an easier way to handle this. Of course there is. Two minutes of searching revealed a short bit of lisp that does the job nicely: ;; Align comments in marked region ;; Via https://stackoverflow.com/a/20278032 (defun jab/align-comments (beginning end) "Align comments within marked region." (interactive "*r") (let (indent-tabs-mode align-to-tab-stop) (align-regexp beginning end (concat "\\(\\s-*\\)" (regexp-quote comment-start))))) Here’s an example of what I was working on, with horribly un-aligned comments. ...

March 25, 2022 Â· 267 words

Configuring the org-download save directory

When I drag and drop an image into Emacs, I want the attached file to end up in ./img/YYYY/. This is how I tried configuring org-download in my setup (I use Doom Emacs): (setq org-download-method 'directory org-download-image-dir (concat "img/" (format-time-string "%Y") "/") org-download-image-org-width 600 org-download-heading-lvl 1) For some reason, org-download-method was being reset from 'directory to 'attach after loading, and this broke things. I thought maybe I needed to set the variables after org-download was loaded, so I did this: ...

March 19, 2022 Â· 168 words

Posting from Emacs to WordPress using Org2Blog

I’ve settled on WordPress for this blog. (“settled” is a fluid word for me, but let’s assume I mean it for now). However, I prefer to do most of my writing in Emacs and Org mode. To help with this, I’ve configured org2blog and I’m writing this post with it. I’m using org2blog pretty much right out of the box. Just a single blog configuration with the following tweaks: <div class="org-src-container"><pre id="nil" class="src src-emacs-lisp"><span style="color: #4078f2;">(</span><span style="color: #e45649;">setq</span> <span style="color: #6a1868;">org2blog/wp-track-posts</span> <span style="color: #a626a4;">(</span><span style="color: #b751b6;">list</span> <span style="color: #50a14f;">"~/org/baty.net/.org2blog.org"</span> <span style="color: #50a14f;">"wordpress"</span><span style="color: #a626a4;">)</span><span style="color: #4078f2;">)</span> <span style="color: #4078f2;">(</span><span style="color: #e45649;">setq</span> <span style="color: #6a1868;">org2blog/wp-default-categories</span> <span style="color: #4078f2;">'</span><span style="color: #a626a4;">(</span><span style="color: #50a14f;">"Misc"</span><span style="color: #a626a4;">)</span><span style="color: #4078f2;">)</span> <span style="color: #4078f2;">(</span><span style="color: #e45649;">setq</span> <span style="color: #6a1868;">org2blog/wp-default-tags</span> <span style="color: #4078f2;">'</span><span style="color: #a626a4;">(</span><span style="color: #50a14f;">""</span><span style="color: #a626a4;">)</span><span style="color: #4078f2;">)</span> <span style="color: #4078f2;">(</span><span style="color: #e45649;">setq</span> <span style="color: #6a1868;">org2blog/wp-show-post-in-browser</span> <span style="color: #4078f2;">'</span><span style="color: #986801;">ask</span><span style="color: #4078f2;">)</span></pre></div></code></pre> I haven’t figured out how to use authinfo.gpg for logging in automatically yet, so for now I’m typing my password in each new emacs session. ...

March 18, 2022 Â· 288 words

Doom Emacs from scratch

A week ago I decided to cancel Doom Emacs and go back to building Emacs from Scratch, and once again I was reminded what a terrible idea that is. Seriously, stock Emacs, even with a leg up from Nano Emacs, gets so many things “wrong” that I could spend the rest of my life fixing things and still wanting more. I thought building from scratch would help me avoid Configuration Fatigue. Wow, was I wrong. ...

March 10, 2021 Â· 239 words

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. ...

May 29, 2020 Â· 338 words

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. ...

May 29, 2020 Â· 409 words

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? ...

February 14, 2020 Â· 391 words