Files
kernel_Notes/Zim/Utils/emacs/el-get/blog.txt
2012-08-08 15:17:56 +08:00

45 lines
2.5 KiB
Plaintext

Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2012-01-07T15:41:21+08:00
====== blog ======
Created Saturday 07 January 2012
http://tapoueh.org/emacs/el-get.html
Of course, my emacs setup is managed in a private git repository. Some people on #emacs are using git submodules (or was it straight import) for managing external repositories in there, but all I can say is that I frown on this idea. I want __an easy canonical list of packages I depend on to run emacs__, and I want this documentation to be usable as-is. Enters el-get!
(setq el-get-sources
'((:name bbdb
:type git
:url "git://github.com/barak/BBDB.git"
:load-path ("./lisp" "./bits")
:info "texinfo"
:build ("./configure" "make"))
(:name magit
:type git
:url "http://github.com/philjackson/magit.git"
:info "."
:build ("./autogen.sh" "./configure" "make"))
(:name vkill
:type http
:url "http://www.splode.com/~friedman/software/emacs-lisp/src/vkill.el"
:features vkill)
(:name yasnippet
:type git-svn
:url "http://yasnippet.googlecode.com/svn/trunk/"))
(setq my-packages
(append
'(el-get escreen switch-window mailq cssh auto-complete)
(mapcar 'el-get-source-name el-get-sources)))
(el-get 'sync my-packages)
So now you have a pretty good documentation of the packages__ you want installed__, where to get them, and how to install them. For the advanced methods (such as elpa or apt-get), you basically just need the package name. When relying on a bare git repository, you need to give some more information, such as the URL to clone and the build steps if any. Then also what features to require and maybe where to find the texinfo documentation of the package, for automatic inclusion into your local Info menu.
The good news is that not only you now have a solid readable description of all that in a central place, but this very description is all (el-get) needs to do its magic. This command will check that each and every package is installed on your system (in__ el-get-dir__) and if that's not the case, it will actually install it. Then, it will init the packages: that means caring about the load-path, the Info-directory-list (and dir texinfo menu building) the loading of the emacs-lisp files, and finally it will require the features.