Emacs Packages To Use With Composiphrase
Since I published Composiphrase, I thought I would give a list of some other interesting Emacs features or packages that are unrelated to Composiphrase, but that one might want to use with it. The list is not exhaustive, you should also do a web search of favorite Emacs packages. But it’s a good place to start, especially if you like composiphrase and want to try it more seriously.
- wdired - this is actually built-in, but is an awesome feature in emacs. It lets you treat a directory listing as a mutable buffer, then save those changes to the file system. IE you can do bulk renaming, with search and replace, etc. It’s nice. It’s a text lens.
- wgrep - this is like wdired, but with grep results. This is one of my favorite emacs packages. It is one of those things that is retrospectively obvious, but why didn’t somebody think of it sooner? It makes it much easier to do big refactorings, including for files that language-based tooling can’t track, or for languages without fancy tooling. It’s another text lens.
- org-mode is great. People use it for all kinds of different things. I use it a lot, though I don’t use most of the functionality. I use it most to take hierarchical notes, and I use headings a ton instead of putting things in the headings. And I use it for to-do lists. Other people do all kinds of things with it. But I guess this already has a shout out from being a pre-configured, and mostly actually implemented, object in Composiphrase. I honestly mostly just use the outline-mode features that underly org-mode…
- magit - well, many people love it, so it’s worth looking at. I use some of its features, mostly the log view. But, I actually prefer using the git command line for many things. One feature that I really dislike in magit, though, is the magit-rebase-mode, which I took some effort to figure out how to disable in my personal config. It is, in my view, the opposite of how my favorite emacs things work. The standard rebase interface is that you get a text file and then edit the text to make changes (much like wdired and wgrep, which I love), but magit-rebase-mode instead makes this buffer read-only and gives you a bunch of bespoke key bindings to operate on it. I don’t want to memorize more bindings, I want to use the plentiful text editing bindings I already know! (What was my ultimate solution to disabling it?
(with-eval-after-load 'git-rebase (fset 'git-rebase-mode nil))
, after a few failures with solutions that seemed more civilized.) - avy - I have actually never gotten into it, but it’s a very different way of moving around a buffer. It’s in many ways the opposite of composiphrase - with composiphrase you compose things in ways that are often long, but you can re-use those key sequences and they always do the same thing. So you can pop them off from memory in a quick and effortless sequence, and not stop and think about what it is doing because it acts consistently, and you can use them in keyboard macros, etc. With Avy, you type very few characters, but you have to look and read popup hints and then hit the right keys, and you use different keys each time, and it doesn’t work with keyboard macros. So… those are several things that I don’t like about using the mouse, and why I prefer using the keyboard. But, I think I should give it another shot and try to work it in to my workflow, because there are many places where the sequence of composiphrase movements needed to get somewhere is unclear — eg. how many of X text object away is it, or what tree movements are needed to get there, etc. As much as I love structured tree movements, they are often not the best tool when you just need to go to some specific place. I often use searching (eg. with
/
) to do these jumps and ad-hoc movement to a specific place. But depending on the context, I may need some long or convoluted search string, while Avy would get me there in just a few keys. - sexp-rewrite - This is another package that I keep meaning to add to my workflow, but it needs some initial setup that I’ve just never gotten around to. But it’s by Ryan Culpepper, the genius behind Racket’s most excellent syntax-parse library, and general macro wizard. The idea is that you define tree rewrites that are like lisp macros, only instead of using them at compile time you use them at text edit time to edit your source code. This package is s-expression-specific. But the ideas could apply to any tree. So the idea of these rewrites could be useful for, say, any language with treesitter support.
- Check out the “minad stack”, Vertico, Corfu, Marginalia, Consult, Embark, Orderless, Cape. Those are not all by this Minad guy, but they are always recommended together.
- You probably want LSP support. I’ve been using lsp-mode, but I think soon I’ll take another look at eglot? Also there are both dap-mode and dape for the DAP protocol.
- If you like these new so-called “AI” systems, gptel is one of the better interfaces for them. (I am not anti-LLM, but I typically find things labelled as “artificial intelligence” tiresome, because they always over promise, and the words gradually shift their meaning. The original idea of “AI” meant actual intelligence, not just useful computer tools, but now you have to say “AGI” to mean that, and next I’m sure “AGI” will be redefined (eg. to mean a system that makes X billions of dollars for Microsoft) and we’ll have some new “AGI-but-actually” acronym. Also, maybe I’m just getting old, but I find that I’m more disgusted by a lot of the negative uses of LLMs and other modern generative AI systems. Maybe it’s just that as a starry eyed youth I ignored or downplayed the negative uses of previous computer and internet technology…) Anyway, given that Emacs is the best system for working with text, and for custom text-based interfaces, and is this awesome general tool, and LLMs are these impressive general tools for working with text, I’m confident that eventually many of the best interfaces for using LLMs will be inside emacs.
- I really like the rainbow-delimiters and rainbow-identifiers packages.
- Once I was watching a coworker use VSCode and he had an extension that showed the git blame for the current line dimly to the right of the text. I decided I wanted that too, and found the blamer package. After I while, I decided it was too busy, and sometimes it got stuck. But it’s a nice on to toggle on sometimes.
There are loads of other built-in features and extra packages, but those are the ones that come to mind right now.