howto

Getting emacs working on OSX Monterey

security and permissions

tags
emacs
osx
homebrew

I recently got a new MacBook Pro. I still love my old Pixelbook, but I'm running too many docker containers on it and its slowing down my development time. In addition to the beautiful screen, zippy processor and charge it whenever you feel like it battery life, the speakers on the new MacBooks are mind blowing. But, of course we need emacs.

Also, ports and function keys. Finally.

Install homebrew

1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)

Then run the “next steps part”

Install emacs

1
brew install --cask emacs

The cmd-space emacs to start the application.

Security settings

  1. Go to System Preferences
  2. Security, then unlock to make changes
  3. Enable the binary
  4. Then go to Privacy
  5. Enable Full Disk Access for emacs

Fix Emacs.app to get access prompts

There's a launcher script to figure out what version of the emacs binary to start up depending upon the architecture, which confuses OSX. We'll need to get rid of this in order to help OSX figure out what's happening.

In a shell:

1
2
3
4
  cd /Applications/Emacs.app/Contents/MacOS 
  mv Emacs Emacs-Launcher
  cp Emacs-arm64-11_2 Emacs
  cp Emacs-arm64-11_2.pdmp Emacs.pdmp

Change caps lock and remove Mission Control hijacking

  1. Go to System Preferences
  2. Select Modifier Keys
  3. Change Caps Lock to be Control
  4. Go to Mission Control
  5. Unset the C-up and C-down so that emacs gets it.

Emacs specific settings

It's also useful to remap the Command key into Meta in the emacs world, which you can do in your init.el with:

1
2
3
4
  (setq mac-option-key-is-meta nil)
  (setq mac-command-key-is-meta t)
  (setq mac-command-modifier 'meta)
  (setq mac-option-modifier nil)

Fonts

Another handy thing to do is to add fonts from homebrew. This isn't really necessary, but here for reference:

1
2
3
4
5
brew install svn
brew tap homebrew/cask-fonts
brew install font-inconsolata
brew install font-roboto-mono
brew install font-fira-code

Conclusion

This is a nice machine.

Previously

howto

Wrapping a executable in a function

Easy function wrapping

tags
openfaas
cli

Next

howto

K8 Dashboard on Docker Desktop

what’s going on

tags
kubernetes
docker