flyspell-lazy icon indicating copy to clipboard operation
flyspell-lazy copied to clipboard

Spell checking is disabled when you compose reply to some email

Open mrkkrp opened this issue 9 years ago • 2 comments

In GNUS, when you read some email and then select part of it and press R, new window and buffer appear. In that buffer, Flyspell does not work when used with flycheck-lazy-mode.

mrkkrp avatar Mar 24 '16 06:03 mrkkrp

I've resolved it by disabling this “disallowed buffers” feature:

(setq flyspell-lazy-disallow-buffers nil)

I would not expect a regexp to work perfectly in all cases anyway. I almost have sent an important email with silly typos because of this, since flyspell-lazy disabled checking silently. Maybe it's better to set flyspell-lazy-disallow-buffers to nil by default?

mrkkrp avatar Mar 24 '16 18:03 mrkkrp

Good point. A better fix would be be for the library to disable by a list of major-modes instead of or in addition to a regexp. This is what I usually try to do.

It is also not a good design for flyspell-lazy to be disabling flyspell, which is a separate mode. However this is somewhat difficult to do cleanly as flyspell-lazy works by modifying flyspell's internals. If you look in the code comments you can see that I wanted to be more gentle and correct about disabling but had problems with infinite loops.

One definitely does not want spellchecking to turn on in a terminal window for example. Or a help window. There are many others. Setting that value to nil will likely cause some unwanted spellchecking.

I don't use GNUS, but wouldn't the following code in your ~/.emacs file force flyspell on in the message compose buffer?

(add-hook 'message-mode #'(lambda () (let ((flyspell-lazy-disallow-buffers nil)) turn-on-flyspell)))

If not, then something quite like it. I'd have to look up how to run GNUS.

rolandwalker avatar Mar 24 '16 23:03 rolandwalker