0

I have trouble to understand how to get projectile to work in emacs.

When I first started I am under the impression that I should use package manager like cask to download packages from ELPA.

I did that and I have the CASK file and ~/.cask directory created.

However when I check the projectile website about how to activate it, I do not get much of information.

It simply says:

Installation

The recommended way to install Projectile is via package.el.

I think I am confused at this point. Do I need both cask and package.el to manage the packages? In my situation what is the best way to enable projectile?

5

Package.el is a builtin package manager that can be used to install emacs packages.

Cask is an Emacs Lisp project management tool, similar to Maven or Leiningen. It aims to control and automate the entire life cycle of an Emacs Lisp package, including dependency management, packaging, distribution and testing. You can use Cask to manage your emacs your emacs packages.

For your emacs configuration, modifiy your init file and add:

(require 'cask "/the/complete/path/to/your/cask.el/file/")
(cask-initialize)

Inside the Cask file, write the packages you want to be installed, example:

(source "melpa" "http://melpa.milkbox.net/packages/")
(source "gnu" "http://elpa.gnu.org/packages/")
(source "marmalade" "http://marmalade-repo.org/packages/")

(depends-on "ac-js2")
(depends-on "adaptive-wrap")
(depends-on "ag") 
(depends-on "bind-key")
(depends-on "cask")
(depends-on "dash")

Then ask Cask to install those emacs packages for you with: cask install.

  • After I read more about it, it seems to me that cask is more for package development and package.el is for installing packages in emacs. Is it correct? If so, as a emacs user, should I ditch cask and switch to just package.el? Sorry, I am still very unfamiliar with the emacs ecosystem – Anthony Kong Mar 24 '15 at 6:29
  • @AnthonyKong I've edited my answer for more explanations. But yes, some ppl just use Package.el for managing emacs packages, some other ppl use Cask. – Nsukami _ Mar 24 '15 at 6:33
  • @AnthonyKong Yes. As an emacs user you should use package.el unless you have a specific reason to use something else. – Malabarba Mar 24 '15 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.