Marc,

yes indeed. I using Emacs.app nightly build based on Emacs 23. The build I
am using is from May 24. I checked the savannah git repository and they have
not delt with the issue yet.

I guess I have to fallback on Aquamacs for Sweave editing.....I am so appy
with Emacs.app is so fast (without flyspell of course) as opposed to
Aquamacs.

The fact is that the performance deterioration is extrem in the noweb (rnw)
buffer while the performance in the latex buffer is modest. So, disabling
flyspell selectively would help.



On Tue, May 26, 2009 at 5:27 PM, Marc Schwartz <marc_schwartz@me.com> wrote:

> On May 26, 2009, at 7:15 PM, Giuseppe wrote:
>
>  Dear all,
>>
>> This issue is driving me crazy. I have been googling the web for three
>> straight days, yet it is still afflicting me.
>>
>>  From my emacs:
>>>
>>
>> (add-hook 'TeX-mode-hook (lambda ()
>>                            (TeX-fold-mode 1)
>>                (reftex-mode t)
>>                (flyspell-mode t)
>>                (setq flyspell-sort-corrections nil)
>>                (turn-on-auto-fill)))
>>
>>
>> and
>>
>> (defun Rnw-mode ()
>>  (require 'ess-noweb)
>>  (noweb-mode)
>>  (if (fboundp 'R-mode)
>>     (setq noweb-default-code-mode 'R-mode))
>>  )
>>
>>
>> The problem here is flyspell. It is activated through the hook
>> (TeX-mode-hook). However, if flyspell-mode is enabled the editing of the
>> chinks is extremely slow. I have tried to hook (flyspell-mode nil) to
>> Rnw-mode-hook, but it does not work (well, flyspell is disabled but the
>> editing is still very slow.).
>>
>> I can live without flyspell. The problem is that to disable
>> flyspell-completely I have to edit my .emacs, since if I simply M-x
>> flyspell-mode, flyspell-mode will be re-enabled one I go outside to the
>> chunk and back in tex (since the hook is reloaded).
>>
>> Any suggestion?
>>
>> P.S.: Is there a way to exclude the chunks from being parsed by flyspell?
>> This would be optimal, but I looked at flyspell.el and I do not see this
>> possibility.
>>
>
>
> Any chance that you are using Emacs 23?
>
> If so, there is a known bug at the moment with flyspell and Emacs 23:
>
>  http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2056
>
> Note that several reports there reference OSX, including my own, but it is
> not limited to OSX.
>
> As a result, I have disabled flyspell temporarily and am using ispell as
> needed to check spelling in the buffer or in highlighted sections.
>
> I don't have this problem with any emacs application based upon 22, whether
> it be Emacs or Aquamacs.
>
> HTH,
>
> Marc Schwartz
>
>

	[[alternative HTML version deleted]]

