Over at The Art Of Not Asking Why, JTR has begun a series on his Emacs configuration. This post covers his special arrangements for macOS. There are two tips, in particular, that seem to come up all the time.
The first is setting the path. That, of course, is supposed to be a simple process on Unix-like systems but doesn’t work correctly for Emacs on macOS. A long time ago, Steve Purcell solved this problem with his exec-path-from-shell package. You can read the details and what the exact problem is at the package’s GitHub repository. If you’re using Emacs on a Mac, you definitely need this package.
The second problem involves Dired. It’s obvious, if you think about it, that Dired depends on the Unix ‘ls’ command to produce its listings and some of its other operations. The problem is that the macOS version of ls is missing some of the options that Dired needs. The solution is to use the GNU version of ls, called gls. That’s easy to do but you first have to install it. The easy way to do that is through Homebrew. Once gls is installed, you need merely tell Dired to use it.
All the details for solving these two problems are in JTR’s post so if you’re running on macOS, you should definitely take a look at it. I’ve had both those changes installed for as long as I can remember but I do recall struggling with these issues until I found the solutions. Happily, if you’re new to Emacs on the Mac, JTR has both solutions for you in one place.