Commit graph

128 commits

Author SHA1 Message Date
syl20bnr
7a2e604741 core: remove 'post value for :step property
post value for package :step property is both useless and considered
harmful. It would hijack the determinism of the loading order.

'pre value is used very very rarely and I even think it is not even
used since most of the time a package that must be loaded in pre step
is a bootstrap package. But we keep 'pre since it can be useful to
have it for _exceptional_ cases.
2015-09-24 00:02:02 -04:00
syl20bnr
5402dae81b core: add new :location value -> built-in
Can be used to configure built-in packages
2015-09-23 22:01:47 -04:00
syl20bnr
f294ba3887 core: remove 'private value for :location
While doing the tests I encountered an edge case where a package owned
by the dotfile could be passed either a 'private or 'local location
which is ambiguous (moreover where do we put packages with 'local
location ?).

We remove the ambiguity by removing the 'private value and push the
path ~/.emacs.d/private/local/pkg/ when the owner of a local
package PKG is the dotfile.

When the owner of a local package is a layer then the load path is
in the "local" subdirectory of the layer directory. It adds no value
to use the old 'private location in this case.
2015-09-20 00:49:18 -04:00
Eivind Fonn
92c792c18e Allow local packages without owner 2015-09-19 18:44:19 -04:00
syl20bnr
ff2ff60830 core: fix configuration-layer/create-layer
Missing name parameter for configuration-layer//copy-template
2015-09-19 01:37:45 -04:00
syl20bnr
c111ff24af core: make private location work with dotfile owner 2015-09-19 01:36:48 -04:00
Eivind Fonn
c169b78eed Add private package location 2015-09-19 01:11:11 -04:00
syl20bnr
3f18a09560 core: install and uninstall package from package-alist
Consult the archive only when the user actually update the packages.
Fixes #2956
2015-09-17 23:06:43 -04:00
Eivind Fonn
fa32b9be5c More flexible additional packages
When the package already exists, use configuration-layer/make-package
to copy information into the existing package object.

This allows overwriting location, step and excluded, but NOT owner,
pre-layers or post-layers.
2015-09-17 22:32:54 -04:00
Robert O'Connor
b4e6e52d0e Remove Tromey.
Fixes #3049
2015-09-16 21:41:37 -04:00
justbur
02fbfbe74f core-conf-layer: Use NOSAVE for pack. update (v25)
Should fix #2849. The new package-delete tries to save changes to the
selected package variable during the update process and this can cause
conflicts with how spacemacs wants to update packages (and even lead to
the .spacemacs file being deleted. This is also unnecessary, because we
are only deleting the packages temporarily to be installed at the next
boot, so there should be no need to update this variable.

This change only affects Emacs 25 users.
2015-09-16 21:41:08 -04:00
Bar Magal
b4c10a4749 Fix update error when a distant package is unavailable
Instead of error, show a warning that the unavailable package(s) were
skipped. This should handle situations were a package is temporarily
unavailable from MELPA (or other sources).
2015-09-16 21:38:40 -04:00
Eivind Fonn
a764eb4eb9 Fix version injection in home buffer
Don't inject version if banner is nil
2015-09-13 22:54:16 -04:00
syl20bnr
cd50d9c069 core: defer distro insertion in home buffer 2015-09-11 23:14:16 -04:00
syl20bnr
77161bd591 core: restore default mode line in home buffer 2015-09-11 23:04:01 -04:00
justbur
6eab954afe Use + instead of ! for layer categories
Helm seems to treat "!" specially in pattern matching, so having a ! in
the pattern string when traversing directories is problematic. This
change fixes #2737, because as far as I can tell "+" has no special
meaning in a helm pattern.

Of course, we can choose a different character, but I'm fond of "+" as
representing "more layers here".
2015-09-11 00:13:51 -04:00
syl20bnr
c17db0dcb0 core: minor update of warning message when a layer does not exist 2015-09-09 23:45:04 -04:00
justbur
cc9287863b core: Fix #2952 by not loading missing layer
This issues a warning if the layer was declared in the dotfile but not
found through the layer discovery mechanism.
2015-09-09 23:45:04 -04:00
syl20bnr
6b33031dc5 core: dotspacemacs-distribution, spacemacs-core layer and rename contrib
- Rename contrib directory to layers
- Add new variable dotspacemacs-distribution
- Move spacemacs layer to layers/!distribution
- New layer spacemacs-core in layers/!distribution
- User can now set dotspacemacs-distribution to spacemacs or
  spacemacs-core (default spacemacs)

spacemacs-core is very lightweight layer sufficient to build upon
spacemacs.
2015-09-07 23:44:43 -04:00
syl20bnr
37609161c8 tests: Add configuration layer functional tests 2015-09-07 19:42:22 -04:00
syl20bnr
555927c7ec core: use package-alist to resolve orphans
instead of the downloaded package archive. It fixes a case where
a package maintainer removes a dependency D of a package P and spacemacs
detects it which has the effect of deleting the obsolete package D, but
package-alist is not yet updated, because package-alist is updated only
when P is reinstalled (or upgraded).
2015-09-07 01:06:27 -04:00
syl20bnr
8adc82d1ae core: actually read :disabled-for layer property
Also it is not need to pass a list, example:

```
(setq dotspacemacs-configuration-layers
   '((auto-completion :disabled-for org git)))
```

Will disable auto-completion for org and git layers.
2015-09-03 13:17:02 -04:00
syl20bnr
88d30d7074 core: add :disabled-for keyword for declared layers
Example:

(setq dotspacemacs-configuration-layers
'((auto-completion :disabled-for (org))))

Will not run any org/pre-init-xxx or org/post-init-xxx functions where
xxx is a package owned by the auto-completion layer.

Limitation:

If ownership of an auto-completion package P is stolen by another layer L
then :disabled-for must also be declared with L, otherwise the P will
be configured for org.

(setq dotspacemacs-configuration-layers
'((auto-completion :disabled-for (org))
  (L :disabled-for (org)))

The user should not change the default owner of a layer unless really
required (for instance to use his own fork).
2015-09-02 23:10:30 -04:00
syl20bnr
719080f533 core: rename configuration-layer/filter-packages to
configuration-layer/filter-objects
2015-09-02 23:10:30 -04:00
Ben Booth
a8582813c0 fix typo 2015-08-26 21:57:22 -04:00
syl20bnr
6318f009bc core: add new function to allow a layer to add other layers
- configuration-layer/declare-layers
- configuration-layer/declare-layer

These functions can be used in the config.el file of a layer to add
required layers.

For instance the react layer needs both html and javascript layers.
salt layer needs the yaml layer (see the following commits)
2015-08-26 02:41:54 -04:00
syl20bnr
a8f6afaf13 core: fix resolution of orphan packages
Fix a bug were distant packages with no owner were not deleted.
2015-08-25 22:52:26 -04:00
syl20bnr
d255cae4b8 core: refactor layer loading
Prepare the field for some kind of layer prerequisites required by
react and yaml layers
2015-08-25 22:28:30 -04:00
syl20bnr
8a5f454c32 core: fix installation of package dependencies 2015-08-15 00:08:21 -04:00
syl20bnr
50b3b4c99a core: add support for recipe update 2015-08-15 00:07:56 -04:00
syl20bnr
437a819ea1 core: inline recipe in package list
It is now possible to override the recipe in a custom layer.

For instance to override the recipe R for package P in layer L
In a private layer L' put at the end of dotspacemacs-configuration-layers
and listing P with an init function for P, L' becomes the ower of
P and the recipe R' defined in L' overrides the recipe R.
2015-08-14 15:31:22 -04:00
justbur
568e464ca3 Fix #2148: Update failure in Emacs 25
The `package-delete` function refuses to delete a package that is a
depency by default, which prevents the spacemacs update function from
working most of the time.

This commit sets the flag to force deletion for Emacs 25.
2015-08-14 14:39:34 -04:00
syl20bnr
e8072b0057 Fix returned local dir value in python and rcirc layers 2015-08-13 09:02:03 -04:00
syl20bnr
62c6462ae9 core: fix nil :owner on package dependencies
Fixes #2643
2015-08-13 09:00:18 -04:00
syl20bnr
b45f3b0d0a core: the owner of a package can override some properties
Allowed properties to be overridden are: location, step and excluded
This mechanism allow the user to alter the location of a given
package, for instance if she wants to use her own fork instead of the
version in ELPA.

Note that for now there is no easy way to override the package recipes.
2015-08-13 01:23:39 -04:00
syl20bnr
1c8d90c856 core: add support for quelpa recipes 2015-08-12 23:56:24 -04:00
syl20bnr
1514c6e7d3 core: fix bug in package-usedp
It returned t even if the package has no owner.
Fixes #2601
2015-08-11 23:25:00 -04:00
syl20bnr
4148fdff56 core: add support for local directory 2015-08-11 19:45:28 -04:00
syl20bnr
e2bdc25396 core: fix mandatory package and extension list variables 2015-08-10 21:22:28 -04:00
Robert O'Connor
3f7dab0eeb Change elpa to use http.
GNU is having issues with HTTPS right now.

Fixes #2596
2015-08-09 21:52:47 -04:00
syl20bnr
b7205ebd49 core: fix load file error with dotspacemacs-additional-packages 2015-08-09 14:47:19 -04:00
syl20bnr
88143a33fa core: correctly handle packages owned by the dotfile
i.e. packages listed it dotspacemacs-additional-packages
2015-08-09 11:38:15 -04:00
syl20bnr
9ac2d54423 core: correctly make excluded packages 2015-08-09 11:34:35 -04:00
syl20bnr
51807654a1 core: package-list-v2 fix packages update
Ready to be merged in develop
2015-08-09 00:59:13 -04:00
syl20bnr
64be291221 core: rename some function arguments to more explicit pkg-name 2015-08-09 00:59:13 -04:00
syl20bnr
88a6ddbe37 core: package-list-v2 fix orphan deletion 2015-08-09 00:59:12 -04:00
syl20bnr
f0985162c6 core: package-list-v2 fix helm-spacemacs 2015-08-09 00:59:12 -04:00
syl20bnr
00fc8f9502 core: package-list-v2 fix install of packages 2015-08-09 00:59:11 -04:00
syl20bnr
b887a21bb6 core: package-list-v2 working loading, still error at install time 2015-08-09 00:59:11 -04:00
syl20bnr
aa2669ee9c core: package-list-v2 install and orphan detection
Still need to clean the orphan detection though

Packages are not configured for now
2015-08-09 00:58:48 -04:00