[ESS] refTeX forgets information after visiting noweb chunks

Michael Hoffman b3i4old02 at sneakemail.com
Mon Dec 17 21:12:53 CET 2007


Vincent Goulet wrote:
> Le dim. 16 déc. à 06:14, Michael Hoffman a écrit :
>>   (add-hook 'noweb-select-doc-mode-hook
>>             '(lambda ()
>>                ; avoid infinite loops
>>                (unless (boundp 'in-noweb-select-doc-mode-hook)
>>                  (let* ((in-noweb-select-doc-mode-hook t)
>>                         ; don't deactivate the mark when changing  
>> modes
>>                         (deactivate-mark))
>>                    (TeX-normal-mode t)))))
>>
>> Yes, it's slower than I'd like.
> 
> This selection across chunks problem has also been bugging me ever  
> since I use Sweave. However, setting the mark (C-SPC) at the beginning  
> of the region, going to the end of the region and doing C-x C-x does  
> select the whole region just fine without slowing down Emacs.

I never had a problem with selecting across chunks before I added
TeX-normal-mode to the hook.

If you're having a problem with selecting across chunks, but not with
buffer-local variables being reset (such as RefTeX problems), then you
can hack something up to deactivate deactivate-mark just as I have
done, without using TeX-normal-mode, which is where the slowdown
occurs.




More information about the ESS-help mailing list