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.

UPDATE: And a few hours later, it was fixed for good in this commit.

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.

And yet, I still enjoy shooting film and have found it impossible to quit. I like how film looks, I enjoy working in the darkroom, and I love my Leica rangefinder cameras. Having binders full of negatives sitting on my shelves is a comfort to me. They’re real, you know? I prefer real things.

In a completely different arena, I would like to stop using Emacs for everything. The great benefit of Emacs, that it can be anything and do everything, is for me also its greatest drawback. I can’t stop futzing with it. And I can’t stop trying to use it for freaking everything all the time. I just need to write stuff and keep track of some tasks. Why then do I use it to read email, RSS feeds, Mastodon, and whatever other things I can shoehorn into what should be a simple text editor?

So, I frequently fire up Obsidian, BBEdit, Logseq, Roam, iA Writer, TheBrain, Tinderbox, and oh right, none of these does the things Emacs and Org-mode can do quite as efficiently and with so much flexibility. After a few days away, I end up back in Emacs and farting around with capture templates or trying to decide between Denote and Org-roam.

The truth is that I’ll probably always shoot film and I’ll probably always use Emacs. I just wish that I could convince myself of this, then move on and actually do something creative or useful with them.

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.

Continue reading…

Marking a region for highlighting in Hugo posts

You’ll notice that I highlight short phrases in many of my daily post entries here. I think this makes it easier to scan things later. The HTML markup for this is just a styled <mark> tag wrapping the text to be highlighted.

I write my posts in Org-mode and convert them to Hugo-compatible Markdown using ox-hugo. The path from Org-mode to HTML for this is a little convoluted, so I cheat and use a macro to generate the markup.

Continue reading…

One way to discourage new Emacs users

If you aren’t willing to put in a little effort to learn the Emacs way, please go away. 

jcs – Emacs Buffers, Irreal

I understand the sentiment, but dammit, gatekeeping statements like that are unnecessarily off-putting for new users. Why are we surprised that people new to Emacs are initially befuddled by “buffers”, “frames” and weird key combinations? I sure was! If the first thing someone said when I asked “why” or otherwise questioned the status quo was “go away,” I would have done just that. And then we complain about the lack of uptake and “nebbishes”.

Do better.

Book logging in Emacs

I’ve kept a list of books I’ve read as a plain text (well, technically, Markdown) file for years. I wrote about it here . The public version is rendered using Github Pages at books.baty.net . This is fine, but at some point last year I also started logging books in an Org mode file, just to see how it felt. It felt pretty good!

Continue reading…

Searching Org-roam files

Org-roam is “A plain-text personal knowledge management system” using Emacs and Org-mode and I put nearly all my notes in there. While it’s easy to find notes in org-roam based on filename, there’s no obvious way to search the contents of notes. Weird, right?

I could use the default projectile search, but my org-roam files live within my main ~/org directory, so the results are littered with all my other org documents. I’d prefer to only search in ~/org/roam

I use a simple lisp function to help with this. It uses consult-ripgrep:

(defun jab/search-roam ()
 "Run consult-ripgrep on the org roam directory"
 (consult-ripgrep org-roam-directory nil))

I added a keybinding for it to my other org-roam bindings:

 "C-c n f" 'org-roam-node-find
 "s-u" 'org-roam-node-find
 "C-c n i" 'org-roam-node-insert
 "C-c n t" 'org-roam-dailies-goto-today
 "C-c n d" 'org-roam-dailies-capture-today
 "C-c n c" 'org-roam-capture
 "C-c n s" 'jab/search-roam               ;; <-- my new keybinding
 "C-c n l" 'org-roam-buffer-toggle)

Now, with a quick C-s n s I can search my org-roam files using the blazingly fast ripgrep .

If there’s a better way to do this, I’m all ears.

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.

I’m sure there are a dozen ways to do this, but this seems to work quite well.

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.

Continue reading…