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: Sat, 22 Feb 2014 22:55:11 +0400 Message-ID: <20140222185511.GA23643@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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1393095378 6465 80.91.229.3 (22 Feb 2014 18:56:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Feb 2014 18:56:18 +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 19:56:25 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 1WHHkO-0008CY-3F for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Feb 2014 19:56:24 +0100 Original-Received: from localhost ([::1]:50546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHHkN-0006cC-PX for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Feb 2014 13:56:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHHkF-0006TQ-2M for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 13:56:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHHk6-00066m-Q5 for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 13:56:15 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34714) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHHk6-00066h-Mo for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 13:56:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WHHk2-0005kE-I9 for bug-gnu-emacs@gnu.org; Sat, 22 Feb 2014 13:56:03 -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 18:56:02 +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.139309532422005 (code B ref 16800); Sat, 22 Feb 2014 18:56:02 +0000 Original-Received: (at 16800) by debbugs.gnu.org; 22 Feb 2014 18:55:24 +0000 Original-Received: from localhost ([127.0.0.1]:35895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHHjO-0005ip-QV for submit@debbugs.gnu.org; Sat, 22 Feb 2014 13:55:23 -0500 Original-Received: from mail-la0-f54.google.com ([209.85.215.54]:65387) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WHHjM-0005iZ-7o for 16800@debbugs.gnu.org; Sat, 22 Feb 2014 13:55:21 -0500 Original-Received: by mail-la0-f54.google.com with SMTP id mc6so252983lab.13 for <16800@debbugs.gnu.org>; Sat, 22 Feb 2014 10:55:13 -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=8DYvz8opW+XJeDnO2m+QL23ctWLkWiAarwEhU+zEofg=; b=Sgka+epAMuV7eclsKXGXG3hOYtHUnRacNsdUecAGDr39+ftZtq+oCkxYOiVeKVu449 z9sdGanWi/91rVkdwb5Qp7nQUEQshTMFU8PkNZzTx1ZrY2WjTz/ZbFL5P9+oVURiqoK4 auYalWch6sjT5sZ+uPiUv23nigYapB+1st4RXkf673kRuyP1Zcj880pRUGwWCE+wzdQ3 gf/iTOhZd+lY6LOWIe0BGguknsDygmmj73/cQBJ2WdTqbmhWWY/gTUC97vDWlDYr1c34 Sd5MbCYo7bputQn6nZKEeQ+t/966kku3q0FKK/bzJ08LVnl+wJLaK3RaN34kJzYtnB/C 439w== X-Received: by 10.152.206.104 with SMTP id ln8mr7526393lac.67.1393095313746; Sat, 22 Feb 2014 10:55:13 -0800 (PST) Original-Received: from openwall.com ([188.123.230.115]) by mx.google.com with ESMTPSA id n1sm16878470lae.6.2014.02.22.10.55.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 22 Feb 2014 10:55:13 -0800 (PST) Content-Disposition: inline In-Reply-To: <83ios72j8b.fsf@gnu.org> 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:86035 Archived-At: 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. We could mix: regular search for short distance and word search for longer distance. Though it seems ugly for me. I still think that we could make regexps with word boundaries according to flyspell's meaning of word. Thanks! -- Regards, Aleksey Cherepanov