Emacs has list-directory bound to C-x C-d by default. It shows you a directory listing in a buffer, which is marginally useful but not interactive — you can’t navigate or open files from it. If you want that, you open Dired. electric-directory-list splits the difference: a lightweight popup directory browser that replaces the default binding and lets you do the most common things without the full Dired session overhead.
What it does
It opens a temporary *Electric Directory* buffer showing the current directory. From there:
RETon a file opens it and exits the browserRETon a directory drills into itDELgoes up one levelddeletes with confirmation,~removes backup filesSPCorqquits and restores the previous window layout
The C-u prefix argument falls through to the standard list-directory command if you need it.
Install
Available on MELPA:
M-x package-install RET electric-directory-list RET
Then bind it:
(global-set-key (kbd "C-x C-d") 'electric-list-directory)
This replaces the default list-directory binding. The package sanitizes listing switches to preserve layout flags while maintaining stable filename parsing.
It’s a small package — the right size for what it does. If you need the full power of Dired it’s still there. This is for the cases where you just want to quickly open a file in a nearby directory without leaving your current context.
The code is on GitHub: kshartman/electric-directory-list.