Skip to content

Commit

Permalink
Merge branch 'release/0.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
edvorg committed Nov 4, 2014
2 parents d801f42 + 40a3fa4 commit 1c59bb6
Show file tree
Hide file tree
Showing 3 changed files with 227 additions and 79 deletions.
110 changes: 83 additions & 27 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

** Description

req-package is a macro wrapper on top of [[https://github.com/jwiegley/use-package][use-package]].
It's goal is to simplify package dependencies management,
when using use-package for your .emacs.
req-package is a macro wrapper on top of [[https://github.com/jwiegley/use-package][use-package]].
It's goal is to simplify package dependencies management,
when using use-package for your .emacs.

** Usage

Load req-package:
Load req-package:

#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp
(require 'req-package)
#+END_SRC
#+END_SRC

Define required packages with dependencies using =:require= like this:
Define required packages with dependencies using =:require= like this:

#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp
(req-package dired) ;; you can omit this empty requirement because of dired-single

(req-package dired-single
Expand All @@ -31,22 +31,22 @@ Define required packages with dependencies using =:require= like this:
(req-package flymake-lua
:require (flymake lua-mode)
:config (...))
#+END_SRC
#+END_SRC

To start loading packages in right order:
To start loading packages in right order:

#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp
(req-package-finish)
#+END_SRC
#+END_SRC

** El Get

There'is another benefit over use-package - =el-get= support.
No more thinking about sources for your packages.
Just install and configure your el-get.
Here is example:
There'is another benefit over use-package - =el-get= support.
No more thinking about sources for your packages.
Just install and configure your el-get.
Here is example:

#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp
(require 'req-package'')

(req-package-force el-get
Expand All @@ -57,44 +57,100 @@ Here is example:
:config (print "gotham theme is here and installed from el-get"))

(req-package-finish)
#+END_SRC
#+END_SRC

You can always switch it off by =req-package-use-el-get= custom.
Also there, of course, could be dependencies between el-get and elpa packages

** More?

You can always extend list of package providers or change priorities if you want.
in which your packages are being installed.
It can be done by customizing =req-package-providers= list.
It's list of functions, which can install packages.

Here are some rules for one such function:

- check package presence at corresponding repo
- check whether it installed or not
- install that package if it is available and not installed
- return nonnil only if package is installed already or
successfully installed by this function"

** Migrate from use-package

Just replace all =(use-package ...)= with =(req-package [:require DEPS] ...)= and add =(req-package-finish)= at the end of your configuration file.
Just replace all =(use-package ...)= with =(req-package [:require DEPS] ...)= and add =(req-package-finish)= at the end of your configuration file.

** Note

All use-package parameters are supported, see use-package manual
for additional info.
All use-package parameters are supported, see use-package manual
for additional info.

However there is now need of =:ensure= keyword usage. req-package will add it automatically if needed.
However there is now need of =:ensure= keyword usage. req-package will add it automatically if needed.

Also there is a =req-package-force= function which simulates plain old use-package behavior
Also there is a =req-package-force= function which simulates plain old use-package behavior

More complex req-package usage example can be found at http://github.com/edvorg/emacs-configs.
More complex req-package usage example can be found at http://github.com/edvorg/emacs-configs.

** Contribute

Please, commit and pull-request your changes to =develop= branch.
Master is used for automatic repo package builds by melpa's travis-ci.
Please, commit and pull-request your changes to =develop= branch.
Master is used for automatic repo package builds by melpa's travis-ci.

** Things to be done

*** TODO take package dependencies from it's meta data

*** DONE el-get support
CLOSED: [2014-11-04 Tue 17:49]
- CLOSING NOTE [2014-11-04 Tue 17:49] \\
seems done and working

*** DONE use single documentation of package (DRY)
CLOSED: [2014-11-04 Tue 18:41]
- CLOSING NOTE [2014-11-04 Tue 18:41] \\
regenerated documentation

*** DONE fix issue with elpa packages installation
CLOSED: [2014-11-05 Wed 00:15]
- CLOSING NOTE [2014-11-05 Wed 00:15] \\
fixed. all packages are installing in req-package-finish loop

elpa packages remain uninstalled until loaded by use-package
it will be better to install them all at bootstrap launch

*** DONE el-get/elpa priority customization
CLOSED: [2014-11-05 Wed 00:50]
- CLOSING NOTE [2014-11-05 Wed 00:50] \\
fixed. can be done by =req-package-providers= list reordering

some users may needs customization for package sources
if some package is present at both elpa and el-get
we need options to choose where to get packages from

*** DONE custom software sources
CLOSED: [2014-11-05 Wed 00:50]
- CLOSING NOTE [2014-11-05 Wed 00:50] \\
fixed. can be done by adding new function to =req-package-providers=

alongside with elpa and el-get support it will be useful to add your own software sources
For example - simple wget-based url loader:

#+BEGIN_SRC emacs-lisp
(add-recipe 'test-package "https://raw.githubusercontent.com/edvorg/req-package/master/req-package.el")
(req-package test-package)
#+END_SRC

*** TODO el-get/elpa packages must be in priority over builtin ones

** Changelog

*** v0.7
- fixed some issues with packages installation
all packages will be installed at bootstrap time
- custom package providers support by =req-package-providers=
- priority feature for cross provider packages loading
you can choose, what to try first - elpa, el-get, or something else

*** v0.6
=el-get= support

Expand Down
Loading

0 comments on commit 1c59bb6

Please sign in to comment.