[ESS] refTeX forgets information after visiting noweb chunks

Vincent Goulet vincent.goulet at act.ulaval.ca
Mon Dec 17 05:14:31 CET 2007


Le dim. 16 déc. à 06:14, Michael Hoffman a écrit :

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

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.

HTH    VIncent


>
>
>>
>> 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
>>
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help

---
   Vincent Goulet, Associate Professor
   École d'actuariat
   Université Laval, Québec
   Vincent.Goulet at act.ulaval.ca   http://vgoulet.act.ulaval.ca




More information about the ESS-help mailing list