syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.69k stars 4.9k forks source link

Graceful handling of missing/deprecated layers #1087

Closed trishume closed 9 years ago

trishume commented 9 years ago

Currently adding a layer that does not exist to your configuration layers list causes Spacemacs to crash early in startup. This necessitates visiting the warning buffer to see what went wrong and then probably having to open another editor to fix the dotfile.

It would be great if Spacemacs just ignored the missing layer and printed a warning on the startup screen, maybe even opening the dotfile in a split for easy editing. Also cool would be if deprecation messages could be registered for certain missing layers, i.e redirecting former users of company-mode to the new auto-completion.

This is one of the reasons I still have Sublime Text in my dock :P

syl20bnr commented 9 years ago

That's weird, this is already handled by spacemacs. If I add toto layer I got this in messages (set dotspacemacs-verbose-loading to t):

(Spacemacs) Looking for configuration layers in /Users/sylvain/.emacs.d/private/ (Spacemacs) -> Discovered configuration layer: snippets (Spacemacs) Warning: Cannot find layer toto ! Loading /Users/sylvain/.emacs.d/spacemacs/funcs.el (source)...done Loading /Users/sylvain/.emacs.d/spacemacs/config.el (source)...done

trishume commented 9 years ago

Woops, I think I misconstructed a memory. I seem to remember running into this this afternoon but I think I mixed up a memory of having a non-existing layer with a memory of emacs crashing. Derp derp derp...

It in fact does exactly what you say.