From unknown Sat Jun 14 03:47:53 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#4511 <4511@debbugs.gnu.org> To: bug#4511 <4511@debbugs.gnu.org> Subject: Status: 23.1; flyspell-mode slow editing near end of big html file Reply-To: bug#4511 <4511@debbugs.gnu.org> Date: Sat, 14 Jun 2025 10:47:53 +0000 retitle 4511 23.1; flyspell-mode slow editing near end of big html file reassign 4511 emacs submitter 4511 Kevin Ryde severity 4511 normal thanks From gg@zip.com.au Mon Sep 21 15:26:02 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Sep 2009 22:26:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.9 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8LMQ0SH002482 for ; Mon, 21 Sep 2009 15:26:01 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MprKZ-0001mn-Op for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2009 18:25:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MprKS-0001ma-OJ for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2009 18:25:59 -0400 Received: from [199.232.76.173] (port=55946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MprKS-0001mX-Jm for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2009 18:25:52 -0400 Received: from mailout2-10.pacific.net.au ([125.255.80.137]:40099 helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MprKR-0007mB-4Z for bug-gnu-emacs@gnu.org; Mon, 21 Sep 2009 18:25:52 -0400 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 1371118DF9D for ; Tue, 22 Sep 2009 08:25:45 +1000 (EST) Received: from blah.blah (ppp2A26.dyn.pacific.net.au [61.8.42.38]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id C13778C0F for ; Tue, 22 Sep 2009 08:25:39 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MprJG-00019T-LT for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2009 08:24:38 +1000 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: 23.1; flyspell-mode slow editing near end of big html file Date: Tue, 22 Sep 2009 08:24:38 +1000 Message-ID: <87ws3sgcm1.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=-=-= When flyspell-mode is enabled in a big html file, and point is somewhere near the end of the buffer, typing text or moving point with C-f and C-b become sluggish, to the point of being nearly unusable. (This is a regression from emacs 22, where flyspell-mode was fine on such files.) I expect "big file" is relative to cpu speed, but 300 kbytes is bad on my slow pc (not an outrageously huge file). To reproduce try this of about 600 kbytes, (progn (switch-to-buffer "foo") (dotimes (i 50000) (insert (format "

abc def\n" i))) (html-mode) (flyspell-mode)) It takes a few seconds to create the buffer, but of course that's not the bug. The bad bit is if you move point around with C-f / C-b near the end of the buffer, or type some plain text there outside of a , where it's sluggish between keystrokes. (Try upping the 50000 on a fast cpu if necessary.) I track the slowness to where `sgml-mode-flyspell-verify' does (looking-back "<[^>\n]*") I take it this func is asking whether point is within a or not. Does that regexp end up asking re-search-backward to consider every "<" in the buffer or something, before deciding no match is possible? I find it hugely faster to do an old fashioned skip-chars-backward as below -- assuming I'm not mistaken that the "\n" in the existing `looking-back' is supposed mean examining no more than the current line. 2009-09-21 Kevin Ryde * textmodes/flyspell.el (sgml-mode-flyspell-verify): Use skip-chars-backward instead of looking-back, to avoid a very slow regexp match when far into a big buffer with a lots of "<" chars. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=flyspell.el.sgml-verify.diff --- flyspell.el.~1.146.~ 2009-09-18 08:23:13.000000000 +1000 +++ flyspell.el 2009-09-21 16:36:12.000000000 +1000 @@ -363,7 +363,9 @@ "Function used for `flyspell-generic-check-word-predicate' in SGML mode." (not (save-excursion (or (looking-at "[^<\n]*>") - (ispell-looking-back "<[^>\n]*") + (save-excursion + (skip-chars-backward "^<>\n") ;; \n only look at current line + (not (equal ?< (char-before)))) ;; "<" if in a tag (and (looking-at "[^&\n]*;") (ispell-looking-back "&[^;\n]*")))))) --=-=-= In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-08-03 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' 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_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default-enable-multibyte-characters: t --=-=-=-- From monnier@IRO.UMontreal.CA Tue Sep 22 14:40:17 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 22 Sep 2009 21:40:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.1 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8MLeFaY003181 for ; Tue, 22 Sep 2009 14:40:16 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqD5r-0000gJ-2N for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2009 17:40:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqD5l-0000f7-Q3 for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2009 17:40:14 -0400 Received: from [199.232.76.173] (port=44750 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqD5l-0000ew-Ff for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2009 17:40:09 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:44714) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqD5k-00047f-Sk for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2009 17:40:09 -0400 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n8MLe3TW025237; Tue, 22 Sep 2009 17:40:03 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 873DB3A122; Tue, 22 Sep 2009 17:40:03 -0400 (EDT) From: Stefan Monnier To: Kevin Ryde Cc: 4511@debbugs.gnu.org, bug-gnu-emacs@gnu.org Subject: Re: bug#4511: 23.1; flyspell-mode slow editing near end of big html file Message-ID: References: <87ws3sgcm1.fsf@blah.blah> Date: Tue, 22 Sep 2009 17:40:03 -0400 In-Reply-To: <87ws3sgcm1.fsf@blah.blah> (Kevin Ryde's message of "Tue, 22 Sep 2009 08:24:38 +1000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3368=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-CrossAssassin-Score: 2 > I track the slowness to where `sgml-mode-flyspell-verify' does > (looking-back "<[^>\n]*") > I take it this func is asking whether point is within a or not. > Does that regexp end up asking re-search-backward to consider every "<" > in the buffer or something, before deciding no match is possible? Yes, looking-back is a dog. You need to pass it a `limit' argument. I think the `limit' argument should be mandatory. Stefan From gg@zip.com.au Tue Sep 22 17:57:13 2009 Received: (at 4511) by emacsbugs.donarmstrong.com; 23 Sep 2009 00:57:14 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout2.pacific.net.au (mailout2-14.pacific.net.au [125.255.80.141]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8N0vBaC005851 for <4511@emacsbugs.donarmstrong.com>; Tue, 22 Sep 2009 17:57:13 -0700 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 36EAE19039B; Wed, 23 Sep 2009 10:57:10 +1000 (EST) Received: from blah.blah (ppp2FD6.dyn.pacific.net.au [61.8.47.214]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 12ADE27417; Wed, 23 Sep 2009 10:57:04 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MqG9Q-0006Cr-1t; Wed, 23 Sep 2009 10:56:08 +1000 From: Kevin Ryde To: 4511@debbugs.gnu.org Cc: Stefan Monnier Subject: Re: bug#4511: 23.1; flyspell-mode slow editing near end of big html file References: <87ws3sgcm1.fsf@blah.blah> Date: Wed, 23 Sep 2009 10:56:07 +1000 In-Reply-To: (Stefan Monnier's message of "Tue, 22 Sep 2009 17:40:03 -0400") Message-ID: <87vdjaa388.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > > You need to pass it a `limit' argument. I thought about that a bit. The limit would be the immediately preceding "<", ">", or "\n", since whichever of them is hit first answers whether you're in a tag or not. There'd be no need for a separate limit calculation if a regexp could be cooked up to stop on the first of those three. I suppose it'd be along the lines of (untested) ... (and (looking-back "\\([<>\n]\\)[^<>\n]*?") (equal "<" (match-string 1))) but `skip-chars-backward' seems clearer to me, and might be a couple of nanoseconds quicker too in fact. From monnier@iro.umontreal.ca Tue Sep 22 20:13:40 2009 Received: (at 4511) by emacsbugs.donarmstrong.com; 23 Sep 2009 03:13:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.183]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8N3DcOj031979 for <4511@emacsbugs.donarmstrong.com>; Tue, 22 Sep 2009 20:13:40 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArwEAFcvuUpFpYEz/2dsb2JhbACBUtRphBsFh34 X-IronPort-AV: E=Sophos;i="4.44,435,1249272000"; d="scan'208";a="46401496" Received: from 69-165-129-51.dsl.teksavvy.com (HELO pastel.home) ([69.165.129.51]) by ironport2-out.pppoe.ca with ESMTP; 22 Sep 2009 23:13:33 -0400 Received: by pastel.home (Postfix, from userid 20848) id 651DE807A; Tue, 22 Sep 2009 23:13:32 -0400 (EDT) From: Stefan Monnier To: Kevin Ryde Cc: 4511@debbugs.gnu.org Subject: Re: bug#4511: 23.1; flyspell-mode slow editing near end of big html file Message-ID: References: <87ws3sgcm1.fsf@blah.blah> <87vdjaa388.fsf@blah.blah> Date: Tue, 22 Sep 2009 23:13:32 -0400 In-Reply-To: <87vdjaa388.fsf@blah.blah> (Kevin Ryde's message of "Wed, 23 Sep 2009 10:56:07 +1000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> You need to pass it a `limit' argument. > I thought about that a bit. The limit would be the immediately > preceding "<", ">", or "\n", since whichever of them is hit first > answers whether you're in a tag or not. (line-beginning-position) will do fine. > There'd be no need for a separate limit calculation if a regexp could be > cooked up to stop on the first of those three. The given regexp is actually plenty, in this respect. It's just that looking-back is a dog and doesn't make good use of the regexp. Stefan From monnier@iro.umontreal.ca Wed Sep 23 16:06:12 2009 Received: (at 4511-done) by emacsbugs.donarmstrong.com; 23 Sep 2009 23:06:12 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8NN6ASa004166 for <4511-done@emacsbugs.donarmstrong.com>; Wed, 23 Sep 2009 16:06:11 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArsFAD9GukpFpYEz/2dsb2JhbACBUdVmhBsFh34 X-IronPort-AV: E=Sophos;i="4.44,440,1249272000"; d="scan'208";a="46455932" Received: from 69-165-129-51.dsl.teksavvy.com (HELO pastel.home) ([69.165.129.51]) by ironport2-out.pppoe.ca with ESMTP; 23 Sep 2009 19:06:05 -0400 Received: by pastel.home (Postfix, from userid 20848) id DD24F807A; Wed, 23 Sep 2009 19:06:04 -0400 (EDT) From: Stefan Monnier To: Kevin Ryde Subject: Re: bug#4511: 23.1; flyspell-mode slow editing near end of big html file Message-ID: References: <87ws3sgcm1.fsf@blah.blah> <87vdjaa388.fsf@blah.blah> Date: Wed, 23 Sep 2009 19:06:04 -0400 In-Reply-To: (Stefan Monnier's message of "Tue, 22 Sep 2009 23:13:32 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>> You need to pass it a `limit' argument. >> I thought about that a bit. The limit would be the immediately >> preceding "<", ">", or "\n", since whichever of them is hit first >> answers whether you're in a tag or not. > (line-beginning-position) will do fine. Installed, Stefan From gg@zip.com.au Fri Oct 16 14:58:11 2009 Received: (at 4511) by emacsbugs.donarmstrong.com; 16 Oct 2009 21:58:11 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout2.pacific.net.au (mailout2-5.pacific.net.au [61.8.2.228]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9GLw9mS016827 for <4511@emacsbugs.donarmstrong.com>; Fri, 16 Oct 2009 14:58:11 -0700 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id C6C0D1913EB; Sat, 17 Oct 2009 08:58:06 +1100 (EST) Received: from blah.blah (ppp2874.dyn.pacific.net.au [61.8.40.116]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 1B62527407; Sat, 17 Oct 2009 08:58:00 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1MyunK-0002DK-Qu; Sat, 17 Oct 2009 08:57:06 +1100 From: Kevin Ryde To: Stefan Monnier Cc: 4511@debbugs.gnu.org Subject: Re: bug#4511: 23.1; flyspell-mode slow editing near end of big html file References: <87ws3sgcm1.fsf@blah.blah> <87vdjaa388.fsf@blah.blah> Date: Sat, 17 Oct 2009 08:57:06 +1100 Message-ID: <87bpk7t32l.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > > The given regexp is actually plenty, in this respect. It's just that > looking-back is a dog and doesn't make good use of the regexp. Oh, well, I suppose a genuine reverse matcher could do the right thing, probably if "<" was added to the exclusions like "<[^<>\n]*" -- not that that helps since there isn't a reverse matcher :-). But on the principle "why can't someone else do it", what about letting `sgml-lexical-context' determine the context. Tested only briefly: (defun sgml-mode-flyspell-verify () "Function used for `flyspell-generic-check-word-predicate' in SGML mode." (not (memq (car (sgml-lexical-context)) '(tag pi)))) Seems fast enough for me, and I think it means CDATA text is checked, which I think would be desirable, but I'm not well up on that stuff. From monnier@iro.umontreal.ca Fri Oct 16 19:15:04 2009 Received: (at 4511) by emacsbugs.donarmstrong.com; 17 Oct 2009 02:15:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.183]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9H2F22E026061 for <4511@emacsbugs.donarmstrong.com>; Fri, 16 Oct 2009 19:15:04 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtAEAPvF2EpFpY7q/2dsb2JhbACBUdcBgkGBcASHfQ X-IronPort-AV: E=Sophos;i="4.44,577,1249272000"; d="scan'208";a="47725651" Received: from 69-165-142-234.dsl.teksavvy.com (HELO ceviche.home) ([69.165.142.234]) by ironport2-out.pppoe.ca with ESMTP; 16 Oct 2009 22:14:56 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 56086B40DB; Fri, 16 Oct 2009 22:14:56 -0400 (EDT) From: Stefan Monnier To: Kevin Ryde Cc: 4511@debbugs.gnu.org Subject: Re: bug#4511: 23.1; flyspell-mode slow editing near end of big html file Message-ID: References: <87ws3sgcm1.fsf@blah.blah> <87vdjaa388.fsf@blah.blah> <87bpk7t32l.fsf@blah.blah> Date: Fri, 16 Oct 2009 22:14:56 -0400 In-Reply-To: <87bpk7t32l.fsf@blah.blah> (Kevin Ryde's message of "Sat, 17 Oct 2009 08:57:06 +1100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > But on the principle "why can't someone else do it", what about letting > `sgml-lexical-context' determine the context. Tested only briefly: > (defun sgml-mode-flyspell-verify () > "Function used for `flyspell-generic-check-word-predicate' in SGML mode." > (not (memq (car (sgml-lexical-context)) > '(tag pi)))) > Seems fast enough for me, and I think it means CDATA text is checked, > which I think would be desirable, but I'm not well up on that stuff. If performance is good enough, then it's a very good option, indeed. Stefan From gg@zip.com.au Fri Nov 6 16:23:11 2009 Received: (at 4511) by emacsbugs.donarmstrong.com; 7 Nov 2009 00:23:11 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout2.pacific.net.au (mailout2-5.pacific.net.au [61.8.2.228]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA70N9rh014200 for <4511@emacsbugs.donarmstrong.com>; Fri, 6 Nov 2009 16:23:10 -0800 Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 67B2519194B; Sat, 7 Nov 2009 11:23:07 +1100 (EST) Received: from blah.blah (ppp26CE.dyn.pacific.net.au [61.8.38.206]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id ECCB88C18; Sat, 7 Nov 2009 11:23:01 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1N6Z3t-0004lI-K5; Sat, 07 Nov 2009 11:21:49 +1100 From: Kevin Ryde To: Stefan Monnier Cc: 4511@debbugs.gnu.org Subject: Re: bug#4511: 23.1; flyspell-mode slow editing near end of big html file References: <87ws3sgcm1.fsf@blah.blah> <87vdjaa388.fsf@blah.blah> <87bpk7t32l.fsf@blah.blah> Date: Sat, 07 Nov 2009 11:21:49 +1100 In-Reply-To: (Stefan Monnier's message of "Fri, 16 Oct 2009 22:14:56 -0400") Message-ID: <87hbt7kwv6.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > > If performance is good enough, I've been using it, it seems good. What chance putting it in for everyone to have a go? The only thing to note is right now sgml-lexical-context doesn't recognise comments (bug 4781). But the current sgml-mode-flyspell-verify code doesn't recognise such comments either, so nothing is lost. I think it makes sense to spell check comments. The net effect of excluding just "tag" and "pi" parts is that tag and attribute names are skipped, but basically everything else is checked. String valued attributes are checked, which makes sense for Some text though string values which are urls might not want checking. Maybe some tag/attribute type info could distinguish the two cases, if it seemed important enough ... From monnier@IRO.UMontreal.CA Tue Nov 10 14:18:25 2009 Received: (at 4511) by emacsbugs.donarmstrong.com; 10 Nov 2009 22:18:28 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.9 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pruche.dit.umontreal.ca (pruche.dit.umontreal.ca [132.204.246.22]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAAMIM0G007304 for <4511@emacsbugs.donarmstrong.com>; Tue, 10 Nov 2009 14:18:24 -0800 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nAAMILja018430; Tue, 10 Nov 2009 17:18:21 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 6A0B63A1DA; Tue, 10 Nov 2009 17:18:21 -0500 (EST) From: Stefan Monnier To: Kevin Ryde Cc: 4511@debbugs.gnu.org Subject: Re: bug#4511: 23.1; flyspell-mode slow editing near end of big html file Message-ID: References: <87ws3sgcm1.fsf@blah.blah> <87vdjaa388.fsf@blah.blah> <87bpk7t32l.fsf@blah.blah> <87hbt7kwv6.fsf@blah.blah> Date: Tue, 10 Nov 2009 17:18:21 -0500 In-Reply-To: <87hbt7kwv6.fsf@blah.blah> (Kevin Ryde's message of "Sat, 07 Nov 2009 11:21:49 +1100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3403=0 >> If performance is good enough, > I've been using it, it seems good. What chance putting it in for > everyone to have a go? Try it. Stefan From gg@zip.com.au Mon Nov 16 16:23:02 2009 Received: (at 4511) by emacsbugs.donarmstrong.com; 17 Nov 2009 00:23:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mailout1.pacific.net.au (mailout1-1.pacific.net.au [61.8.2.208]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAH0N1cb024712 for <4511@emacsbugs.donarmstrong.com>; Mon, 16 Nov 2009 16:23:02 -0800 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 7B9D450C563; Tue, 17 Nov 2009 11:22:58 +1100 (EST) Received: from blah.blah (ppp23E4.dyn.pacific.net.au [61.8.35.228]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id EF2D127428; Tue, 17 Nov 2009 11:22:57 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1NABqP-0000xJ-7r; Tue, 17 Nov 2009 11:22:53 +1100 From: Kevin Ryde To: Stefan Monnier Cc: 4511@debbugs.gnu.org Subject: Re: bug#4511: 23.1; flyspell-mode slow editing near end of big html file References: <87ws3sgcm1.fsf@blah.blah> <87vdjaa388.fsf@blah.blah> <87bpk7t32l.fsf@blah.blah> <87hbt7kwv6.fsf@blah.blah> Date: Tue, 17 Nov 2009 11:22:52 +1100 In-Reply-To: (Stefan Monnier's message of "Tue, 10 Nov 2009 17:18:21 -0500") Message-ID: <87ocn22e5f.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Stefan Monnier writes: > > Try it. Done. It'll benefit from bug#4781 when that's addressed. From unknown Sat Jun 14 03:47:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 15 Dec 2009 15:24:14 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long 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