Navigating large R script files

Henrik Andersson h.andersson at nioo.knaw.nl
Thu Oct 7 14:29:47 CEST 2004


The outline mode sound like a good idea, but unfortunately I know 
nothing about regular expressions.

Could you give me an example which would work, and then I can make up my 
own chapters, sections and so on...

Jan Goebel wrote:

> Hi,
> 
> probably you want to use outline, as in the
> ess-site.el file:
> 
> --------- ess-site.el last lines ------------
> ^L ; Local variables section
> 
> ;;; This file is automatically placed in Outline minor mode.
> ;;; The file is structured as follows:
> ;;; Chapters:     ^L ;
> ;;; Sections:    ;;*;;
> ;;; Subsections: ;;;*;;;
> ;;; Components:  defuns, defvars, defconsts
> ;;;              Random code beginning with a ;;;;* comment
> ;;; Local variables:
> ;;; mode: emacs-lisp
> ;;; mode: outline-minor
> ;;; outline-regexp: "\^L\\|\\`;\\|;;\\*\\|;;;\\*\\|(def[cvu]\\|(setq\\|;;;;\\*"
> ;;; End:
> 
> ;;; ess-site.el ends here
> -----------------------------------------------------
> 
> You can change the regular expression for chapters, sections ...
> (something like "###*###") and just write a "stop()" before the
> local variable section ...
> 
> HTH
> 
> jan
> 
> On Wed, 06 Oct 2004, Henrik Andersson wrote:
> 
> 
>>I am still exploring the endless possibilities of R/ESS/EMACS... and
>>
>>some of the sripts I use for R are starting to get very long...
>>
>>Is there a way to define sections in your script files, to be able to 
>>jump quicker in my files?
>>
>>I see the Imenu -> Functions, shall I define dummy functions that do 
>>nothing except serve as section header or is there a more elegant way?
>>
>>---------------------------------------------
>>Henrik Andersson
>>Netherlands Institute of Ecology -
>>Centre for Estuarine and Marine Ecology
>>P.O. Box 140
>>4400 AC Yerseke
>>Phone: +31 113 577473
>>h.andersson at nioo.knaw.nl
>>http://www.nioo.knaw.nl/ppages/handersson
>>
>>______________________________________________
>>ESS-help at stat.math.ethz.ch mailing list
>>https://stat.ethz.ch/mailman/listinfo/ess-help
> 
> 


-- 
---------------------------------------------
Henrik Andersson
Netherlands Institute of Ecology -
Centre for Estuarine and Marine Ecology
P.O. Box 140
4400 AC Yerseke
Phone: +31 113 577473
h.andersson at nioo.knaw.nl
http://www.nioo.knaw.nl/ppages/handersson




More information about the ESS-help mailing list