Skip to main content

Baty.net

A blog about everything by Jack Baty đź‘‹

Tag: Emacs

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:

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.

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.

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.

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.

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?