From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Aleksey Cherepanov Newsgroups: gmane.emacs.bugs Subject: bug#16800: 24.3; flyspell works slow on very short words at the end of big file Date: Sun, 23 Feb 2014 00:16:50 +0400 Message-ID: <20140222201650.GA30683@openwall.com> References: <85zjlo5ecy.fsf@gmail.com> <83ob204vrv.fsf@gnu.org> <20140221143855.GA6018@agmartin.aq.upm.es> <83k3co4hzd.fsf@gnu.org> <20140222124413.GA4971@openwall.com> <83vbw72t05.fsf@gnu.org> <20140222160217.GA15616@openwall.com> <83ios72j8b.fsf@gnu.org> <20140222185511.GA23643@openwall.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1393100294 22826 80.91.229.3 (22 Feb 2014 20:18:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Feb 2014 20:18:14 +0000 (UTC) Cc: 16800@debbugs.gnu.org, agustin.martin@hispalinux.es To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 22 21:18:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WHJ1d-0001Q6-18 for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Feb 2014 21:18:17 +0100 Original-Received: from localhost ([::1]:50720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHJ1c-0005Y8-83 for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Feb 2014 15:18:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHJ1T-0005Xk-OA for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 15:18:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHJ1O-0005Uu-Ei for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 15:18:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHJ1O-0005Uq-Aq for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 15:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WHJ1N-000864-Vq for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 15:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Aleksey Cherepanov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Feb 2014 20:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16800 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16800-submit@debbugs.gnu.org id=B16800.139310022231042 (code B ref 16800); Sat, 22 Feb 2014 20:18:01 +0000 Original-Received: (at 16800) by debbugs.gnu.org; 22 Feb 2014 20:17:02 +0000 Original-Received: from localhost ([127.0.0.1]:35947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHJ0Q-00084c-8E for submit@debbugs.gnu.org; Sat, 22 Feb 2014 15:17:02 -0500 Original-Received: from mail-la0-f46.google.com ([209.85.215.46]:65235) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHJ0N-000841-A0 for 16800@debbugs.gnu.org; Sat, 22 Feb 2014 15:16:59 -0500 Original-Received: by mail-la0-f46.google.com with SMTP id b8so3800828lan.19 for <16800@debbugs.gnu.org>; Sat, 22 Feb 2014 12:16:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=wq7RuRcqV65aVZ8HE6EpF5y62jkG+m725DCr8ZGs2go=; b=X4J5Cwg7YC8Sibmf7MfuQzq3iSk0XtBmv0f0yThv30Cu0PCL6lFOPIC18BXV4wW7ph +gn7P2vRvBcBDyY1pG+XXg22EXnHsYEivs0y62egeadYtEWl38Sb5dPVAHSNDJp5nPSp KIvKQuA4R5Fcm744j9bpBW+n0Gm7SxXqCU41y5H1ulqpV1KQn8Q+bRkPknBMvm/84HjH k4bYHDvRoswI7DOVOdPG3zMsIeZdTP+52lCQ3CXHTfJr1vQfd9rpDMZsrq3vYvEhwFr5 W2onVL8w2XaLX/qJyZISLpCKCTTMQXuClneHwZipXcM6UyUMVb2db0rCVudI8+nYPeGs KpPg== X-Received: by 10.152.203.193 with SMTP id ks1mr7895409lac.0.1393100213090; Sat, 22 Feb 2014 12:16:53 -0800 (PST) Original-Received: from openwall.com ([188.123.230.115]) by mx.google.com with ESMTPSA id gb8sm12387332lbc.13.2014.02.22.12.16.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 22 Feb 2014 12:16:52 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140222185511.GA23643@openwall.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:86040 Archived-At: On Sat, Feb 22, 2014 at 10:55:11PM +0400, Aleksey Cherepanov wrote: > On Sat, Feb 22, 2014 at 06:41:08PM +0200, Eli Zaretskii wrote: > > > Date: Sat, 22 Feb 2014 20:02:17 +0400 > > > From: Aleksey Cherepanov > > > Cc: agustin.martin@hispalinux.es, 16800@debbugs.gnu.org > > > > > > > Your setup _might_ work the same, especially if you don't mix > > > > different languages in the same buffer. But in general, your change > > > > does affect behavior. > > > > > > I mix languages. I am pretty sure that my setup works the same. > > > > Not in general, it isn't. See below. > > I agree. > > Oh, not even for my setup. But for my setup together with my files. > I've got an example. > > > > BTW solution around reduction of jump points does not not affect > > > faces: "nd" or "badnd" at the end of "good badnd good " does not call > > > spell check on the first "badnd". > > > > Not sure I understand what you are saying here. What "first badnd"? > > you have only one in this example. > > "nd" does not cause spell check of "badnd". Another "badnd" at the end > does not cause spell check of the first "badnd". > > > > Emacs words are language sensitive too. > > > > But not in the same way as ispell/flyspell is. The CASECHARS, > > NON-CASECHARS, and OTHERCHARS parameters of the dictionary are only > > taken into account by ispell/flyspell. > > I think one could define a dictionary like: ("my" "[a]" "[^a]" "" ...) > So the only letter for flyspell words is "a". That way "qqaaqqaaqq" is > one word for emacs and two words with garbage around for flyspell. I > think my solution fails in such case. > > So flyspell's set should be consisted of full emacs categories to make > my solution work. Code for emacs word boundaries is in category.h, > macro WORD_BOUNDARY_P. We could use regular search for bad setups and > word search for good setups. Though it does not seem trivial to check > if flyspell's dictionary setup is good for my solution. > > Russian alphabet is not a full emacs (Unicode, I guess) category. The > full category is Cyrillic script (or even wider). My solution does not > work if there is a letter from the complement (for instance, Lje > 02131) right near my mis-spelling word. So I was wrong about the > behaviour: it is not the same, I just do not see differences in my > files. Oh, my setup is wrong. Default setup uses "[[:alpha:]]" ; casechars "[^[:alpha:]]" ; not-casechars due to ispell-set-spellchecker-params function: ;; If Emacs flavor supports [:alpha:] use it for global dicts. If ;; spellchecker also supports UTF-8 via command-line option use it ;; in communication. This does not affect definitions in your ;; init file. My solution should work well with such setup. Thanks! -- Regards, Aleksey Cherepanov