emacs-for-scala
emacs-for-scala copied to clipboard
using elpa and melpa installing
Hi,
I am using your emacs configs, and I am thankful. I was wondering why you are not using emacs repositories for plugin install. This can make the whole git branch smaller.
Glad it's helpful to you!
Honestly, I suspect it would be much cleaner to use Emacs repositories, but I wasn't familiar with them when I started, and haven't had the chance to go back and clean up. OTOH, it's nice to be able to have the whole config and it's dependencies in one download...
Frankly I don't know how to do it now that I have changed a lot since I got your repository but if you look at my init file you see that I have function that checks if the plugins are installed or not and then it installs them in case they are not there.
This is the function: ############################ ;; This part installs the mentioned packages in my-packages if they are not installed just once and for all (defvar my-packages '(scala-mode2 ensime sbt-mode dash auto-complete flymake table multiple-cursors move-text magit linear-undo tramp dired-details ace-jump-mode dirtree window-number) "A list of packages to ensure are installed at launch.")
(defun my-packages-installed-p () (loop for p in my-packages when (not (package-installed-p p)) do (return nil) finally (return t)))
(unless (my-packages-installed-p) ;; check for new packages (package versions) (package-refresh-contents) ;; install the missing packages (dolist (p my-packages) (when (not (package-installed-p p)) (package-install p)))) ###########################
as you can see before this function I have added melpa elpa and marmalade repositories.