by iLemming | 2025-08-07 17:41:48+00:00
- > I've never heard of using org-babel for managing dotfiles

Oh that technique is just bananas - my entire system is in a single .org file, I'm sorry I can't share it - it contains private stuff and I just never thought about separating and encrypting it, I don't want to accidentally put something in public portion of it. So, I have source blocks with headers such as:

#+begin_src gitconfig :tangle ~/.gitconfig :tangle-mode (identity #o444) ... it contains my gitconfig values

That's quite straightforward, innit? The readonly mode is for so I am not tempted to manually change the file, and prefer making changes in my dotfiles using (org-babel-tangle) command. Then I have another corresponding part of the same file:

#+begin_src gitconfig :tangle (if (eq system-type 'gnu/linux) "~/.gitconfig" "no") :tangle-mode (identity #o444)

You can see that the first part would write to ~/.gitconfig on any system, the second part only does it on Linux, e.g. gpg program path differs.

I have some other tricks like merging only the values I care about with the entire config template, for example for my terminal. Kitty's config template is self-documented, so I'd like to preserve all that, including the values I keep commented out, but I don't want having to include the entire template in my .org file, I only want k/v pairs I modify. What I do is that I run elisp functions on org-babel-tangle-finished-hook, one of them would force Kitty to generate config template, then grab the values from my config and merge them in there. Org-mode files can contain executable elisp, so my single org-mode file is not only declarative, but when needed it also uses imperative instructions. The simplicity of this is ingenious. The only remaining bottleneck for bootstrapping any new machine - VM, EC2, Desktop - Linux and Mac for me is to get a hold of Emacs, cloning my dotfile.org and running org-babel-tangle - usually takes less than two minutes.

- Dired for file management is superb. It's better than anything I ever used before. I have all the trinkets there - icons, vim-style navigation, subtrees, etc. I don't know if you know this already, but Dired stands for "DIRectory EDitor" - you can fully edit your directory structure, recursively, using whichever tools you have in Emacs - multiple cursors and such, you can edit it as if you're editing plain text, and when you commit, it unravels this new structure onto the filesystem - that's just nuts.

- > Text under cursor - what modes is that

For intelligently recognizing patterns in plain-text I use Embark, it's very cool and it's relatively straightforward to add new types and commands recognizing it. If you never used Embark, I highly recommend it - it adds context-aware actions - so if the cursor is at a url, it knows what to do with it. It works great with Consult and Vertico. Another alternative which I have never tried is Hyperbole. I just never explored it, because Embark I guess covers it for me, but maybe there are things there I'm unaware of, it's probably best to expire both.

- For searching on HN I use consult-hn, a package of my own. It's published on MELPA. There's a demo in the readme, where I show how I read HN and Reddit and do some other interesting things, like extracting all urls from a thread.

- > I could just do this `whatever | nvim`, right?

Well, the thing is - when you do that in Eshell, the stuff stays within the Emacs session, buffers remain as part of your workspace, you can append to existing buffers and the result is immediately available for searching, macros, etc. Your command output always remains a first-class citizen in your editing environment.

- For automatic color theme change I use circadian.el. It's a relatively simple package that utilizes Emacs' built-in solar calendar.

- > I used to manage my emails in mu4e

Long ago I got annoyed by inconsistencies in mu4e and switched to notmuch. I don't use email as much anymore as I used to, but notmuch for me works better for mailing list discussions. What I like about using email in Emacs is that I can link to any email in my notes, and can jump to it directly from my notes - which I also don't use a lot, but it's nice to have. I also have some customizations, like finding a given email and opening it in gmail in the browser, or identifying a given email in a mailing list and opening it in the web interface, etc.

- > I used to track time very well in org mode

Yeah, I don't do much of that anymore, except for pomodoros. Pomodoro technique is great and it lets me focus on specific tasks and track the time spent on each, but I have never used it for serious analyses. However, I still can if I ever need to do that.

- > I am a recovering reddit addict and don't use it anymore

Those fuckers shadowbanned my account of many years for no good reason, and now all my previous comments and posts are not publicly available. I tried to send appeal requests for weeks, every single day, but they seem to be going into a void. I used to be very active there, but now I realized those imbeciles just broke the whole idea of what makes Internet, and I don't use it much anymore.

- Presentations in org mode. I don't remember when I had to do it last time, but I had great success with org-reveal. There are a bunch of different ways to create presentations in Org-mode, reveal is just one of them.

- For testing database queries I still use org-mode source blocks, it looks something like:

#+begin_src sql :engine mysql :dbhost 127.0.0.1 :dbport 6009 :database mydb ...

- For managing Docker there's docker.el, you can also directly explore any given container using TRAMP-mode, you'd just navigate to /docker:container-name:/path/to/file, and that also works for k8s pods

- > Come on, opening a terminal and typing `man` isn't that big of a deal, surely!

Yeah, of course, on the surface it isn't. But you know what I often do (because I can)? I would open a man page in Emacs, using either (man) or (woman) command - typically the second one on Mac. Then, I can select a region of text, narrow my buffer to it and just start typing LLM requests, e.g., "can you explain this part, etc..." That alone makes kind of a big deal for me, not to mention that it's all within the same environment - all the keybindings still work the same, I have imenu, narrowing, etc.

- > I didn't know emacs had a mode for this, that's interesting but I can't imagine it to be quite as smooth as the webUI is...

Ha, you have no idea. First of all, because it's once again, tightly integrated, I can immediately start translating - active region, word-at-point, my killring content, etc. I speak multiple languages and it's not so atypical for me to try to translate things in the midst of typing or reading text - the speed and the efficiency Emacs allows me is beautiful.

But that's not all. Check this out. I'm learning Spanish, alright? So when I want to translate something like "The colonel was born in 1939...", what does GTranslate do? It translates it into "El coronel nació en 1939", and that totally makes sense, right? But guess what? I really needed to see it like this: "El coronel nació en mil novecientos treinta y nueve", because, well, I'm still getting acquainted with the numbers. How would one do it in literally anything else, any other plugin - for Vim, for VSCode, etc? For VSCode, you'd probably have to talk to the maintainer of an existing extension, make PRs, or even make your own. In Vim, you'd have to rewrite an entire function. What did it take me? Like 15 minutes and a few lines of Elisp. Did I have to learn the internals of GTranslate API? No. Did I have to rewrite an entire function that sends the payload there? No! Here's what I did: Using the built-in profile I've identified the function that sends the payload, and advised it. I added an advising function that just before sending the payload, checks the text, finds a pattern, then sends that portion for processing, to the number-to-words function. Guess what? I couldn't even find implementation of such a function in Elisp, and I didn't have time to write my own. I simply delegated the task to the npm package. Hacky? Sure. Stupid? Well, maybe. Yet, it does work. Maybe shit ain't so stupid if thy shit works, eh? Tell me if such simplicity is ever possible in other editors.

- > LLM integration in emacs looks very interesting

Oh, once again, you have no idea. It's just beyond amazing. Using gptel, I can send LLM commands virtually from anywhere - like I'd be typing commands in Eshell and I can just ask an LLM for the proper options for, I dunno, docker-compose, or something. Right there, in-place.

That example alone is very illustrative of what makes Emacs such an amazing tool - the best of everything - you always have access to all the tools you can imagine - I can use spellchecking, thesaurus, translation and LLM while I want to type something in a git commit message, Jira comment, Slack thread, etc.

I'd be talking to someone on the phone, and they'd ask me to spell out some cryptic thing - like a ticket number - no problem, Emacs can help me here, I'd select it, and run (nato-region), it spells it out using NATO alphabet.

I need to quickly figure out the difference between two dates - no worries, built-in calendar has a way for it.

It's just really difficult for me to imagine any scenario, a use case that is text-related and Emacs can't help with for any reason.

Not long ago I wrote a command to OCR the content of my clipboard. Because I didn't want to distract my colleague when he was showing some stuff over Zoom. I didn't want to keep interrupting him with "hey, hold on, can you send me this url?", "wait a minute, I'm taking notes here...", etc.

> I never arrived

It's quite alright, even though it is never a destination but still a journey.

I hope I was able to open your eyes to how empowering Emacs can be. But hey, I'm a die-hard vimmer, I use evil-mode, and I do use Neovim too - it's a fine tool for certain things where Emacs can feel too big and too clunky.