Skip to content

Instantly share code, notes, and snippets.

@tristanstraub
Created August 9, 2018 04:00
Show Gist options
  • Save tristanstraub/cc880ad948e7522f2126ad2da2bfb0f2 to your computer and use it in GitHub Desktop.
Save tristanstraub/cc880ad948e7522f2126ad2da2bfb0f2 to your computer and use it in GitHub Desktop.
el-get with ensure-package
(load "server")
(unless (server-running-p)
(server-start))
(require 'package)
(package-initialize)
(add-to-list 'package-archives '("melpa" . "https://stable.melpa.org/packages/"))
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
(add-to-list 'load-path (expand-file-name "el-get/el-get" "~/.emacs.d"))
(unless (require 'el-get nil t)
(setq el-get-install-branch "master")
(load-file (expand-file-name "el-get-install.el" "~/.emacs.d"))
(unless (file-directory-p el-get-recipe-path-elpa)
(el-get-elpa-build-local-recipes)))
(defun ensure-package (package)
(when (not (require package nil t))
(el-get 'sync package)
(require package nil t)))
(setq el-get-sources '(
;; (:name org-mode
;; :description "Org mode."
;; :type git
;; :url "git://orgmode.org/org-mode.git")
(:name annotate
:pkgname "bastibe/annotate.el"
:type github)
(:name seq
:pkgname "NicolasPetton/seq.el"
:type github)
(:name helm-ag
:pkgname "syohex/emacs-helm-ag"
:type github)
(:name helm-rg
:pkgname "microamp/helm-rg"
:type github)
(:name leuven
:pkgname "fniessen/emacs-leuven-theme"
:type github)
(:name counsel-dash
:pkgname "nathankot/counsel-dash"
:type github)
(:name cargo
:pkgname "kwrooijen/cargo.el"
:type github)
(:name rust-mode
:pkgname "rust-lang/rust-mode"
:type github)
(:name replace-colorthemes
:description "Replacement color themes."
:type github
:pkgname "emacs-jp/replace-colorthemes")
(:name js-lookup
:description "Lookup javascript symbols on MDN"
:type github
:pkgname "skeeto/js-lookup")
(:name swiper
:description "ido at point"
:type github
:pkgname "abo-abo/swiper")
(:name ido-at-point
:description "ido at point"
:type github
:pkgname "katspaugh/ido-at-point")
)
)
;; needed for ecb
(setq stack-trace-on-error t)
(setq el-get-verbose t)
;; org
(ensure-package 'org-mode)
(require 'ob-clojure)
(add-hook 'after-init-hook
`(lambda ()
;; remember this directory
(setq init-dir
,(file-name-directory (or load-file-name (buffer-file-name))))
;; load up the starter kit
(org-babel-load-file (expand-file-name "tristan.emacs/index.org" init-dir))
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment