I’m currently trying out spacemacs.
Here are a some short notes for setting in up on OS X and ironing out some problems.
If you have something like this in Emacs.app:
First of all, make sure you have powerline fonts installed.
Navigate to the font configuration in your .spacemacs file and change it to something like this:
"Fira Mono for Powerline" dotspacemacs-default-font '(14 :size :weight normal :width normal1.1) :powerline-scale
(or choose any of the fonts you like).
Also, navigate to
dotspacemacs/user-config and add:
setq powerline-default-separator 'arrow) (setq ns-use-srgb-colorspace nil)(
When using restclient.el, I ran into TLS issues due to missing CA certificaties.
This can be fixed by downloading
cacert.pem from curl and putting it somewhere. Then put the following in
require 'tls) (require 'gnutls) ("~/.emacs.d/etc/cacert.pem"))(add-to-list 'gnutls-trustfiles (expand-file-name
Regularly update the cert file.
Emacs can start a small server, making it possible to send it commands from the command line. Mostly, I use that to open files from the command line.
Start the server by putting this in your
emacsclient from the command line:
/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c -n $argv;
Obviously: create an alias for that.
-c tells emacs to create a new frame for the file,
-n the client not to wait until the frame closes.
I prefer the standard OS X behaviour of not closing the app when the last document closes. This also means that you don’t have to pay the hefty startup fine that spacemacs has every time. Luckily, Emacs behaviours are mostly written in elips, so you can just monkey-patch that behaviour.
Just put this in your
defun handle-delete-frame-without-kill-emacs (event) ("Handle delete-frame events from the X server." "e") (interactive let ((frame (posn-window (event-start event))) (0) (i (tail (frame-list))) (while tailand (frame-visible-p (car tail)) (not (eq (car tail) frame)) (setq i (1+ i))) (setq tail (cdr tail))) (if (> i 0) (t) (delete-frame frame ;; Not (save-buffers-kill-emacs) but instead: (ns-do-hide-emacs)))) when (eq system-type 'darwin) ( (advice-add 'handle-delete-frame :override #'handle-delete-frame-without-kill-emacs))
This probably better belongs into a layer.