-
Notifications
You must be signed in to change notification settings - Fork 41
InstallingEproject
I use Emacs 23 (Emacs from CVS), so I know Emacs 23 works. It probably also works on other versions of Emacs, but I haven’t personally tested that extensively. Patches welcome!
Anyway, start by getting eproject:
[~/some-directory] $ git clone git://github.com/jrockway/eproject.git eproject
Then, tell emacs about eproject by editing your .emacs (or equivalent) to include:
(add-to-list 'load-path "~/some-directory/eproject")
(require 'eproject)
(require 'eproject-extras)
That’s all you need to do. After restarting emacs, you should be able to say M-x customize-group eproject
to customize eproject further. You will also want to define project types, which is described on the ProjectTypes page.
I also set up global keybindings for all the variants of the eproject functions:
;; eproject global bindings
(defmacro .emacs-curry (function &rest args)
`(lambda () (interactive)
(,function ,@args)))
(defmacro .emacs-eproject-key (key command)
(cons 'progn
(loop for (k . p) in (list (cons key 4) (cons (upcase key) 1))
collect
`(global-set-key
(kbd ,(format "C-x p %s" k))
(.emacs-curry ,command ,p)))))
(.emacs-eproject-key "k" eproject-kill-project-buffers)
(.emacs-eproject-key "v" eproject-revisit-project)
(.emacs-eproject-key "b" eproject-ibuffer)
(.emacs-eproject-key "o" eproject-open-all-project-files)
This uses the prefix C-x p
for all eproject commands. If a lowercase letter is typed, the command will prompt for a project. If it’s uppercase, the command will operate on the project of the current buffer. (The current-buffer bindings should probably be local… but I am very lazy…)