Navigating large R script files

Jan Goebel jgoebel at diw.de
Thu Oct 7 10:35:34 CEST 2004


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

-- 
+-----------------------------------------
 Jan Goebel 
 j g o e b e l @ d i w . d e

 DIW Berlin 
 German Socio-Economic Panel Study (GSOEP) 
 Königin-Luise-Str. 5
 D-14195 Berlin -- Germany --
 phone: 49 30 89789-377
+-----------------------------------------




More information about the ESS-help mailing list