GNU bug report logs -
#16800
24.3; flyspell works slow on very short words at the end of big file
Previous Next
Reported by: Aleksey Cherepanov <aleksey.4erepanov <at> gmail.com>
Date: Tue, 18 Feb 2014 20:59:02 UTC
Severity: normal
Found in version 24.3
Fixed in version 24.5
Done: Agustin Martin <agustin6martin <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #71 received at 16800 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, Mar 01, 2014 at 03:11:41AM +0400, Aleksey Cherepanov wrote:
> Wow! Your 'if' in 'while's condition is very elegant. Nice!
>
> On Fri, Feb 28, 2014 at 12:45:45PM +0100, Agustin Martin wrote:
> > Please find attached my first candidate for commit. Is similar to what I
> > sent before, but needed to add an explicit check for word at eob in
> > `flyspell-word-search-forward'.
> >
> > Will try to have more testing before committing. Seems to work well with the
> > file generated by your one-liner, even with corner cases like new
> > misspellings added at bob or eob, but the wider the testing the better.
>
> I've wrote a small fuzzer. It is in attach. To run it:
> $ LANG=C emacs -Q --eval '(load-file "t2.el")'
> Then C-j to start. It modifies buffer you are in.
There is a mistake in my-try-mixed-pairs, fixed version is attached.
> (kbd "nd SPC and SPC nd C-b") fails to highlight the second "nd" as
> duplicate. It is a problem with bound equal to (length word) in
> -backward function. I did not check it when I wrote it.
> > + (search-forward word (length word) t))))
> (search-forward word (1+ (length word)) t))))
(1+ ...) is wrong, it should be similar to -forward: (+ (point-min)
...) because (point-min) is not always 1 (narrowing could change
this).
BTW flyspell does not escape restrictions/narrowing when it searches
for duplicate. Would not it be more convenient to widen before search?
Like
(save-restriction
(widen)
... search ...
> One "nd" is colored as duplicate due to -backward function after that
> fix. I did not touch it yet because it is a time for a break for me.
Thanks!
--
Regards,
Aleksey Cherepanov
[t2.el (text/plain, attachment)]
This bug report was last modified 10 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.