1

I did install projectile from melpa and now want to give it try. So I fiddled together this lines to get projectile mode.

 (use-package projectile
   :config
   (setq projectile-enable-caching t)
   (global-set-key (kbd "C-c p f") 'helm-projectile)
   (projectile-global-mode)
   ) ;; end of use-package

I also did "touch ~/.emacs.d/.projectile". Now when I open init.el I have projectile minor mode. Actually whati expected... But when I do

;;     (use-package projectile
;;       :config
;;       (setq projectile-enable-caching t)
;;       (global-set-key (kbd "C-c p f") 'helm-projectile)
;;       (projectile-global-mode)
;;       ) ;; end of use-package

and start a new emacs instance and open init.el it still has projectile minor mode enabled. Now I wonder why is that? Where may this be configured? There is no other version (other then the installed-by-me elpa version) of projectile installed on my hosting machine.

1 Answer 1

3

Use use-package :disable prop

(use-package projectile
  :disabled t
  ...)

because you installed it from melpa, it's loaded automatically even if you comment out the code.

3
  • That seems to be a basic fact to know about the packaging system... Thanks for pointing out.
    – Matthias
    Commented Nov 7, 2014 at 21:15
  • Now that elpa loads projectile automatically can you point me to the emacs lisp code that enables projectile mode? The projectile manual says i have to either (projectile-global-mode) or (add-hook 'my-mode-hook 'projectile-on) to enabled it. Is emacs packaging doing this already for me? If so where, please?
    – Matthias
    Commented Nov 10, 2014 at 9:08
  • I know that for some packages emacs does this automatically activation. For example, if you go to .emacs.d/elpa you will see the packages installed. In each directory there will be a x-autoloads.el which is the code that's loaded when "activating" the package. For go-mode, for example, there is a (add-to-list 'auto-mode-alist (cons "\\.go\\'" 'go-mode)) list to enable it on go files in go-mode-autoloads.el. I don't have projectile installed so probably you will find it there.
    – rlazo
    Commented Nov 10, 2014 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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