Commit graph

1236 commits

Author SHA1 Message Date
syl20bnr 9ac779a2e4 core: import spacemacs-theme into libs
Distribute spacemacs-theme with Spacemacs so we don't need to download the
package of the theme at startup. It was delaying the display of the home buffer.

Now Spacemacs fallback to spacemacs-dark theme if the user theme cannot be
applied. Spacemacs then tries to install and reapply the user theme. If
successful, at the subsequent startups the user theme is applied right away
instead of spacemacs-dark. If the installation failed then we display a warning
informing the user and suggesting some actions.

There is now no package left to be installed manually at the start of Spacemacs.
2017-01-25 00:30:31 -05:00
syl20bnr dcfa00488e Minor comment change 2017-01-25 00:28:15 -05:00
syl20bnr 66d359f364 core: fix startup graphical glitch
Since Emacs 25.1 I got screen flickering when packages are installed on
startup.
Shuffling the UI elements removal seems to fix it on my system using X.

It may have the opposite effect on other users setup.
2017-01-25 00:24:02 -05:00
syl20bnr 973f6fe5ae core: import ido-vertical-mode into core/libs
It provides more intuitive way to display the wizard.
2017-01-23 23:52:57 -05:00
syl20bnr 1afa0f8faa core: import quelpa and package-build into core/libs
Remove the need to fetch these libs from the internet.
2017-01-23 23:52:57 -05:00
syl20bnr 1a9c5ea8ad core: force installation of org-contrib-plus instead of org
Thanks to the power provided by Lisp, hack package-install to patch on the
fly org and org dependencies installations in order to install org-plus-contrib
instead.
2017-01-22 23:23:39 -05:00
syl20bnr 65fea08de3 core: add support for local elpa repositories
It is now possible to add local elpa repositories to private variable
configuration-layer--elpa-archives for instance:

(defvar configuration-layer--elpa-archives
  '(("spacelpa" . "~/.emacs.d/.cache/spacelpa/"))
  "List of ELPA archives required by Spacemacs.")

New functions:
- configuration-layer//package-archive-absolute-pathp
- configuration-layer//package-archive-local-pathp
2017-01-22 17:55:59 -05:00
syl20bnr 1846984bd0 core: add support for interpreter-mode-alist to layer lazy installation
Update python lazy declaration as an example.
Still need to update the auto-layer.el file for other modes.
2017-01-22 13:41:04 -05:00
syl20bnr 220bbabd36 core: fix computation of package installation lazyness
Fix computation of package installation lazyness when the variable
dotspacemacs-enable-lazy-installation is set to all.

Improve methods on cfgl-layer class to be able to return a list of packages with
or without their properties.

Update tests to reflect the changes.
2017-01-22 13:37:12 -05:00
syl20bnr 7dde962ec8 core: Improve configuration-layer/create-elpa-repository
Fetch the archives before creating the elpa repository.
2017-01-22 00:40:02 -05:00
syl20bnr 984a3f956b core: fix delayed warning display in emacs 25.5
Discard the warnings produced when packages are byte-compiled which fix the
popup of the *Compile-Log* window at the end of the installation.
If emacs has been launch with argument `--debug-init` we don't discard the
warnings.
2017-01-22 00:37:10 -05:00
syl20bnr 6dac7d8ce9 core: correctly index packages installed by spacemacs core
Function configuration-layer/load-or-install-package now correctly add the
installed packages to indexed-package hash map.
Those packages are put under the special layer `system`.
2017-01-22 00:34:08 -05:00
syl20bnr 9909a95ad3 core: add ~ character to detect local package archives 2017-01-22 00:32:34 -05:00
syl20bnr 333f762b36 core: name startup-hook function and move spacemacs-buffer//startup-hook 2017-01-22 00:31:30 -05:00
syl20bnr c6bf7f7664 core: new functions to synchronize distant ELPA packages with local repo
New functions:
configuration-layer//download-elpa-file
configuration-layer//sync-elpa-packages-files
2017-01-18 00:24:14 -05:00
syl20bnr 273e1e94d6 core: add function to create spacelpa archive-contents
This is the first stone toward Spacemacs own ELPA repository.
New function configuration-layer/create-spacelpa-repository which creates the
archive-contents file for the Spacelpa repository containing all the ELPA
packages supported by Spacemacs (and only them).
2017-01-17 00:24:32 -05:00
syl20bnr afb2efcf56 core: minor functions renaming in core-configuration-layer.el
configuration-layer//get-packages-dependencies --> configuration-layer//get-packages-upstream-dependencies-from-alist
 configuration-layer//get-implicit-packages --> configuration-layer//get-implicit-packages-from-alist
2017-01-17 00:23:04 -05:00
syl20bnr cf5dac00ad core: move and rename spacemacs//get-package-directory
Move it to core-configuration-layer.el
Rename it to configuration-layer/get-elpa-package-install-directory
2017-01-17 00:20:59 -05:00
syl20bnr 14e690d82c core: add parameter to configuration-layer/make-all-packages
New parameter `skip-layer-discovery', if non-nil then rediscovery of layers
is skipped (used essentialy for the tests).
2017-01-15 23:14:20 -05:00
syl20bnr 2875ed4b0c Speedup SPC h SPC for both helm and ivy
The layer files were loaded twice because the global variable controlling
the loading of layer files was not explicity set at the layer discovery phase.
2017-01-15 22:19:56 -05:00
syl20bnr 3162f0e19b core: factorize code in configuration-layer/make-all-packages 2017-01-15 22:19:56 -05:00
syl20bnr c66f13b7cb core: fix preparation-function signature in publish-doc and exclude dockerfiles
Also respect 80 chars per lines a various places
2017-01-12 23:19:53 -05:00
syl20bnr 105a0a1ad8 Fix variable is void: system-info in spacemacs/report-issue
Fixes #8028
2017-01-12 22:19:39 -05:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
d12frosted e87a251138
align list of supported themes 2017-01-04 22:12:14 +02:00
Jeffrey Enns 0a418c6286
Add missing base16 themes 2017-01-04 22:10:56 +02:00
syl20bnr 74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -05:00
Adel Qalieh 8e7fe6e1f2
Add keybinding for spacemacs/alternate-window
spacemacs/alternate-window was suggested to switch between the last selected
window, or the window-analog of SPC TAB (spacemacs/alternate-buffer). This is
part of a larger family of functions, such as spacemacs/jump-to-last-layout on
SPC l TAB and eyebrowse-last-window-config on SPC l w TAB.

Resolves #7845
2016-12-27 09:50:10 +02:00
syl20bnr f5957eb877 core: cleanup layers discovery
Some directories were added twice.
Make it more explicit in the code which directories we look into and filter out
directories that don't exist. Emit a warning if an unknown directory is
provided.
2016-12-25 15:14:20 -05:00
Bez Hermoso 5323dd60b8 Added new base16 themes 2016-12-24 21:00:30 +02:00
deb0ch f8cb17eaf4
home-buffer: fix error on footer insertion when window is narrow 2016-12-22 16:31:13 +02:00
syl20bnr 467a5cc0ff core: move some functions to their correct source file 2016-12-18 12:05:10 -05:00
syl20bnr 28f2a6079d core: add explanation about double loading of customs in code
The explanation was in the previous commit message but it should be made more
obvious, so I move it directly into the source code.
2016-12-18 11:50:50 -05:00
syl20bnr 0ab8b7ba35 core: fix deletion of some custom settings when installing new packages
Given the loading process of Spacemacs we have no choice but to set the
custom settings twice:
- once at the very beginning of startup
- once at the very end of loading

The first application of custom settings is to be sure that Emacs knows all the
defined settings before saving them to a file (otherwise we loose all the
settings that Emacs does not know of).
The second application is to override any settings set in dotfile functions
like `dotspacemacs/user-config`, users expect the custom settings to be the
effective ones.

This double loading issue is independent from the managment method used for
custom settings. Even with a separate custom-settings file explicitly loaded in
the dotfile we would have been forced to load this file twice to acheive the
expected result described here.

Note: Loading custom-settings twice is not ideal since they can have side
effects! Maybe an inhibit variable in Emacs can supress these side effects?
2016-12-18 11:46:23 -05:00
syl20bnr a5c486364b core: fix "select deleted buffer"
Fixes #7898 #7963 #7976

For the fix to work, the file .custome-settings in .cache directory must
be delete once.
2016-12-18 02:07:45 -05:00
syl20bnr 679da2436a core: scope minor-mode specific key bindigns under major-mode leader
Also remove unnecessary bindings for org-edit-src-exit
2016-12-16 08:57:45 -05:00
d12frosted 5dbfaf3a8d
encode ; in issue report body 2016-12-14 18:23:44 +02:00
Markus Koller 766c284332 Disable paste transient state by default
To match the default configuration template which also disables it.
See https://github.com/syl20bnr/spacemacs/issues/6251#issuecomment-262289770
2016-11-24 23:05:55 +01:00
syl20bnr 6ae2fbcfa9 core: use an advice to write custom settings to dotfile
Should fix #7816
2016-11-23 16:32:10 -05:00
syl20bnr e699f1816a core: wrap Emacs custom in a dotfile new function
New function `dotspacmacs/emacs-custom-settings` wrapping Emacs
custom settings sexps.
`dotspacemacs/emacs-custom-settings` is called just after the user
configuration (`dotspacemacs/user-config`)

Customize cannot write its auto-generated sexps inside a function, to
accomplish this we trick Emacs by setting the custom file to a file
in `.cache` directory, the path to this file is defined by the variable
`spacemacs--custom-file`. At the startup of Emacs we read this file
to insert its content inside the function
`dotspacemacs/emacs-custom-settings` in the dotfile, this is done in the
function `spacemacs/write-custom-settings-to-dotfile`.

I don't think we need to write the custom settings to the dotfile when
exiting Emacs as well, since we do it at startup at the very beginning
(i.e. before actually loading the dotfile) we should be OK.

Fixes #5170
2016-11-22 22:55:36 -05:00
syl20bnr 034f2ea059 core: add support for conventional SPC m g G to jump-to-definition
Unfortunately the point jumps two times and we cannot use save-excursion due
to jump-to-definition being asynchronous depending on the handler.
2016-11-22 09:20:03 -05:00
Eivind Fonn 5c912e942f Don’t toggle maximized if already maximized 2016-11-20 18:59:57 -05:00
Keshav Kini 39667d3c87 Don't suggest SPC q r if restart-emacs is missing
When upgrading packages, Spacemacs backs up the old versions of the
packages and then tells the user to restart Emacs using `SPC q r` so
that the new version will be auto-installed.  But `SPC q r` doesn't
work if restart-emacs is one of the packages which is being upgraded,
and hence isn't currently installed.
2016-11-20 18:57:52 -05:00
Wieland Hoffmann 9fb5086fd1 Use "non-nil" in .spacemacs.template
Replace the mixture of "non nil" and "non-nil" with the latter. It seems to be
the form used by Emacs itself (for example in the docstring of `when`).
2016-11-20 18:55:12 -05:00
syl20bnr c7370cc592 core: use memq instead of multiple calls to eq 2016-11-20 13:38:02 -05:00
Chris Kaukis 1038c84597 Add Doom themes to required dependencies for dash 2016-11-20 13:33:38 -05:00
Eoin Houlihan 51c27f7db3 Add ripgrep to search tools in template 2016-11-11 17:42:25 +00:00
ksjogo 12284e16b0 Removed deprecated insert-string and replace by insert 2016-11-11 15:23:49 +02:00
Aron Griffis 385c12743a Add ripgrep support
* Add rg to helm completion layer
* Add rg to ivy layer
* Prepend rg to dotspacemacs-search-tools
* Add rg to documentation
2016-11-11 15:22:03 +02:00
syl20bnr 2c4cd4dd42 core: Revert dotfile installation time and fix editing style bug
Force a call to dotspacemacs/init after dotfile installtion.
Move call to (spacemacs/maybe-install-dotfile) to spacemacs/init.
2016-11-07 10:40:39 -05:00
syl20bnr caca16052a core: remove empty function dotspacemacs//install-and-replace 2016-11-07 10:24:51 -05:00
Eivind Fonn 24c3859d1e Install dotfile earlier 2016-11-07 10:07:28 -05:00
deb0ch e952eef1a6 home buffer: center buffer on fixed width 80 when not responsive 2016-11-07 09:15:56 -05:00
deb0ch bb5fdd8eaa home buffer: framed notes: allow for numbered and dotted lists
enumeration lists of the form:

 - lorem ipsum
 * lorem ipsum
 + lorem ipsum
 1. lorem ipsum
 2) lorem ipsum

will be treated as separate paragraphes and not be squished by
fill-region anymore.
2016-11-07 09:14:18 -05:00
deb0ch 67c5b2cb01 home-buffer: adapt home buffer notes toggling to responsiveness 2016-11-07 09:14:13 -05:00
deb0ch 3fa8b40057 home buffer: better framed notes display <3
More flexible framed text generation:

- adjust frame width to content width
- define minimum and maximum width
- allow for inserting a caption at the bottom of the frame

Unless dotspacemacs-startup-buffer-respinsive is nil:

- framed notes are centered
- max width is adapted to the window width

Also add a note inviting the user to update his packages and dotfile on
every new release (fixes #7357).
2016-11-07 09:13:46 -05:00
Rostislav Svoboda 0fa634c11c Display 'done' after a theme is loaded 2016-11-05 12:32:51 +02:00
Eivind Fonn 7082301cd8 Thank d12frosted too 2016-11-03 15:23:37 +01:00
Eivind Fonn f61a3a7881 Autumnal cleanup finished 2016-11-03 15:17:30 +01:00
deb0ch 3b92a4c2bf maximize frame earlier in the startup process 2016-10-23 19:44:35 +02:00
bmag e5c9632678 New dotvariable to control switch-to-buffer behavior
With a nil value for dotspacemacs-switch-to-buffer-prefers-purpose,
switch-to-buffer prefers using the current window, same as vanilla
Emacs. With a non-nil value, switch-to-buffer prefers another window
with the same purpose as the buffer. This affects actions like
spacemacs/alternate-buffer, and opening buffers from Dired.
2016-10-23 19:44:35 +02:00
Harry Walsh 452931ba2d Cleaned up directory warning about duplicate layers.
Cleaned up a warning that occurs when loading private layers
The layer discovery loop scans the private layer directory (
~/.spacemacs.d/layers) AND also ~/.spacemacs.d
The code then checks if a layer directory already exists
but the comparison fails due to trailing / in some paths.

The fix is to strip any trailing slash from both directories being
compared.
2016-10-21 12:10:47 +02:00
syl20bnr 48c3ecd1f8 core: register warning message only when messages are not inhibited 2016-10-20 09:32:03 -04:00
syl20bnr ee6c353abd core: inverse inhibition of :toggle messages
Makes more sense to inhibit at install time instead of configuration
time.
2016-10-20 09:30:16 -04:00
Kechao CAI b550945087 home buffer: update quickhelp.txt in [?] 2016-10-19 11:02:55 +08:00
Eivind Fonn ae66a4cea1 Show warnings in home buffer 2016-10-18 10:13:17 +02:00
Eivind Fonn 1a97aeb215 Warn if layers changed outside dotspacemacs/layers 2016-10-18 10:13:17 +02:00
Aku Kotkavuo f478686c69 Fix typos 2016-10-17 13:52:09 +02:00
Eivind Fonn d7938d63b1 Check package excluded property before toggle 2016-10-17 13:33:46 +02:00
syl20bnr d6a286d176 Revert "Set default value of dotspacemacs-startup-lists to nil"
This reverts commit 36f861aaff.

This is indeed very useful for new users (and the others :-))
2016-10-16 22:33:05 -04:00
Eivind Fonn df49e2a8d2 Add support for doom themes 2016-10-12 16:22:15 +02:00
Arron Mabrey 07718584ba
Fix unclosed strings in spacemacs.template 2016-10-11 22:17:33 +03:00
JAremko 37d74f60a8
Report system-configuration-features 2016-10-11 22:16:21 +03:00
syl20bnr 04ebeb712d core: fix exclusion of package when installing all packages
Fixes #7059
2016-10-10 01:09:05 -04:00
syl20bnr 8b4f3462c6 core: simplify construction of package objects 2016-10-10 01:08:45 -04:00
syl20bnr e5906ff895 Update release notes for 0.200
Advertise Autumnal Cleanup
2016-10-10 00:51:00 -04:00
syl20bnr 574b2ffe5d core: allow links surrounded with [[]] in release notes 2016-10-10 00:50:29 -04:00
syl20bnr 22aafd9523 core: fix lazy installation of layers
Fixes #7256
2016-10-09 23:32:31 -04:00
syl20bnr 62f08d89fb Rename dotspacemacs-ex-key to dotspacemacs-ex-command-key
Also move the configuration to evil init function.
2016-10-09 21:28:09 -04:00
Dietrich Daroch d1457feafb Restore easy ex-command remap
Pressing semi-colon is easier than the default colon.

Added ex-key defvar too
2016-10-09 13:21:31 -04:00
syl20bnr 703f78c2b8 Cleanup pass on file spacemacs-base/funcs.el
- Apply `/` and `//` rules (double / is for private functions)
- Add missing `spacemacs/` prefixes
- Move functions used outside of spacemacs-base layer to
  core/core-funcs.el
- Remove unused functions

Commit originally intented to only rename linum-update-window-scale-fix
to spacemacs/linum-update-window-scale-fix :-)
2016-10-09 13:14:41 -04:00
syl20bnr 7ff631a1d9 Change j/k to J/K to navigate home buffer
Update the quick help and sort the key bindings a bit.
2016-10-09 13:14:41 -04:00
syl20bnr 36f861aaff Set default value of dotspacemacs-startup-lists to nil 2016-10-09 12:25:56 -04:00
Tobias Gläßer 65b076e4d9 Use j/k in spacemacs buffer for widget motions
Currently j/k were only navigating between lines, but hitting RET
wouldn't work on a recent file and the like, when the cursor wasn't
directly over the filename. Changing j/k to widget navigation, ensures
that the cursor is always on something clickable. This change should
make the home buffer feel more at home for evil mode users.
2016-10-08 19:42:27 +02:00
ynilu 3b6c0e3b31
Correct the format of recipe when check for update 2016-10-03 20:53:33 +03:00
syl20bnr e6357a5ea3 Add missing 0.200 release notes for home buffer 2016-10-03 02:16:42 -04:00
syl20bnr fcfae43ddc Add newsletter 01 2016-10-03 00:23:15 -04:00
syl20bnr 03c1b5c466 core: Add an alias for dotspacemacs-enable-paste-micro-state 2016-10-03 00:23:15 -04:00
deb0ch 7860804fff adjust or center startup lists in home buffer 2016-09-22 10:19:39 +02:00
Eivind Fonn 26df4a7799 Fix initial-buffer-choice in daemon mode 2016-09-15 12:07:51 +02:00
Eivind Fonn e02c012ba1 Additional home buffer fixes 2016-09-14 20:53:30 +02:00
Steven Allen 7e903da247 Never use negative widths when formatting the spacemacs buffer caption.
Fixes: #7114
2016-09-14 19:44:01 +02:00
deb0ch fd9ac4afce refactor spacemacs-buffer/goto-buffer: fix logic flaw, center in terminal
fix buffer not re-created when buffer does not exist and last-width did
not change.

allow for home buffer centering in terminals.
2016-09-14 11:41:40 +02:00
d12frosted 8578b40404
properly resolve local package archive urls 2016-09-13 16:44:41 +03:00
Paul Young 9031348617
Fix a typo in the version switching message 2016-09-13 13:21:52 +03:00
syl20bnr 03f9f9f700 core: contain side effects when loading packages for SPC h SPC
Fixes some edge cases like SPC f e R performed after SPC h SPC which
could wrongly install or uninstall packages.

Side effects is contained using the variable
configuration-layer--package-properties-read-onlyp, if non nil then
properties value of a package cannot be overwritten.
2016-09-05 20:54:07 -04:00
syl20bnr 34971edc32 core: fix make-package multiple calls side effects
Calling multiple times configuration-layer/make-package appends the
same layers to :owners, :pre-layers and :post-layers slot.

Use object-add-to-list instead of push.

Add some tests and mock some warning messages.
2016-09-05 15:01:35 -04:00
syl20bnr 7a9f031e2b core: Split configuration-layer/make-packages-from-layers
Split the function in two functions:
- configuration-layer/make-packages-from-layers
- configuration-layer/make-packages-from-dotfile
2016-09-05 12:40:44 -04:00
syl20bnr f7668181d6 core: refactor make-package and make-packages
Rename configuration-layers/make-packages to
       configuration-layers/make-packages-from-layers

Move all package initialization logic to configuration-layers/make-package
instead of having it split between make-packages and make-package.
2016-09-05 11:54:29 -04:00
syl20bnr 9066d073b2 Fix (void-variable spacemacs-jump-handlers-....)
Move the variable definitions to config.el and eval-after-load the
key binding on SPC m g g.
2016-09-04 22:31:47 -04:00