emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: flyspell bug


From: Agustin Martin
Subject: Re: flyspell bug
Date: Tue, 25 Oct 2005 13:40:06 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Piet van Oostrum <piet <at> cs.uu.nl> writes:

> 
> I have found the bug.
> 
> Explanation:
> 
> flyspell-buffer (actually flyspell-region) works in two different ways,
> depending on a small or large region to be checked. For a small region each
> word is subjected to flyspell-word. No problem. For a large region
> (default > 1000 characters) first the region is piped through ispell which
> returns a list of misspelled words. Then each of these words is searched
> for in the region (sequentially) and then flyspell-word is applied to it.
> This searching and spelling is done in a loop until the misspelling is
> found. 
> 
> In a TeX file, ispell should be called with the "-t" option and this is not
> done. That is the bug. What happens is that ispell finds a misspelled word,
> in the refcard.tex for example "newcount". The searching loop finds
> "newcount", applies flyspell-word, but flyspell-word accepts the word
> because it is in a TeX command. Therefore the loop continues until a really
> misspelled "newcount" is found. In this case there is none, so the loop
> stops after the second "\newcount". This looping is necessary, because (1)
> there could really be a word "newcount" without the backslash, (2) the word
> could be found as a substring of a correctly spelled word (e.g. when
> "redist" would appear after "redistribute").

Not sure if this will also affect, but pointing out about it, so people is aware

When a file not explicitely tex, but containing tex commands is passed to
ispell, ispell's default deformatter is nroff, so the beginning of some of
the tex commands might be considered as nroff control sequences. That will
happen for things starting by \sp and other ones. For instance

$ cat test.txt
\special
\spanish

$ cat test.txt | ispell -l -d american
ecial
anish

I do not know if this might affect the scanning mechanism for files containing
tex commands (e.g., an sgml document about something tex-related), but since
flyspell-large-region calls ispell without -t it might be.

http://bugs.debian.org/310844






reply via email to

[Prev in Thread] Current Thread [Next in Thread]