Commit Graph

343 Commits

Author SHA1 Message Date
syl20bnr 2580e43c66 Add support for dumping Spacemacs
Create dump with:

   ./emacs --batch -l ~/.emacs.d/dump-init.el \
           -eval '(dump-emacs-portable "spacemacs.pdmp")'

Load dump with:

   ./emacs --dump-file=spacemacs.pdmp

User can require/load additional libraries in new dotfile function:

   dotspacemacs/user-load
2018-05-20 03:57:54 -04:00
syl20bnr 862e81e49a core: hide loading message at startup unless --debug-init 2018-05-20 02:44:34 -04:00
syl20bnr e9b8ed34c5 core: fix bug where layers.el files could be loaded multiple times 2018-05-20 02:33:28 -04:00
syl20bnr b58a1d7b73 core: fix bug where packages.el files were loaded multiple times 2018-05-20 02:32:57 -04:00
syl20bnr 59d8be19d8 core: fix not found packages with dotspacemacs-install-packages all
Temporary fix, need to find the root cause.
2018-01-25 00:11:15 -05:00
Aaron Jensen c86940c4f0 core: Use https for org package repo 2018-01-22 23:34:54 -05:00
syl20bnr 617d63095a core: install bootstrap and pre packages first
Fix issues with built-in org being lodaed before org-plus-contrib.
2018-01-22 11:33:13 -05:00
syl20bnr 1580dfd094 core: fix path to rollback slots 2018-01-22 11:23:59 -05:00
syl20bnr 723604d904 core: initialize Org earlier to prevent version conflicts
Should resolved all our issues with the wrong version of Org being loaded
before Org-plus-contrib! 🎉
2018-01-21 12:15:51 -05:00
syl20bnr 4ecd015fe8 core: process all post-init function after all the init functions
With this commit, the new loading order for package configuration is:
- pre-init functions for all packages
- init function of all packages
- post-init functions for all packages
2018-01-11 23:52:18 -05:00
syl20bnr 80a10f79db core: fix alphabetical order of package configuration loading
It was reversed in commit e9fb5285f4
2018-01-11 10:43:44 -05:00
syl20bnr e9fb5285f4 core: execute all pre-init function before init and post-init
Fixes loading order issues when declaring use-package hooks.

Fixes #9979
2018-01-10 23:33:15 -05:00
Igor Avdeev 709782bdc1 Fix handling of windows paths of package archives
- the configuration-layer//resolve-package-archives function was adding
  extra `http://` for windows paths
2018-01-10 00:13:01 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
syl20bnr 2ed3946d7b emacs-lisp: improve nameless configuration
- Change nameless prefix to > instead of default :
- Change toggle to SPC m >
- Set nameless separator to nil in order to make it work with any type or separator
- Add diminish unicode ⧁
- Define some default global aliases for Spacemacs source code
- Rename layer variable emacs-lisp-nameless-mode to emacs-lisp-hide-namespace-prefix
- Make variable nameless-current-name safe as a local variable for string values
- Set nameless prefix for core-configuration-layer.el
2017-12-17 23:30:24 -05:00
duianto 26c6623148 Remove stray characters from output-dir argument
The output-dir argument seems to have gotten some stray characters.
2017-12-01 18:44:28 +02:00
syl20bnr f290565098 core: new dotfile variable dotspacemacs-use-spacelpa
If non-nil then Spacelpa repository is the primary source to install
a locked version of packages. If nil then Spacemacs will install the lastest
version of packages from MELPA. (default nil)

The default value will be true when we bust all the major bugs.
2017-11-12 09:33:58 -05:00
syl20bnr a363f85d33 core: for elpa dir, replace branch name by a variable set in .lock
New variable configuration-layer-elpa-subdirectory set in .lock file.
Now users creating a branch based on develop or master won't reinstall
all the packages in a new elpa directory.
2017-11-01 23:23:34 -04:00
syl20bnr 8a5771559e core: change scope of elpa stable variables
make them public when they are used outside of core-configuration-layer.el
make them private when they are used only on this file.
2017-11-01 23:23:34 -04:00
syl20bnr 0ea72bcde7 core: fix computation of elpa directory
Use const input for function configuration-layer/elpa-directory
New const variables used as input:
- configuration-layer--elpa-root-directory
- configuration-layer--rollback-root-directory

Fix computation of elpa directory by using expand-file-name.

Fixes #9805
2017-10-31 00:35:18 -04:00
syl20bnr d15772fadc core: add support for GnuPG signed Spacelpa archives
New dotfile variable dotspacemacs-verify-spacelpa-archives
Default value is nil for now, users wanting to help testing this feature can
set it to t and delete the directory ~/.emacs.d/.cache/stable-elpa and restart
Emacs to download the Spacelpa archive and verify it.

Update function configuration-layer/stable-elpa-download-tarball to download
signature files as well.

Update function configuration-layer//stable-elpa-untar-archive to verify the
downloaded archive using epg library.

Example of signature files can be found here:
https://github.com/syl20bnr/spacelpa/releases/tag/v0.300
2017-10-30 00:57:48 -04:00
syl20bnr 41dcccc22b core: add spacemacs-buffer/error like spacemacs-buffer/warning
New function spacemacs-buffer/error that gather all the errors and then display
them in the startup buffer under a new list entry `Errors:`.
Add shortcut `e` to go to errors list entry.
New private function configuration-layer//error to wrap spacemacs-buffer/error
and increment the startup error count that is displayed in a red mode-line when
startup process finishes.
2017-10-29 22:01:39 -04:00
syl20bnr 247b63dac1 core: add `(please wait)` msg when downloading spacelpa 2017-10-29 21:47:08 -04:00
syl20bnr e63febeafd core: add optional parameter to spacemacs/set-mode-line
redisplay: it non nil then force refresh of the display
2017-10-29 21:43:43 -04:00
syl20bnr 2a11da4ad7 core: add check for gzip executable on Windows to install spacelpa 2017-10-29 21:39:35 -04:00
syl20bnr 65d5e42b8e core: add support for stable ELPA repository hosted on GitHub
Use the official spacelpa ELPA repository.
address: https://github.com/syl20bnr/spacelpa

ELPA repository configuration is now in a file called .lock at the root of the
git repository. Its goal is to setup the ELPA repositories for a given branch
and it should not be modified! The philosophy of Spacemacs is to never fork the
git repository and this lock file has been put in the repo on purpose.

Only the master branch will have a .lock file that points to spacelpa, the
develop branch won't use the stable ELPA repository and will continue to behave
like it always did.

BUT for testing purpose and until the first major version of Spacemacs that uses
the stable ELPA repo is released I push a .lock file to develop branch that
points to spacelpa.

I understand that some people can be annoyed by this so the variable
configuration-layer--elpa-archives can be overriden by putting a setq in your
dotfile in the user-init function like this:

  (setq configuration-layer--elpa-archives
        '(("melpa"    . "melpa.org/packages/")
          ("org"      . "orgmode.org/elpa/")
          ("gnu"      . "elpa.gnu.org/packages/")))
2017-10-29 01:20:25 -04:00
syl20bnr dc58801c7d core: refactor shadow mechanism
Shadowing is now control by layer property ':can-shadow' only.
can-shadow is a commutative relation, if layer1 can shadow layer2 then layer2
can shadow layer1.
the shadow operator is a binary operator accepting two layer names, it is not
commutative and the order of the operands is determined by the order of the
layers in the dotfile (like the ownership stealing mechanism).

If ':can-shadow' is set explicity to nil in the dotfile then the layer won't
shadow any layer.
For instance to install both ivy and helm layer:

   (setq dotspacemacs-configuration-layers
   '(
     ivy
     (helm :can-shadow nil)
     )

note that due to the commutative relation the above example can also be
written (in this case, ':can-shadow' should be read ':can-be-shawdowed'):

   (setq dotspacemacs-configuration-layers
   '(
     (ivy :can-shadow nil)
     helm
     )
2017-09-25 23:07:22 -04:00
syl20bnr 95699ee61c core: add layer shadowing system
Layers can now declare in their layers.el file that they shadow one or more
layers using the following functions:

- configuration-layer/shadow-layers
- configuration-layer/shadow-layer

Those function are commutative so:
    (configuration-layer/shadow-layer 'layer1 'layer2)
is the same as
    (configuration-layer/shadow-layer 'layer2 'layer1)
and means that
layer1 shadows layer2
and
layer2 shadows layer1

The typical use-case is helm and ivy layers. Helm shadows the ivy layer and
Ivy shadows the helm layer.

Shadowing is sensitive to the order of declaration of layers in the dotfile,
for instance:

    (setq dotspacemacs-configuration-layers '(
      helm
      ivy
     ))

means that ivy shadows helm so helm layer is effectively ignored,
whereas

    (setq dotspacemacs-configuration-layers '(
      ivy
      helm
     ))

means that helm shadows ivy so ivy layer is effectively ignored.

This mechanism can be turned off using the :can-shadow keyword:

    (setq dotspacemacs-configuration-layers '(
      ivy
      (helm :can-shadow nil)
     ))

means that both ivy and helm layers will be installed (not recommended in this
case)

Note that the `:can-shadow` mechanism will be fully implemented in a next
commit.
2017-09-21 23:56:09 -04:00
syl20bnr 82220fce3a Remove old wording "contribution layer" 2017-08-28 11:33:55 -04:00
Alex Coventry 937a7c3f0c Fix reference to cfgl-package-distant-p 2017-08-27 22:12:58 -04:00
syl20bnr 2bd08116aa core: fix update of packages
t parameter is not needed anymore since the passed list distant-packages is
already filtered to contain only used packages.

Fixes #9420
2017-08-13 13:21:54 -04:00
syl20bnr 06d7ddbeea core rename argument to NO-CONFIRMATION
instead of `always-upate`.
2017-08-12 20:48:35 -04:00
syl20bnr 6afa753848 core: remove variable configuration-layer--used-distant-packages
- remove variable configuration-layer--used-distant-packages
- rename function configuration-layer//get-distant-packages to
  configuration-layer//filter-distant-packages to better reflect what it does
- Add argument PREDICATE to configuration-layer//filter-distant-packages
- New cfgl-package methods: cfgl-package-used-p and cfgl-package-distant-p
- Add unit tests
2017-08-12 20:48:35 -04:00
JAremko b7955d66d4 Assume "no" for lazy installation in the --batch mode 2017-07-25 01:56:13 +03:00
Eivind Fonn f4b53d2a4f Rename :depends to :requires 2017-07-03 09:54:53 +02:00
syl20bnr e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
Eivind Fonn 2ee6c2c977 Fix: Better checking of used packages 2017-07-02 09:41:38 -04:00
Eivind Fonn db4adde089 Fix: Check owner of dependent packages 2017-07-02 09:41:38 -04:00
Eivind Fonn 69b5f83d5a Fix: Check dependencies for owned packages too
Fixes #9134
2017-07-02 09:41:38 -04:00
syl20bnr 3419247ee8 core: remove unused functions
configuration-layer/load-or-install-protected-package
configuration-layer/load-or-install-package
2017-07-01 18:06:47 -04:00
syl20bnr dfad77dc47 core: update some doc strings
Rename arguments PKG to PKG-SPECS for consistency with make-layer function.
2017-07-01 17:48:31 -04:00
syl20bnr cc0d8cafb2 core: rename configuration-layer/sync to configuration-layer/load
Replace the optional argument `no-install` by a global variable named
`spacemacs-sync-packages`.
Rename the hooks to reflect the renaming of the function.
Rename the flag `--no-sync` to the more explicit `--no-package-sync`
2017-07-01 10:54:37 -04:00
ZarsBranchkin 1e340f62f3 add --skip-sync startup flag
This adds a new startup flag `--skip-sync`. It will force spacemacs to skip
package synchonization. This can be useful in cases when you're working under
poor or restrictive network.

Thanks, @zaript, for this idea!
2017-07-01 09:54:21 -04:00
Eivind Fonn fcf186faff Fix cfgl-layer docstring (concat not evaluated) 2017-06-23 09:27:05 +02:00
Eivind Fonn 08561d8631 core: implement :depends for package declarations
This replaces the older pattern
:toggle (configuration-layer/package-usedp ..)

This implementation ensures that :disabled-for honors dependent packages, i.e.
if package a depends on package b, which is owned by layer c, and layer c is
disabled for layer d, then neither package a nor b will be configured for layer
d. Previously, this was only true for package a, but not b.

This commit also fixes:

- configuration-layer/describe-package now shows which post-init and pre-init
  functions are disabled, if any
- Does not recreate all layer objects unconditionally when calling
  configuration-layer/discover-layers. Previously, this led to all layers being
  recreated after e.g. `SPC h SPC`, without any of the dotfile information.
  Since this information is now necessary for
  configuration-layer/describe-package, it’s important that we don’t clear the
  indexed layers when invoking this function.
2017-06-22 11:53:05 +02:00
Eivind Fonn 9c9bdf749a Don’t look in .spacemacs.d/layers if it doesn’t exist 2017-05-29 11:52:31 +02:00
Ben Gamari 1320f8e8fa Resolve symlinks when warning about duplicate layers
This allows the user to, for instance, include the spacemacs tree as a
git submodule of their configuration repository without seeing
superfluous warnings.
2017-05-24 12:26:25 +02:00
MadAnd 9f3e656c8f Add support for building multi-file local packages with Quelpa
At the moment a Quelpa recipe like `(recipe :fetcher local)` is being translated
to something like
`(recipe :fetcher file :path "my-layer/local/my-pkg/my-pkg.el")`. So we can
build simple single-file local packages.

This commit changes it to translate to the package directory instead of exact lisp
file, so we can build multi-file local packages. Thus, the above example will be
translated to `(recipe :fetcher file :path "my-layer/local/my-pkg")`.

Also, add the relevant info to LAYERS.org.
2017-05-14 13:39:02 -04:00
Robert (Robby) O'Connor 9660a90022 grammar fix
This was introduced in a85634c. The grammar wasn't correct here -- so this fixes it.
2017-04-17 19:49:16 -04:00
syl20bnr 252547aa81 core: add support for :location keyword in dotspacemacs-themes
New functions:
- configuration-layer/get-location-directory which return the location on disk
given a location
- spacemacs//get-theme-directory which returns the location on disk of the
theme

Add note in documentation to warn about the directory name when :location local
is used, the directory name is the package name not the theme name.
2017-02-05 23:47:17 -05:00