Skip to content
My emacs config using use-package
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
custom
external
snippets
themes
.gitignore
LICENSE.md
README.org
coffeelint.json
diredful-conf.el
emacs.randr.sample.el
init.el
install
xinitrc.sample

README.org

emacs config

Emacs Version tested: 24.3.1 (stable) & 25.0.50.2 (dev branch)

Installation

Clone my repo

git clone https://github.com/map7/emacs-config.git ~/.emacs.d

Run installation script

cd ~/.emacs.d
./install

Start emacs

emacs

List packages (Note: M-x is emacs way of saying Alt + x)

M-x list-packages

Install use-package with

M-x package-install use-package

Then restart emacs and it should start building the packages, if it asks you to build pdf-tools say yes and in the compile buffer it will show the results. If this compile is needed then after the compile is finished you will need to restart emacs again for the final run of packages.

Dark-lord-theme

The dark lord theme is loaded by default.

Iconised modeline

A nice iconised based modeline. Tries to save on modelin re

Setup

The package all-the-icons is needed. This package has been added to the init.el file and should be automatically installed.

The next step must be done manually. You will need to download and install the fonts and icons from the following link: all-the-icons.el/fonts

Linux

Clone

cd ~/src
git clone https://github.com/domtronn/all-the-icons.el.git

copy fonts into (for all users)

sudo cp all-the-icons.el/fonts/*ttf /usr/local/share/fonts

or (for a specific user)

cp all-the-icons.el/fonts/*ttf ~/.fonts

manually rebuild the font cache

fc-cache -fv
Use

To manually invoke the iconised modeline theme:

M-x dark-lord-modeline

Manually

Install my sub modules

git submodule init

Based upon Cask & Pallet.

Install cask

curl -fsSkL https://raw.github.com/cask/cask/master/go | python

Add path to your ~/.zshenv or ~/.bashrc file

# Add Cask to the path
export PATH="$HOME/.cask/bin:$PATH"

Run cask which will install the pallet package management tool

cd ~/.emacs.d
cask install

Optional - Initialise your cask file from within emacs

M-x pallet-init

exwm - Emacs X Windows Manager notes

Setup the session

Copy the xinitrc.sample

cp xinitrc.sample ~/.xinitrc

Link it to .xsession to work with a desktop manager like lightdm as the default session.

ln -s ~/.xinitrc ~/.xsession

Autostart GUI apps

To autostart things like dropbox or spideroak you need to put them into a file called ~/.emacs.autostart.el and this will automatically load.

Here is an example of starting dropbox & spideroak

;; Autostart Dropbox
(call-process-shell-command "(sleep 10s && ~/.dropbox-dist/dropboxd) &" nil 0)
(call-process-shell-command "(sleep 10s && SpiderOakONE) &" nil 0)

Multiple screens

Create a ~/.emacs.randr.el file and put the following

(setq exwm-randr-workspace-output-plist '(0 "LVDS1" 1 "LVDS1" 2 "DP2"))
(add-hook 'exwm-randr-screen-change-hook
         (lambda ()
           (start-process-shell-command
            "xrandr" nil "xrandr --output DP2 --right-of LVDS1 --output DP2 --mode 1920x1080")))
(exwm-randr-enable)

Remember to change the LVDS1 & DP2 to your screens which you can find out by typing in xrandr at the command line and looking for the active screens.

flycheck configure

Installing

npm install -g coffeelint eslint
gem install scss_lint rubocop

Add this to your ~/.emacs.d/.emacs.custom.el file.

(custom-set-variables
 '(flycheck-ruby-rubocop-executable "/usr/local/rbenv/shims/rubocop" )
 '(flycheck-javascript-eslint-executable "/opt/node-v5.5.0-linux-x64/bin/eslint")
 '(flycheck-coffee-coffeelint-executable "/opt/node-v5.5.0-linux-x64/bin/coffeelint")
 '(flycheck-coffeelintrc "~/coffeelint.json"))

Make the config file for coffeelint

coffeelint --makeconfig > coffeelint.json

Requirements

ag - Compile the silver searcher, first check if you already have the ‘ag’ command

flyspell - install ‘ispell’

ripgrep - install ‘ripgrep’

Specific package notes

paradox

If you want to use the paradox package list instead of the normal boring listing then you have to make a file ~/.emacs.paradox.el and add the following

(setq paradox-github-token TOKEN)

Where TOKEN is your github token.

Yasnippet + ruby

For ruby mode I use enh-ruby-mode, which is just a symlink of ruby-mode snippets. I’ve also added all the rails snippets to this as well.

org-clock-csv

Add the following to your crontab

# Export all my timesheets to a csv file
00 5    * * *   map7    /usr/bin/emacs -batch -l ~/.emacs.d/init.el -eval "(org-clock-csv-batch (org-agenda-files nil t))" > /home/map7/timesheets.csv

References

http://crypt.codemancers.com/posts/2013-09-26-setting-up-emacs-as-development-environment-on-osx/

Issues

Projectile not finding files

Try to invalidate the project cache, first sit in a file within a project dir

C-c p i

changelog

09/02/2015

Added

  • sunshine - weather
  • symon - system monitor, replaces gkrellm
  • ox-reveal - reveal.js presentation tool
You can’t perform that action at this time.