fgallina’s Emacs configuration.
- Author: Fabián Ezequiel Gallina
- Contact: fabian at anue dot biz
- My Blog: http://www.from-the-cloud.com
This is just my Emacs configuration. It auto-installs all packages using mostly elpa and some from el-get.
For a glance of all installed packages check all `user-package’ declarations.
These are the necessary packages for all enabled plugins.
- Emacs 24.x
- Bazaar: for package downloads.
- CVS: for package downloads.
- Git: for package downloads and magit.
- Mercurial: for package downloads.
- SVN: for package downloads.
- leiningen 2.x: for nrepl and friends.
- python (2.6 or 2.7): for building jedi.
See “Disabling packages” section for a way to avoid some requirements.
Installation of all requirements in Arch is quite simple.
sudo pacman -S bzr cvs git mercurial subversion emacs python2
sudo apt-get install bzr cvs git mercurial subversion emacs python
When you meet all requirements, everything should install automatically after you launch Emacs. If some package fail because of a network connection failure or anything, restarting Emacs will continue installation from that point.
There are 3 non-required important files you might want to check out:
- ~/.emacs.d/secrets.el: This is a file I’m using to store my IRC password and other sensible stuff.
- ~/.emacs.d/pre-startup.el: This file might contain any lisp that’s intended to be run before all packages are loaded and initialized.
- ~/.emacs.d/post-startup.el: This file might contain any lisp that’s intended to be run after all packages are loaded and initialized.
If you are using jedi, you need to install a python environment for it to use. You can do so like this:
cd ~/.emacs.d/elpa/jedi-* make requirements PYTHON=python2 # or the python interpreter of your preference.
If you plan to use the clojure related packages you need to install
leiningen. Generally you want to do this manually by adding the
executable in your
$PATH. See http://leiningen.org/ for
If you don’t want to install some packages you can use
the pre-startup.el file to modify the
;;; pre-startup.el ;; Avoid installing/loading some packages. (setq my:disabled-packages '(ace-jump-mode jedi clojure-mode))
If you plan byte-compiling the init file (which is recommended) via
emacs-lisp-byte-compile command (i.e. not
in batch mode), be sure to eval
my:disabled-packages new value and
then eval the whole init.el buffer, so the
user-package macro is
expanded properly for newly enabled/disabled packages.
While this dotemacs is maintained with the idea that it could be reused by anyone, it’s still my dotemacs and it’s configured the way I like it. This means that there may be some stuff you could consider weird, so here is a non extensive listing of those and the ways you can prevent them.
God mode is awesome, it brings the modal bindings paradigm to Emacs without trying to change the bindings you’ve learned during all this time. The thing is that `god-mode` can be confusing, especially if you haven’t set it up yourself and are using this config out of the box. You can disable it by adding `god-mode` to your `my:disabled-packages` in the `pre-startup.el` file.
If you feel some bindings are doing weird things when working with parens or sexps, please check the `smartparens` configuration. If you are still not convinced about smartparens just add the following to You can disable it by adding `smartparens` to your `my:disabled-packages` in the `pre-startup.el` file.
Errors when copying or pasting stuff
I use Emacs on the terminal for the most part, and I have integrated it with the `xsel` utility to make it populate my X system clipboard when sending doing copy/cut/paste.
If you are experiencing errors with this: either install xsel, change the integration to use whatever utility you’d like or just disable the feature completely and let Emacs behave by default by adding this code in your `post-startup.el` file:
(setq interprogram-cut-function nil interprogram-paste-function nil)
Menu bar, scroll bar and tool bar
If you are new to Emacs you will probably want to have these things activated again, to restore then add the following in your `post-startup.el`:
(menu-bar-mode 1) (scroll-bar-mode 1) (tool-bar-mode 1)
If you find a configuration bug please report it in the github tracker. Any package bugs must be reported in their upstream bug tracker.
See each package located at
~/.emacs.d/elpa/ for their licenses. The
file is on the public domain.