Improving ergonomics with emacs and dired
June 30, 2026
Pinning down what is so magical about emacs is not easy. People are creatures of habit but we also enjoy consistency. We also want to tailor our computing environment to match our own unique preferences. Emacs gives you the freedom to do that. As I get older the issue of ergonomics becomes more pronounced. This shouldn’t be thought of in physical choices, although these can certainly help. Emacs is not just a text editor, it is an ecosystem and it can do more than edit text. It is a powerful tool for automating tedious workflows. By adpating something into emacs lisp, it becomes part of your emacs configuration and it portable no matter what computer you happen to be on.
But back to ergonomics. Dired in emacs allows you to interact with the file system with single key shortcuts. I find myself reaching for it more and more when I want to organize, rename or delete files instead of the default GUI in either macOS or Ubuntu. Out of the box dired supports a number of single key shortcuts, for example you can delete files by pressing d, then x. Default keyboard shortcuts are a problem because they rely on the use of modifier keys (control, command, alt, function) to work. Modifier keys can induce more strain, even though they save you from using a mouse or trackpad.
Let’s say I find myself moving files to a specific folder over and over again. I can create a command, xx-dired-move-file-to-ref to move file(s) to a specific directory. I can then assign a single key shortcut, 1 that only is active in dired.
(define-key dired-mode-map "1" 'xx-dired-move-file-to-ref)
Automation is why I continue to use emacs. My purpose here is not to convert anyone to emacs, but to reflect on what emacs does for me. It’s also about keeping track of why I made certain decisions for my future self. Although already in writing this post I’ve figured out a different approach that allows me to assign a leader key in dired to unlock an additional layer of possibility.
(defvar my-dired-prefix-map (make-sparse-keymap)
"Prefix map for custom Dired commands.")
(define-key dired-mode-map (kbd "i") my-dired-prefix-map)
(bind-keys :map my-dired-prefix-map
("j" . jj-dired-switch-to-desktop)
("i" . execute-extended-command)
("p" . xx-dired-move-to-photos)
("x" . dired-do-delete))