Mainly adds a check to make sure the working directory is clean before
switching versions. The automatic update should not remove changes by
the user. They can do that manually if they wish.
Also restructures the function to make it a little easier to follow.
Add a spacemacs update button to the spacemacs buffer, and relabel the
package update button to read "Update Packages". This will hopefully
resolve some confusion about updating spacemacs vs. updating the
packages.
I also tweaked the switch-to-version function to make it a little more
verbose to use it for the spacemacs update button.
Catch errors in executed function and signal them to the user in the
spacemacs buffer. We don't want loading to silently fail because there
is a problem in dotspacemacs/user-config for example.
1. Make sure debug-on-error stays on
2. Force verbose loading
3. Detect long requires and loads (with --timed-requires)
4. Start profiler (with --profile)
The dotfile says that setting the major-mode leaders to nil will disable
the functionality, but there were a couple of places where that option
was not being respected.
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.
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.
This is how evil-leader gets `SPC m` to work for mode specific bindings,
and we need to mirror this step for `M-m`. This is big change, but in
order for `M-m` to work properly we need to remap it to the mode-map
whenever possible.
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.
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.
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).
If spacemacs encounters errors on the initial load of the user
.spacemacs file, now defaults to loading the default template.
Additionally, temporarily suspends pruning of orphan packages to make it
easier for users to recover after they fix their dotfile.
Previously, errors would cause the spacemacs boot process to halt,
leaving users with an almost stock emacs configuration. Now, users will
have a default spacemacs available to them to fix the error.
adds layer preservation.
add prompt for preferred editing style on recovery
Remove advice after first run.
add dotspacemacs/safe-load as function.
moves style prompt into dotspacemacs/init advice
add hybrid as valid editing style.
move conditional into dotspacemacs/load-file.
This sets the default distribution back to spacemacs. This is for people
who for whatever reason don't set `dotspacemacs-distribution` in their
dotfile.
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".
Now the user should use `SPC f e h` helm-spacemacs.
This is due to the fact that spacemacs layer is now a regular layer
stored in the "layers" directory.
- 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.
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).
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.
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).
The test results buffer is displayed only if there are errors.
Make dotspacemacs/test-dotfile return non-nil when all the tests passed.
dotspacemacs/test-dotfile takes an optional parameter to hide the
result buffer.
Set as default unless user has dotspacemacs-use-ido t.
Adds comments to .spacemacs.template informing users of new behavior
tied to dotspacemacs-use-ido.
- 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)
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.
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.
Now it is possible to have unicode symbols in GUI and not in
terminal using emacsclient
Do to so, dotspacemacs-mode-line-unicode-symbols must be set to
the symbol 'display-graphic-p which will be lazily evaluated
via the macro dotspacemacs|symbol-value
This is especially useful for users having troubles with unicode
characters in their terminal but wants to use them in GUI client.
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.
Once all extensions were moved from "extensions" to "local",
spacemacs was no longer able to find the solarized themes.
Thanks to @TheBB for helping narrow this down!
Closes#2628
Unfortunately spacemacs is not designed for installation
at use-package call time.
For use-package to be called a package must already be installed,
so I will continue on the initial plan, that is providing the
quelpa recipe at the <layer>-packages list level.
This is no bigdeal, this is basically moving :quelpa from
use-package to <layer>-packages variables.
Moreover it makes more sense to define package property at
declaration time instead of initialization (at least in spacemacs
world where installation is decoupled from configuration).
This has a benefit of not assuming that the user .emacs.d/ is in the
user home directory. Should continue to work as expected when this is
the case, but you could also start a fresh Emacs session like
so (assumes OSX):
open -a Emacs.app -n --args -q -l /path/to/emacs.d/init.el
So you don't have to muddle with symlinking your ~/.emacs.d or replacing
it with another just to try Spacemacs (or any other config). Note, that
this won't work with `after-init-hook` which doesn't appear to run when
Emacs is run with -q flag. As a result the `dotspacemacs/config` in your
.spacemacs won't run.
`tooltip-use-echo-area' is obsolete since 24.1; disabling `tooltip-mode'
achieves similar effect, and Tooltip mode has already been disabled in the
current code. Since Spacemacs supports Emacs 24.3 and 24.4,
`tooltip-use-echo-area' usage can be removed safely.
I have seen many "I have a problem" discussions in the Gitter chat which
starts with a barrage of questions "Which OS? Which Emacs version?",
etc., so I thought it may be useful to have one function that will
generate the info to be copy-pasted into the Gitter chat and hence both
the user and others helping in the Gitter chat can jump directly to
solving the problem instead of the support volley to figure out the
setup.
Example output:
ELISP> (spacemacs/system-info)
"OS: darwin Emacs: 24.5.1 Spacemacs: 0.103.0 Spacemacs branch: develop
Layers: ((auto-completion :variables auto-completion-enable-help-tooltip
t) better-defaults emacs-lisp git markdown org (shell :variables
shell-default-height 30 shell-default-position (quote bottom))
syntax-checking version-control c-c++ clojure dash github html osx
python semantic sql)"
References:
From
https://github.com/syl20bnr/spacemacs/issues/2033#issuecomment-113861451 :
> Also what is your emacs version and OS ?
From
https://github.com/syl20bnr/spacemacs/issues/2042#issuecomment-113861501 :
> What's your Emacs version ? I presume it comes from the semantic
layer, can you test without the semantic layer ?
Instead of opening the file for the bookmark, use the bookmark-jump
function to properly jump to the file and location in the file. Also
show the bookmark name and the filename in the list.
Fixessyl20bnr/spacemacs#2431