[ESS] hide function bodies
Charles C. Berry
cberry at tajo.ucsd.edu
Thu Jun 21 17:15:48 CEST 2007
On Thu, 21 Jun 2007, Sven Hartenstein wrote:
> Hi,
>
> is there any Emacs or ESS feature allowing for automatic hiding of
> function bodies (similar to "outlining" maybe)?
>
Dunno, but...
> If I have a R file with multiple R functions it would be cool being
> able to get a quick overview of all functions, say, like this:
>
>
> firstfun <-- function(a, b, c=d) { ... }
>
> secondfun <-- function(x, y, z=NULL) { ... }
M-x occur RET <- function RET
will show an *Occur* buffer with the lines containing that regexp.
mouse-1 on a line in the *Occur* buffer will take you to the line in the
buffer from which you invoked occur.
Unfortunately, occur does not handle multiple line regexps, so this in a
buffer
foo <- function(x){
bar <- function(y) x+1
bar(x)^2
}
will give you
--------------------------------------------
2 matches for "<- function" in buffer: tmp.R
2:foo <- function(x){
3: bar <- function(y) x+1
--------------------------------------------
in the occur buffer, and I see no way around this.
HTH,
Chuck
>
>
> Best,
>
> Sven
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>
Charles C. Berry (858) 534-2098
Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
More information about the ESS-help
mailing list