Subject: bug#15721: 24.3; Error in post-command-hook (flyspell-post-command-hook): (wrong-type-argument integer-or-marker-p nil)

From: Stefan Kangas <[email-masked]>
Date: Mon, 30 Sep 2019 15:54:39 +0200

tags 15721 + moreinfo
quit

Leo Liu <[email-masked]> writes:

> I got this from time to time:
>
>         Error in post-command-hook (flyspell-post-command-hook):
>         (wrong-type-argument integer-or-marker-p nil)
>
> But I don't know how to reproduce it reliably. So I put in this form
>
>       (unless (numberp flyspell-pre-point)
>                 (message "DEBUG-flyspell-pre-point: %S" flyspell-pre-point))
>
> before (goto-char flyspell-pre-point) in flyspell-post-command-hook.
>
> This is what is in *Messages* when the error happened:
> DEBUG-flyspell-pre-point: nil
>
> So it seems flyspell-post-command-hook needs to check current buffer is
> flyspell-pre-buffer. But I am not totally sure.

Do you have a recipe for reproducing this, starting from "emacs -Q"?

Best regards,
Stefan Kangas