From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32280: 26.1; FLYSPELL-BUFFER sometimes misbehaves for some input in a large enough buffer Date: Fri, 27 Jul 2018 15:45:27 +0300 Message-ID: <83bmassv88.fsf@gnu.org> References: <992503e5-5f88-30c7-e9b9-fe0a884d2e52@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1532695453 17473 195.159.176.226 (27 Jul 2018 12:44:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 27 Jul 2018 12:44:13 +0000 (UTC) Cc: 32280@debbugs.gnu.org To: Artem Boldarev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 27 14:44:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fj26K-0004Ox-00 for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jul 2018 14:44:08 +0200 Original-Received: from localhost ([::1]:41082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fj28Q-0007Fb-JG for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Jul 2018 08:46:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fj28E-0007Du-JS for bug-gnu-emacs@gnu.org; Fri, 27 Jul 2018 08:46:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fj28B-0002cw-GD for bug-gnu-emacs@gnu.org; Fri, 27 Jul 2018 08:46:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54691) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fj28B-0002co-CA for bug-gnu-emacs@gnu.org; Fri, 27 Jul 2018 08:46:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fj28B-0004TA-57 for bug-gnu-emacs@gnu.org; Fri, 27 Jul 2018 08:46:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Jul 2018 12:46:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32280 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32280-submit@debbugs.gnu.org id=B32280.153269553817131 (code B ref 32280); Fri, 27 Jul 2018 12:46:03 +0000 Original-Received: (at 32280) by debbugs.gnu.org; 27 Jul 2018 12:45:38 +0000 Original-Received: from localhost ([127.0.0.1]:59708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fj27l-0004SF-PT for submit@debbugs.gnu.org; Fri, 27 Jul 2018 08:45:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fj27k-0004S3-8e for 32280@debbugs.gnu.org; Fri, 27 Jul 2018 08:45:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fj27b-0002Qm-Sp for 32280@debbugs.gnu.org; Fri, 27 Jul 2018 08:45:30 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fj27b-0002Qb-JN; Fri, 27 Jul 2018 08:45:27 -0400 Original-Received: from [176.228.60.248] (port=3846 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fj27a-0005RW-VG; Fri, 27 Jul 2018 08:45:27 -0400 In-reply-to: <992503e5-5f88-30c7-e9b9-fe0a884d2e52@gmail.com> (message from Artem Boldarev on Thu, 26 Jul 2018 12:44:26 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149016 Archived-At: > From: Artem Boldarev > Date: Thu, 26 Jul 2018 12:44:26 +0300 > > Checking large enough buffer with FlySpell leads to the unexpected > results (at least, when spell checking Russian, but I believe that it is > possible to reproduce the bug for other languages, at least Ukrainian). > > For example, when checking large enough buffer (large enough to trigger > flyspell-large-region) I got the following messages in the *Messages* > buffer: > > Local Ispell dictionary set to ru_RU > Starting new Ispell process hunspell with ru_RU dictionary... > Checking region... > Spell Checking...100% [посимвольно] > Spell Checking completed. >  -> смом - 346: word not found >  -> стостояния - 319: word not found >  -> рекрсивного - 308: word not found >  -> универсальнее - 266: word not found >  -> генериует - 222: word not found > > It was not able to find the misspelt words to highlight them in the > buffer which I tried > to spell check. On the other hand, some not misspelt words were > highlighted (именно, > бесконечный, усложняет).  Under other circumstances, these words are not > highlighted as misspelt (which is as it should be). Can you post the text where this happens? > The problem turned out to be in the flyspell-external-point-words: It > makes some heuristic checks before calling (flyspell-word nil t). It > seems that these checks are OK for English, as I never encountered any > problems when spell-checking English texts. > > Here is the version of the function which seems to be correct: AFAICT, you have removed a single line: (< found-length misspell-length) Can you take me through your reasoning why this line is incorrect, and what assumptions it made that are correct for English, but not for Russian? Thanks.