Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting mmm-mode global mode to ALWAYS breaks .spacemacs #9736

Closed
stradicat opened this issue Oct 15, 2017 · 7 comments
Closed

Setting mmm-mode global mode to ALWAYS breaks .spacemacs #9736

stradicat opened this issue Oct 15, 2017 · 7 comments

Comments

@stradicat
Copy link
Contributor

Hi,

When I M-x customize-group and set mmm-mode global mode to ALWAYS, it breaks .spacemacs (restart, then white Emacs screen with "choose your editing style" prompt).

@stradicat
Copy link
Contributor Author

stradicat commented Oct 27, 2017

I asked the package maintainer, and there is no problem using plain Emacs, so it's most likely a Spacemacs issue.
dgutov/mmm-mode#77

@syl20bnr
Copy link
Owner

syl20bnr commented Oct 29, 2017

I can reproduce and I think this is a bug with mmm-mode coupled with lazy loading.
When you tried with plain Emacs, did you use lazy loading as well for mmm-mode ?

Error is:

(Spacemacs) Error in dotspacemacs/emacs-custom-settings: Cannot open load file: No such file or directory, mmm-mode

BTW which version of Spacemacs do you use? Master ? I'm on develop and while the error happens it does not prevent to use Spacemacs normally.

@syl20bnr
Copy link
Owner

Happens even when I explicitly require the mmm-mode feature.

@syl20bnr
Copy link
Owner

syl20bnr commented Oct 29, 2017

This is the issue:

  ;; Given the loading process of Spacemacs we have no choice but to set the
  ;; custom settings twice:
  ;; - once at the very beginning of startup (here)
  ;; - once at the very end of loading (in `spacemacs/setup-startup-hook')
  ;; 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 setting set in dotfile functions
  ;; like `dotspacemacs/user-config`, users expect the custom settings to be the
  ;; effective ones.
  ;; 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?

The first time we load custom settings all lazy loaded stuff is not initialized yet.

But in develop branch it does not prevent from using Spacemacs normally. Only the error shows up in the mode-line.

@syl20bnr
Copy link
Owner

I'm puzzled I don't recall why we need to load them twice, I tried to comment the first load and it seems to work right.

Going to submit the comment of this first load and see if we have any regression.

@syl20bnr
Copy link
Owner

Pushed the fix, see referenced commit above, let's see how it goes.

@stradicat
Copy link
Contributor Author

Sorry about the delay, I always use the master branch.
I'll checkout develop and see what happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants