My .emacs.d for macOS, Debian and Ubuntu. Originally derived from flyingmachine/emacs-for-clojure.
First clone the repository including submodules:
git clone --recursive [email protected]:luisgerhorst/.emacs.d.git ~/.emacs.dThen read the following:
-
Local Config
Some files contain user or machine-spcific options that will not be included in your git repository, remove the
.templateextension and edit them to contain all desired values. -
Python Autocompletion & Syntax Checking
The config is using the environments from
pyenv(usually located in~/.pyenv/versions). Ensure zlib is available (doxcode-select --installif not), then install pyenv on macOS usingbrew install pyenv.See customizeable variable
jedi:environment-rootfor current version used. Runpyenv install VERSIONto install a specific version (preferably the onejedi:environment-rootis set to) before opening any Python files.For detailed syntax checking with Flycheck's
python-pylintchecker install pylint. -
Dired
On macOS
gls(GNU-Version ofls) has to be in your$PATH. Dobrew install coreutils. If you want to use the defaultlschangeinsert-directory-program(is set inlisp/luis-files.el). -
Java
Install the JDK.
-
Scala
Make sure you have the JDK and
sbtinstalled (see Java section). Make sure sbt is configured for use with ensime. When in a project generate the.ensimefile usingM-x sbt-command ensimeConfigand start ensime withM-x ensimeto get syntax checking, autocompletion etc.. When you experience problems you may tryM-x ensime-server-update. -
TeX
Can be installed using the latest version of MacTeX.
-
Interactive Spell on Mac OS X
Install
aspellwithbrew install aspell. Then download the dictionaries for the languages you need fromftp://ftp.gnu.org/gnu/aspell/dict/0index.html(see README in downloaded folder for install instruction, you may needsudowhen doingmake install).Then
customizethe variableispell-dictionary, set it to the dictionary you want to use (e.g.de_DEfor German, runispell-change-dictionaryto see a list of available dictionaries and change the used one temporarily). -
Sending Mail
Here's the turorial that helped me when I set it up.
For connecting to a SMTP server that requires authentication
gnutlsis required, install it withbrew install gnutls
Install GNUPG to encrypt the file in which we'll store our login credentials and generate a key if you don't already have one.
brew install gnupg pinentry-mac gpg --full-gen-key
You can also import an existing key using
gpg --import private.asc.pinentry-macor a similar program is required.The credentials for the server are stored in
~/.authinfo.gpg, runtouch ~/.authinfo.gpg chmod 600 ~/.authinfo.gpg
to create it and set it's permissions properly. Open it in an editor that allows automatic encryption of
.gpgfiles (e.g. Emacs). Then insert the credentials in the following format:machine YOUR_SMTP_SERVER port YOUR_SMTP_SERVER_PORT login YOUR_SERVER_LOGIN password YOUR_PASSWORDYOUR_SMTP_SERVER_PORTis probably587,YOUR_SERVER_LOGINis your E-Mail adress. Now make sure you editlisp/lib/luis-mail-private.elto contain all variables required for sending mails. -
Receiving Mail
We'll use
mbsyncto fetch mail from the server, install it withbrew install isync
Now configure it, you can find my config in my dotfiles. Here's a turorial for switching from
offlineimaptombsync. Here's the man page. Now runmkdir ~/Maildir mbsync -aonce from the terminal to fill your maildir with messages.
When done, install
mu4e(ifmuis already installed reinstall it sinceEMACShas to be set, make surebrewis not wrapped bybrew-fileor something, you can do so by e.g. temporarily switching tobashif you usezsh) and index your maildir using the following commands:EMACS=$(which emacs) brew install mu mu index --maildir=~/Maildir
Ensure
mu4e(contained inmu) is loaded when Emacs starts. You can check for it usingM-x mu4e. If Emacs was installed using Cask, symlinkmu4eto.emacs.d/site-lispln -s /usr/local/share/emacs/site-lisp/mu/mu4e ~/.emacs.d/site-lisp/mu4eThen configure
mu4eaccording to your mail provider and machine. The fileslisp/lib/luis-mail-private.el.templateandlisp/luis-machine-local.el.templatealready contain the options you need.Optionally install
terminal-notifierusingbrew install terminal-notifierfor desktop notifications bymu4e-alert. -
Benchmark Init
cd site-lisp/benchmark-init-el make
Now open Emacs, all required packages will be installed automatically which may take a while.