Closed curiousyogurt closed 8 years ago
I think this must be an upstream problem. I just don't know which upstream. The offending function is in text-mode-hook
, but it's not added by Spacemacs...
So, a little more experimentation suggest the following line make it so flyspell does not turn on automatically:
(add-hook 'text-mode-hook 'toggle-auto-fill-mode-off)
If I comment that out, flyspell works.
The following workaround gets everything working properly (but it's ugly):
(add-hook 'text-mode-hook 'visual-line-mode) ; Turn on visual line breaking (one large paragraph)
(setq auto-fill-mode -1)
(setq-default fill-column 99999)
(setq fill-column 99999)
(add-hook 'LaTeX-mode-hook #'turn-on-flyspell) ; Turn on spell checking
The three setq
lines do it. Here is the reference for the setq
ugliness.
Oh, drat. I totally missed the fact that you are the one adding this hook.
This is a user config problem then.
I don't know where you got the toggle-auto-fill-mode-off
function from. There's a function called spacemacs/toggle-auto-fill-mode-off
. Maybe that's the one you are after.
There are at least two ways to solve this problem that do not use the ugly series of setq
statements above. First, put the following in dotspacemacs-configuration-layers in place of latex
(latex :variables latex-enable-auto-fill nil)
Another way is to make sure spacemacs/toggle-auto-fill-mode-off
is called after the LaTeX code in spacemacs in finished (that code enables auto-fill):
(add-hook 'LaTeX-mode-hook 'spacemacs/toggle-auto-fill-mode-off 'append)
When using AUCTeX, Flyspell-mode seems to be ignored in config. Flyspell can be turned on manually using M-x flyspell-mode. Apparently there is an error in the hook (according to @TheBB), causing it to abort. I have tried:
... in the config, and neither work (whether present or not present). I include various information below, including my .spacemacs file in order to help with reproduction. Thank you.
Here is my config according to SPC hds:
Here is the output from SPC t D when opening a .tex file:
Finally, here is my .spacemacs file: