Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using elpa and melpa installing #1

Open
mmrezaie opened this issue Jul 3, 2014 · 2 comments
Open

using elpa and melpa installing #1

mmrezaie opened this issue Jul 3, 2014 · 2 comments

Comments

@mmrezaie
Copy link

mmrezaie commented Jul 3, 2014

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.

@michaelpnash
Copy link
Owner

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...

@mmrezaie
Copy link
Author

mmrezaie commented Jul 4, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants