notes from /dev/null

by Charles Choi 최민수


Announcing mdired, or adding a chainsaw to Dired

01 Nov 2026  Charles Choi

The ability to mark items in GNU Emacs Dired allows for bulk operations on both files and directories. With marking, onerous tasks can be turned into a trivial ones.

While default Dired has many bulk operation commands, not everything is covered. That is the motivation for mdired, an Elisp package which extends Dired with some SIMD-style commands.

Using these commands fall into two steps:

  1. Mark the items of interest in Dired.
  2. Run the mdired command.

mdired supports the following four commands:

  • mdired-copy: copy a single file to multiple directories.

  • mdired-do-command: run an Elisp command or named keyboard macro on multiple files.

  • mdired-compile: run compile on multiple directories.

  • mdired-byte-recompile: byte-compile selected files or directories.

Refer to the mdired User Guide for more details on usage.

Closing Thoughts

Bulk operation commands are chainsaws. Use them with caution. That said, they are great for improvised workflows:

  • “Here’s this file that I want copied to a bunch of directories.”
  • “I want to do the same edit operation on this set of files. I’ve got a named keyboard macro ready to go on them.”
  • “I want to run the same make command on a bunch of directories.”

As mdired is new, I’m open to feedback on it. Let me know what you think.

mdired v1.0 is now available on MELPA.

emacs

 

About • Mastodon • Bluesky • GitHub

Feeds & Tags •
Get Scrim for macOS • Get Captee for macOS

Powered by Pelican