cnd
cnd

Reputation: 33784

How to make my packages to install right after el-get (using el-get)

There is el-get emacs project which is something alike package manager.

I have in my init.el :

;; ==== el-get stuff ========================================================
(add-to-list 'load-path "~/.emacs.d/el-get/el-get") 
  (unless (require 'el-get nil t) 
    (url-retrieve "https://raw.github.com/dimitri/el-get/master/el-get-install.el" 
                  (lambda (s) 
                    (end-of-buffer) 
                    (eval-print-last-sexp))))
;; ==== el-get ==============================================================
(setq my-packages 
      (append 
       '(nav) 
       (mapcar 'el-get-source-name el-get-sources))) 
(el-get 'sync my-packages)

So in first run it will install el-get if it's not installed and it works, in the next step I want it install nav (emacs package) using el-get but it doesn't work in first run (right after el-get installation) even it runs even before installation is finished.

How can I make it alike: First run -> install el-get -> install my package?

I think core question here is how to wait until el-get will be installed?

Upvotes: 2

Views: 2165

Answers (2)

Netsu
Netsu

Reputation: 41

You maybe look for getelget.el

Just set el-get-packages, el-get-sources;

;; path to local config                                                                                                                                                                                            
(add-to-list 'load-path
             (concat
              (file-name-as-directory user-emacs-directory) "site-lisp/"))

(load-library "getelget.el")

Also you may use this function

(el-get-sync)

Upvotes: 4

kindahero
kindahero

Reputation: 5877

I use el-get to manage all my package. I like it very much. This is the modified snippet in my init.el

(unless (require 'el-get nil t)
  (setq el-get-install-branch "master")
  (with-current-buffer
      (url-retrieve-synchronously
       "https://raw.github.com/dimitri/el-get/master/el-get-install.el")
    (end-of-buffer)
    (eval-print-last-sexp))
  (el-get-emacswiki-refresh el-get-recipe-path-emacswiki t))

Having this around in init.el, if i go to any new computer I just need to put new init.el in place and fire up emacs.

The above snippet checks weather el-get is available or not. if its not available it installs rigtaway.

once el-get comes down it will take of rest of the packages.

Upvotes: 2

Related Questions