We renamed =extensions= directories in layers to =local= and the file
=extensions.el= is now ignored, their contents must be moved to the file
=packages.el= and their package declarations must now set the keyword
=:location= to =local=.
_Before:_
#+BEGIN_SRC emacs-lisp
;; in extensions.el
(setq python-post-extensions
'(
nose
pylookup
python-compile
py-yapf
))
#+END_SRC
_After:_
#+BEGIN_SRC emacs-lisp
;; in packages.el
(setq python-packages
'(
;; skipping packages before...
(nose :location local)
(pylookup :location local)
;; skipping packages after...
))
#+END_SRC
The variables =<package>-excluded-packages= are now ignored, they have been
replaced by the =:excluded= keyword in =<layer>-packages= variables.
_Before:_
#+BEGIN_SRC emacs-lisp
(setq vim-empty-lines-packages
'(
(vim-empty-lines-mode :location local)
))
(setq vim-empty-lines-excluded-packages
'(vi-tilde-fringe))
#+END_SRC
_After:_
#+BEGIN_SRC emacs-lisp
(setq vim-empty-lines-packages
'(
(vim-empty-lines-mode :location local)
(vi-tilde-fringe :excluded t)
))
#+END_SRC
A new file called =layers.el= is in charge of layers dependency, i.e. when a
layer needs to declare additional layers. Previously this was done in the
=config.el= file, to avoid errors you'll have to move the calls to the functions
=configuration-layer/declare-layer= and =configuration-layer/declare-layers= to
a dedicated =layers.el= file. An example can be found in the
[[https://github.com/syl20bnr/spacemacs/blob/564cbc40eda936985325c9b79088fbcb39d9a69d/layers/%2Bdistributions/spacemacs/layers.el][spacemacs distribution layer]].
** Controlling downloaded packages
The method to install all packages supported by Spacemacs has been improved. The
old way was to set the variable =dotspacemacs-configuration-layers= to the value
=all=. This method had several major drawbacks like forcing all layers to be
marked as =used= and it triggered various bad side effects. We removed the
support for the value =all=.
A new variable =dotspacemacs-install-packages= is now dedicated to control what
packages are downloaded by Spacemacs. Three behaviours are supported:
- =used-only= (default) will download only the used packages
- =used-but-keep-unused= will download only the used packages but won't uninstall
them if they become unused
- =all= will download _all_ the supported packages by Spacemacs.
** Key bindings
Here is the scary section, the one feared by most users :-) Let be honest, there
is a rather big amount of changes for users jumping from master 0.105 to 0.200.
First of all the most visible change is for ~SPC SPC~ which triggers now ~M-x~
instead of =avy= to jump to a character. The ~SPC~ key in Spacemacs is a central
key as it acts as the leader key for _all_ the key bindings, it made sense to
give the same sense of "root" key to the sequence ~SPC SPC~, so now ~SPC SPC~ is
the central sequence to execute _any_ interactive function in Emacs.
Where is the =avy= command then ? We reorganised from the ground up the prefix
~SPC j~ for all jump commands. In the conventions a doubled key is often used
for the default command under a given prefix, for instance ~SPC b b~ is for
buffer selection, ~SPC f f~ for file selection etc... The "jump to character"
command of =avy= is then under ~SPC j j~. Here is a detailed list of the new
~SPC j~ prefix:
- =avy= commands are now behind the prefix ~SPC j~ for =jump=:
- ~SPC j j~ to jump to a character in the buffer (works as an evil motion)
- ~SPC j l~ to jump to a line with avy (works as an evil motion)
- ~SPC j w~ to jump to a word in the current buffer (works as an evil motion)
- the following key bindings have been moved:
- ~SPC j j~ to split a line has been moved to ~SPC j n~ (mnemonic is New line)
- ~SPC j h~ and ~SPC j l~ have been moved to ~SPC j 0~ and ~SPC j $~
respectively.
- ~SPC J~ to split a string or sexp has been moved to ~SPC j s~
A lot of other handy commands are under this prefix, I let you discover them with
the =which key= menus.
Closing, deleting or killing things ? This can be a tough call to distinguish
them and we can find such confusion in the Spacemacs key bindings, for instance
we close a window but we delete a buffer and we can also kill a buffer. Whereas
it can make sense for a lot of users, there are still users finding this
confusing. So we decided to simplify the notion of "closing/deleting" things
under the ~d~ key for =delete=. We moved ~SPC w c~ and ~SPC w C~ to ~SPC w d~
and ~SPC w D~.
More generally we tried to map prefixes ~SPC b~ and ~SPC w~ to the same actions
and bring a convention with =avy= commands with the capital letter to manipulate
windows and buffers. The result is detailed here:
- ~SPC b k~ has been removed.
- ~SPC b C-k~ (kill buffer matching regexp) is now ~SPC b C-d~
- ~SPC b m~ (buffer move) has been removed because the functionality
is available via ~SPC w~ with ~SPC w h/j/k/l~, ~SPC w H/J/K/L~ and
~SPC w M~.
- ~SPC b K~ (kill other buffers) is now ~SPC b m~ to map with ~SPC w m~
(maximize buffer/window which effectively delete other windows).
- ~SPC b D~ now kills a buffer using =ace-window=.
- Buffer actions don't delete the windows by default, use the universal
prefix argument to do so, for instance ~SPC u SPC b d~ and ~SPC u SPC b D~
will delete the buffer and also the window. Another example is
~SPC u SPC b m~ to maximize a buffer.
=Helm= has a new friend in this release, it is called =ivy= and it has more and
more adopters. Since we have now a new package capable of doing =helm= commands
Be sure to follow the =README.org= of the =keyboard-layout= layer for more
information about layout definition.
** Directory and file local variables
[[https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html][Per-directory and file local variables]] are a standard feature of Emacs, we try
to leverage them starting with 0.200. Some layers support several tools to do
the same thing, for instance in the =ruby= layer both =rspec= and =ruby-test=
are supported to run tests; the =haskell= layer supports several completion
back-ends like =intero= and =ghci=. Those tools or back-ends are project
specific so providing only a global value for them is not enough. With 0.200
these layers become compatible with directory local variables so the test engine
for =ruby= or the completion back-end for =haskell= can be setup differently for
different directories (i.e. projects).
Supporting directory and file local variable dynamically greatly improves the
flexibility of Spacemacs and make it an even better choice to handle various
types of projects. We don´t support multiple options for the sake of supporting
them but for a more robust solution capable to deal easily with your day-to-day
requirements.
** More useful abstraction
We have even more abstraction of useful concepts in 0.200 like jumping to the
This first newsletter is a great opportunity to thanks the Emacs community and
more specifically:
- =Justin Burkett= (aka [[https://github.com/justbur][justbur]]) and =Fabien Dubosson= (aka [[https://github.com/StreakyCobra][StreakyCobra]])
who were collaborators during several months. This version would not be so
awesome without their dedicated involvement. We wish them all the success in
their future projects.
- =Boris= (aka [[https://github.com/d12frosted][d12frosted]]) who joined =TheBB= and myself as collaborator.
- Of course the unique =Eivind Fonn= (aka [[https://github.com/TheBB][TheBB]]) without his constant support
Spacemacs could not be successful and I think I would have burn-out a long
time ago.
- All the package maintainers, especially =Oleh Krehel= (aka [[https://github.com/abo-abo][abo-abo]]) for the
great help with =ivy= and obviously =Frank Fischer= (aka [[https://bitbucket.org/lyro/][lyro]]) the author
of =evil=.
- In no specific order: =Diego Berrocal= (aka [[https://github.com/CestDiego][CestDiego]]), [[https://github.com/bmag][bmag]], [[https://github.com/NJBS][NJBS]],
=Eugene Yaremenko= (aka [[https://github.com/JAremko][JAremko]]), [[https://github.com/travisbhartwell][Travis B. Hartwell]], =Tristan Hume=