[ESS] refTeX forgets information after visiting noweb chunks

Michael Hoffman b3i4old02 at sneakemail.com
Sun Dec 16 12:14:12 CET 2007


Daniel Sabanés Bové wrote:

> Thank you very much Michael, this works for me indeed!

My pleasure.

> (However, it considerably slows down emacs when scrolling through an
> Rnw file.
> So we really need a proper bug-fix to this.)

One more problem with the previous version is that it won't let you 
select across some chunk boundaries when you are using 
transient-mark-mode. This is better:

   (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.

> 
> regards,
> Daniel
> 
>> Michael Hoffman wrote:
>>> / Daniel Sabanés Bové wrote:
>> />/
>> />>/ When I visit the Rnw-file, everything is fine in the beginning, i.e.
>> />>/ refTeX knows the master file and shows me a correct table of
> contents (toc)
>> />>/ with all chapters in all files.
>> />>/
>> />>/ If I then navigate to a noweb chunk with R code in ESS mode and
> come back
>> />>/ to the LaTeX (or Rnw) mode, refTeX has forgotten the master file.
>> />/
>> />/ This is a symptom of the issue I have reported here:
>> />/
>> />/ https://stat.ethz.ch/pipermail/ess-bugs/2007q4/000428.html
>> />/
>> />>/ This can be resolved by resetting AUCTeX via the menu
>> />>/ LaTeX - Multifile/Parsing - Reset AUCTeX (or C-u C-c C-n).
>> /
>> I think you might be able to automate this workaround with:
>>
>>    (add-hook 'noweb-select-doc-mode-hook
>>              '(lambda ()
>>                 (unless (boundp 'in-noweb-select-doc-mode-hook)
>>                   (let* ((in-noweb-select-doc-mode-hook t))
>>                     (TeX-normal-mode t)))))
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.4-svn0 (GNU/Linux)
> Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
> 
> iD8DBQFHZO0szHZ0x5+gF9kRCguRAKCNoW9+KfYEkBzZ4rIZPlccVAfsCgCdGSs7
> x6X3bqn0j2fzTt1iSrCN2mU=
> =Kpa0
> -----END PGP SIGNATURE-----
> 
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>




More information about the ESS-help mailing list