[Top][All Lists]

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

Re: flyspell bug

From: Agustin Martin
Subject: Re: flyspell bug
Date: Fri, 18 Nov 2005 15:54:45 +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:
> 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").
> The solution is to give ispell the "-t" option.
> diff -u ~/Projects/cvs/emacs/lisp/textmodes/flyspell.el flyspell.el
> --- /Users/piet/Projects/cvs/emacs/lisp/textmodes/flyspell.el 2005-10-24
09:17:22.000000000 +0200
> +++ flyspell.el       2005-10-24 15:38:27.000000000 +0200
>  <at>  <at>  -1389,6 +1389,8  <at>  <at> 
>                     (if ispell-local-dictionary
>                         (setq ispell-dictionary ispell-local-dictionary))
>                     (setq args (ispell-get-ispell-args))
> +                   (if (eq ispell-parser 'tex)
> +                       (setq args (cons "-t" args)))
>                     (if ispell-dictionary ; use specified dictionary
>                         (setq args
>                               (append (list "-d" ispell-dictionary) args)))

This seems to have some side effects with ispell, save


to something.tex, make sure flyspell-large-region limit is set to 1, select
castellano8 dictionary and run flyspell-buffer

if: Bug: misspelled word `ptica' (output pos 7) not found in buffer

and contents of flyspell-region buffer (containing words ispell considers
misspelled) is


Seems that by doing that, ispell is also setting to the tex charset, e.g.

$ echo français | ispell -l -t -d francais

with the word "français" and the francais dict (they could also be used to test
this problem)

aspell seems to accept that.


reply via email to

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