Printing daily.baty.net

At the end of each month, I convert my Org-journal entries into a nice PDF, print it, and put it into a binder. It occurred to me that my daily.baty.net website content is just a bunch of markdown files that could be treated the same as my org-journal files and perhaps printed as well. I started by concatenating March’s entries into a single Markdown file, like so: cat 2023-03*.md >> ~/Desktop/202303-MarchBlog.md The resulting file wasn’t in great shape for printing, so I had to clean it up. At minimum, I needed to do the following: ...

April 1, 2023 Â· Jack Baty

Back to Org-roam (from Denote)

Update: I think Org-roam is the right answer for most people, but I could not resist the simplicity and lack of dependencies of Denote, so I am back in Denote as of June, 2023. Using both Org-roam and Denote for my notes is not sustainable. I had to make a call one way or the other. I went with Org-roam. This is a bit disappointing because I prefer the philosophy of Denote. I like that Denote is agnostic about file types (I can mix and match Markdown and Org-mode files, for example). I like that it forces a consistent file naming scheme. I like that it doesn’t depend on Org-mode features or any other complex dependencies. I like that it doesn’t try to do too much, but is easily extensible. Plus, I’m not trying to build some sort of zettelkasten or anything, so simple is preferable. ...

March 16, 2023 Â· Jack Baty

The Spark File

Ten years ago, Steven Johnson wrote The Spark File, in which he describes his process for keeping track of hunches, ideas, etc. in a single text file. I, of course, thought this was a great idea and immediately started keeping my own spark file. It began in 2012 and I was reasonably consistent with it until 2016. After that, there was a lull, but it picked up again for a short time in 2021, after which I sort of forgot about it. ...

March 11, 2023 Â· Jack Baty

A fix for backlink display with Org-roam and Doom Emacs

I’ve been tracking an issue with the way backlinks are displayed that affects my use of Org-roam. Someone (hwiorn) finally discovered a workaround when using Doom Emacs: delete the compiled version of org-roam-utils. Like this: rm .config/emacs/.local/straight/build-*/org-roam/org-roam-utils.elc Now my links show up correctly. Finally! I’ll probably need to delete the file every time I sync or update but I don’t care as long as there’s a fix. It was driving me nuts. ...

March 5, 2023 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty

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 Â· Jack Baty