Opening Dired On External Drives

Marcin Borkowski (mbork) has a nice post on opening a Dired buffer for an external drive. Plugging the drive into a USB port causes it to automount but then you have to call Dired on the path to the drive, which can be long and complicated. Mbork’s solution to this is to automate the process.

If there is more than one drive mounted, his function will give you a completing read list to choose the one you want the Dired buffer for. It’s a small thing but like many things we do with Emacs, it helps smooth our workflow.

His code is both short and obvious, and nicely demonstrates how simple it is to do this sort of thing. This is an example of how easy it is to make Emacs into a secret weapon that can automate away many routine but tedious tasks. As Mbork says, it took him about 10 minutes to write the code but since he’s always mounting external drives, it won’t be long before he’s amortized that effort.

This entry was posted in General and tagged . Bookmark the permalink.