From unknown Sat Jun 21 10:13:40 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#728 <728@debbugs.gnu.org> To: bug#728 <728@debbugs.gnu.org> Subject: Status: 23.0.60; flyspell checking is sometimes silently disabled Reply-To: bug#728 <728@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:13:40 +0000 retitle 728 23.0.60; flyspell checking is sometimes silently disabled reassign 728 emacs submitter 728 Markus Triska severity 728 normal thanks From triska@gmx.at Fri Aug 15 15:20:34 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 15 Aug 2008 22:20:34 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7FMKUYw004549 for ; Fri, 15 Aug 2008 15:20:31 -0700 Received: from mail.gnu.org ([199.232.76.166]:49071 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KU7db-0006i3-QR for emacs-pretest-bug@gnu.org; Fri, 15 Aug 2008 18:19:15 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KU7ej-00087a-V4 for emacs-pretest-bug@gnu.org; Fri, 15 Aug 2008 18:20:29 -0400 Received: from mail.gmx.net ([213.165.64.20]:33322) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KU7ej-00087P-D8 for emacs-pretest-bug@gnu.org; Fri, 15 Aug 2008 18:20:25 -0400 Received: (qmail invoked by alias); 15 Aug 2008 22:20:23 -0000 Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-computer.local) [62.178.240.212] by mail.gmx.net (mp022) with SMTP; 16 Aug 2008 00:20:23 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX19GSSVjcpxG/RIToIskUmacrhpunVbR9kpvuQ/ShR 2wX2x7gx1hcLSS Received: by mt-computer.local (Postfix, from userid 502) id E7882A30C89; Sat, 16 Aug 2008 00:20:22 +0200 (CEST) From: Markus Triska To: emacs-pretest-bug@gnu.org Subject: 23.0.60; flyspell checking is sometimes silently disabled Message-Id: <20080815222022.E7882A30C89@mt-computer.local> Date: Sat, 16 Aug 2008 00:20:22 +0200 (CEST) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Sometimes in flyspell-mode, the mode line still says "Fly", but no more flychecking is actually performed. I cannot yet reproduce it reliably; however, if you add the following to your .emacs: (defun my-flyspell-check () (when flyspell-mode (unless (memq 'flyspell-post-command-hook post-command-hook) (with-current-buffer (get-buffer-create "flywarn") (insert "flychecking inactive despite flyspell-mode!\n")) (display-buffer "flywarn")))) (setq flycheck-timer (run-with-timer 0 0.5 'my-flyspell-check)) you will be informed when flyspell mode is superficially active, but no checking is actually performed. I only encountered the problem once since I have the above code in my .emacs, and then I also saw: "Invalid search bound (wrong side of point)" in *Messages*, which I previously probably missed. Thus I think this could for example happen when switching buffers or using the minibuffer at the wrong time. It is clear that flyspell-post-command-hook must be removed from post-command-hook in case of errors; if the error is hard to catch in the hook, I would already find it an improvement if flyspell mode were cleanly disabled (existing underlines, mode line, ...) in such cases. In GNU Emacs 23.0.60.1 (i386-apple-darwin8.11.1, GTK+ Version 2.12.9) of 2008-08-15 on mt-computer.local Windowing system distributor `The XFree86 Project, Inc', version 11.0.40400000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en.UTF-8 value of $XMODIFIERS: nil locale-coding-system: nil default-enable-multibyte-characters: t From monnier@iro.umontreal.ca Fri Aug 15 21:12:47 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-9.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 16 Aug 2008 04:12:48 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7G4Ci6i016881 for ; Fri, 15 Aug 2008 21:12:45 -0700 Received: from mx10.gnu.org ([199.232.76.166]:41082) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KUD8T-0001Qx-L2 for emacs-pretest-bug@gnu.org; Sat, 16 Aug 2008 00:11:29 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KUD9b-00037k-VW for emacs-pretest-bug@gnu.org; Sat, 16 Aug 2008 00:12:43 -0400 Received: from smtp-05.arnet.com.ar ([200.45.191.5]:34255) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KUD9b-00037O-AV for emacs-pretest-bug@gnu.org; Sat, 16 Aug 2008 00:12:39 -0400 Received: (qmail 12023 invoked from network); 15 Aug 2008 22:10:50 -0000 Received: from unknown (HELO ceviche.home) (201.253.83.37) by 0 with SMTP; 15 Aug 2008 22:10:50 -0000 Received: by ceviche.home (Postfix, from userid 20848) id CB323B40D8; Sat, 16 Aug 2008 00:12:37 -0400 (EDT) From: Stefan Monnier To: Markus Triska Cc: 728@debbugs.gnu.org, emacs-pretest-bug@gnu.org Subject: Re: bug#728: 23.0.60; flyspell checking is sometimes silently disabled Message-ID: References: <20080815222022.E7882A30C89@mt-computer.local> Date: Sat, 16 Aug 2008 00:12:37 -0400 In-Reply-To: <20080815222022.E7882A30C89@mt-computer.local> (Markus Triska's message of "Sat, 16 Aug 2008 00:20:22 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) > no checking is actually performed. I only encountered the problem once > since I have the above code in my .emacs, and then I also saw: > "Invalid search bound (wrong side of point)" in *Messages*, which I You need to try and track down the porigian of this message. It may be due to flyspell but it can also be due to something else: if there's a bug in one of the post-command-hooks, post-command-hook is set to nil (hence *all* post-command-hooks are disabled). Stefan From cyd@stupidchicken.com Thu Aug 21 16:24:17 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 728) by emacsbugs.donarmstrong.com; 21 Aug 2008 23:24:18 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7LNOE0V029423 for <728@emacsbugs.donarmstrong.com>; Thu, 21 Aug 2008 16:24:16 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id BF4A057E2B5; Thu, 21 Aug 2008 19:25:33 -0400 (EDT) To: Markus Triska Cc: 728@debbugs.gnu.org Subject: Re: 23.0.60; flyspell checking is sometimes silently disabled From: Chong Yidong Date: Thu, 21 Aug 2008 19:25:33 -0400 Message-ID: <87k5eaj6he.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Sometimes in flyspell-mode, the mode line still says "Fly", but no > more flychecking is actually performed. I cannot yet reproduce it > reliably Hi Markus, Have you found a way to track down the problem causing this bug? From markus.triska@gmx.at Thu Aug 21 19:16:12 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.0 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 728) by emacsbugs.donarmstrong.com; 22 Aug 2008 02:16:12 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m7M2G88O020427 for <728@emacsbugs.donarmstrong.com>; Thu, 21 Aug 2008 19:16:10 -0700 Received: (qmail invoked by alias); 22 Aug 2008 02:16:03 -0000 Received: from v254-127.vps.tuwien.ac.at (EHLO v254-127.vps.tuwien.ac.at) [128.131.254.127] by mail.gmx.net (mp024) with SMTP; 22 Aug 2008 04:16:03 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX1/9Dyhe3nb9tzYtZMaxeGpE966ZOb51dDxYCv4PIg d88YZxTyfrzonY Received: by mt-computer.vdn.ca (Postfix, from userid 502) id 3A804A3875B; Thu, 21 Aug 2008 22:15:57 -0400 (EDT) From: Markus Triska To: Chong Yidong Cc: 728@debbugs.gnu.org Subject: Re: 23.0.60; flyspell checking is sometimes silently disabled References: <87k5eaj6he.fsf@cyd.mit.edu> Date: Thu, 21 Aug 2008 22:15:57 -0400 In-Reply-To: <87k5eaj6he.fsf@cyd.mit.edu> (Chong Yidong's message of "Thu, 21 Aug 2008 19:25:33 -0400") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64 Chong Yidong writes: > Have you found a way to track down the problem causing this bug? I have set debug-on-error to t, so the next time I see this problem, I hope to catch which function raises the error. I already know that it is either preview-move-point (from AUCTeX) or flyspell-post-command-hook. Thus, especially if an AUCTeX user reads this: If you want to help to debug this problem, please add the following to your .emacs: (defun my-flyspell-check () (when flyspell-mode (unless (memq 'flyspell-post-command-hook post-command-hook) (with-current-buffer (get-buffer-create "flywarn") (insert "flychecking inactive despite flyspell-mode!\n")) (display-buffer "flywarn")))) (setq flycheck-timer (run-with-timer 0 0.5 'my-flyspell-check)) and it will warn you when Flyspell is no longer really active. Also, as I mentioned: I find it fair enough that Flyspell is disabled when there are errors; I only wish that there were a general mechanism to disable it in a cleaner way in case of errors, i.e., existing underlines should be removed, the mode line should reflect that it is no longer active etc. In short, when flyspell-post-command-hook must be removed from post-command-hook, also (flyspell-mode 0) or anything equivalent should be done. Analogously for some other modes (linum.el is another example, where errors in a custom linum-format function should make Emacs disable the minor mode completely, thus removing it from other hooks as well). From markus.triska@gmx.at Mon Sep 8 16:18:53 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.5 required=4.0 tests=AWL,BAYES_00,FOURLA autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 728) by emacsbugs.donarmstrong.com; 8 Sep 2008 23:18:53 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m88NInie017058 for <728@emacsbugs.donarmstrong.com>; Mon, 8 Sep 2008 16:18:50 -0700 Received: (qmail invoked by alias); 08 Sep 2008 23:18:42 -0000 Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-computer.local) [62.178.240.212] by mail.gmx.net (mp059) with SMTP; 09 Sep 2008 01:18:42 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX1+nol0RWc6nmuVJs3qI0EiV9wAVoB/ghMIUlL+lP3 eZAkHd2iwf7Yiv Received: by mt-computer.local (Postfix, from userid 502) id C25E3AAF204; Tue, 9 Sep 2008 01:18:24 +0200 (CEST) From: Markus Triska To: Chong Yidong Cc: 728@debbugs.gnu.org Subject: Re: 23.0.60; flyspell checking is sometimes silently disabled References: <87k5eaj6he.fsf@cyd.mit.edu> Date: Tue, 09 Sep 2008 01:18:24 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5600000000000001 The error occurs in flyspell-post-command-hook. To reproduce: 1) Install the latest AUCTeX (11.85), and let .emacs consist only of: (load "auctex.el" nil t t) 2) Let sat.tex ( http://www.logic.at/prolog/sat.tex ) consist of: \maketitle \includegraphics[scale=0.8] % \hline % \begin{itemize} % \hspace{1cm}\hbox{\begin{tabular} % $a$ & $b$ & $c$ & $d$ \\ without leading or trailing whitespace. 3) When you now do: $ emacs sat.tex -f flyspell-mode and press: M-g M-g 3 RET C-s $ you get: Error in post-command-hook: (error Invalid search bound (wrong side of point)) Alternatively, you can also press for example: C-n C-n C-p C-n C-n C-n C-n C-n C-n C-p From markus.triska@gmx.at Sun Sep 14 11:34:03 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.6 required=4.0 tests=AWL,BAYES_00,FVGT_m_MULTI_ODD, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 728) by emacsbugs.donarmstrong.com; 14 Sep 2008 18:34:04 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id m8EIXxia015518 for <728@emacsbugs.donarmstrong.com>; Sun, 14 Sep 2008 11:34:01 -0700 Received: (qmail invoked by alias); 14 Sep 2008 18:33:54 -0000 Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-computer.local) [62.178.240.212] by mail.gmx.net (mp011) with SMTP; 14 Sep 2008 20:33:54 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX19nO+RnmVlna+FHaAGVDppdp3s09pmIjZdyJHWbQ6 Px4HFyJKmfAuo1 Received: by mt-computer.local (Postfix, from userid 502) id 4750AADDC18; Sun, 14 Sep 2008 20:33:48 +0200 (CEST) From: Markus Triska To: Chong Yidong Cc: 728@debbugs.gnu.org Subject: Re: 23.0.60; flyspell checking is sometimes silently disabled References: <87k5eaj6he.fsf@cyd.mit.edu> Date: Sun, 14 Sep 2008 20:33:48 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.61 The following patch fixes this problem for me: 2008-09-14 Markus Triska * textmodes/flyspell.el (flyspell-math-tex-command-p): Always catch errors raised in `texmathp'. (flyspell-tex-math-initialized): Remove. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 47297c9..4296861 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1166,35 +1166,19 @@ Mostly we check word delimiters." res)))))))) ;;*---------------------------------------------------------------------*/ -;;* flyspell-tex-math-initialized ... */ -;;*---------------------------------------------------------------------*/ -(defvar flyspell-tex-math-initialized nil) - -;;*---------------------------------------------------------------------*/ ;;* flyspell-math-tex-command-p ... */ ;;* ------------------------------------------------------------- */ -;;* This function uses the texmathp package to check if (point) */ -;;* is within a tex command. In order to avoid using */ -;;* condition-case each time we use the variable */ -;;* flyspell-tex-math-initialized to make a special case the first */ -;;* time that function is called. */ +;;* This function uses the texmathp package to check if point */ +;;* is within a TeX math environment. `texmathp' can yield errors */ +;;* if the document is currently not valid TeX syntax. */ ;;*---------------------------------------------------------------------*/ (defun flyspell-math-tex-command-p () (when (fboundp 'texmathp) - (cond - (flyspell-check-tex-math-command - nil) - ((eq flyspell-tex-math-initialized t) - (texmathp)) - ((eq flyspell-tex-math-initialized 'error) - nil) - (t - (setq flyspell-tex-math-initialized t) + (if flyspell-check-tex-math-command + nil (condition-case nil (texmathp) - (error (progn - (setq flyspell-tex-math-initialized 'error) - nil))))))) + (error nil))))) ;;*---------------------------------------------------------------------*/ ;;* flyspell-tex-command-p ... */ From cyd@stupidchicken.com Tue Sep 16 17:56:23 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,BAYES_00, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 728-done) by emacsbugs.donarmstrong.com; 17 Sep 2008 00:56:23 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m8H0uKo6022853 for <728-done@emacsbugs.donarmstrong.com>; Tue, 16 Sep 2008 17:56:21 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 33CF357E32F; Tue, 16 Sep 2008 20:59:57 -0400 (EDT) From: Chong Yidong To: Markus Triska Cc: 728-done@debbugs.gnu.org Subject: Re: 23.0.60; flyspell checking is sometimes silently disabled References: <87k5eaj6he.fsf@cyd.mit.edu> Date: Tue, 16 Sep 2008 20:59:57 -0400 In-Reply-To: (Markus Triska's message of "Sun, 14 Sep 2008 20:33:48 +0200") Message-ID: <87fxnzr3hu.fsf@cyd.mit.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > The following patch fixes this problem for me: Checked in, thanks. From unknown Sat Jun 21 10:13:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 15 Oct 2008 14:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator