Friday, June 23, 2023
Wasting time in Emacs. Essential Knowledge book bundle.
Wasting time in Emacs. Essential Knowledge book bundle.
I have been wondering if the benefits of using ox-hugo just so I can write posts using Org-mode format is worth the extra layer of abstraction. I prefer Org-mode to Markdown, but Markdown is fine. In fact, Markdown-mode makes editing Markdown in Emacs quite pleasant. Ox-hugo is a great package, but increasingly seemed like a clever but unnecessary abstraction. One of its best features is that it makes creating new posts super easy. I never liked using the Hugo CLI, so ox-hugo solved that problem. ...
I need to re-calibrate. Is Emacs a waste of time? Complexity.
Dammit I just lost an hour on Mastodon even though I’m supposed to be “off” social media. I have nothing to show for it, either. It’s insidious! I lost my head for a second and thought maybe I’d do the whole “Emacs from scratch” thing again. This time, I tried the new beta branch of Crafted Emacs because I like their approach on the new version. But yeah, it’s beta and things broke and I’m not good enough to troubleshoot. Back to Doom for now. ...
I usually prefer reading my email using Mu4e in Emacs, but the Vim (“Evil”) keybindings have been broken since upgrading to 1.10.x. (See this PR for background). This added so much friction that I went back to Mail.app and Notmuch. Recent changes in evil-collection have fixed the issue but weren’t available yet when updating Doom. The fix for now was to (unpin! evil-collection) in packages.el. Much better! Another snag I’ve run into while using Mu4e was that sometimes I also use Apple’s Mail on macOS and iOS and any messages I delete there would only be flagged as “trashed” in Mu4e, so they would show up in the inbox, cluttering things considerably. The fix for this was to set Expunge Both in my .mbsyncrc file. Also much better! That one has been bugging me for a long time. ...
It’s happening again. My love of powerful, complex software has overrun my ability to avoid tinkering. For example, I’ve spent several hours this week working on my Org-mode agenda display. Configuring org-super-agenda is tons of fun. It can make one’s Agenda absolutely sing and dance, which is not ideal for me because I’ve spent way too much time trying to teach it to sing and dance. I could have finished all of the tasks on my todo list in the time I’ve spent getting them to display just right. ...
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: ...
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. ...
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. ...
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. ...
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. ...
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. ...
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: ...
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. ...
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. ...
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. ...
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 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. ...
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: ...
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. ...