[ESS] hide function bodies

Marc Schwartz marc_schwartz at comcast.net
Thu Jun 21 18:42:48 CEST 2007


On Thu, 2007-06-21 at 11:22 -0400, Richard M. Heiberger wrote:
> When the S-mode buffer is open (myfile.r or myfile.s), the emacs menu
> has an item Imenu-S.  Click it, then click "Functions ->".
> This produces a list of the functions.  Click a function and you are taken
> to its first line.

That menu also lists any data objects which are present.

I suspect however that Sven is referring to 'code folding', which is
supported for some languages in Emacs.

Examples can be found here:

http://www.emacswiki.org/cgi-bin/wiki/FoldingMode

and here:

http://en.wikipedia.org/wiki/Code_folding


Besides the menu which Richard refers to, the Emacs Code Browser (ECB)
also supports functionality which is helpful.  I use it on Emacs 23 and
F7 and have put up a screen capture here:

http://home.comcast.net/~marc_schwartz/Emacs23.png

You can see the following buffers in the image, which are configurable:

1. Upper left: Directory/File Selection Buffer

2. Middle left: Buffer History

3. Lower left: Object buffer with R function and data objects

4. Upper right: R code buffer

5. Lower right: Sweave .Rnw buffer


Note that I also use subversion and you can see the incorporation of
psvn.el in the modelines and the two upper left hand buffers with icons
indicating file svn status. I also have the tabbar loaded, which is
visible in the two right hand buffers at the top of each.

More information on ECB is here:

http://ecb.sourceforge.net/

The CEDET tool package, which is required for ECB is here:

http://cedet.sourceforge.net/

and the psvn.el file is here:

http://www.xsteve.at/prg/vc_svn/


HTH,

Marc Schwartz




More information about the ESS-help mailing list