[ESS] Failed match for ess-function-pattern

Vitalie Spinu spinuvit at gmail.com
Fri Jan 10 23:05:22 CET 2014


This is what I do:

foo <- function() ..
environment(foo) <- new_env

It would be possible to treat this specially case separately but it
would require re-factoring of a portion of ESS that is extremely
brittle. I would avoid that for now.

  Vitalie

 >>> Andreas Yankopolus on Fri, 10 Jan 2014 15:52:06 -0500 wrote:

 > C-c C-c fails if the function contains any blank lines.
 > —Andreas

 > On Jan 10, 2014, at 15:48, Vitalie Spinu <spinuvit at gmail.com> wrote:

 >> What is wrong with C-c C-c? Which automatically evaluates the paragraph
 >> when no function at point is found.
 >> 
 >> Vitalie
 >> 
 >>>>> Andreas Yankopolus on Fri, 10 Jan 2014 14:18:38 -0500 wrote:
 >> 
 >>> I'm using R environments to organize groups of related values and defining functions like so:
 >>> 
 >>> fooFunc1 <- local(function(args) {
 >>> ## Doo foo 1 things
 >>> }, env=fooEnv)
 >>> 
 >>> fooFunc2 <- local(function(args) {
 >>> ## Doo foo 2 things
 >>> }, env=fooEnv)
 >>> 
 >>> Unfortunately, the local() construct appears to break ESS's ability to recognizes these as functions. Putting the pointer in such a function and evaluating (C-c, C-f) fails with: "Point is not in a function according to 'ess-function-pattern'."
 >>> 
 >>> Any suggestions or fixes? I took a look at the code in ess-mode.el and don't see an obvious solution given my limited knowledge of elisp.
 >>> 
 >>> I'm running ess v13.05 in Aquamacs 3.0preview5 on OS X 10.9.1. Same story in Emacs 23.4.1 on Ubuntu 13.10.
 >>> 
 >>> —Andreas
 >>> [[alternative HTML version deleted]]
 >>> 
 >>> ______________________________________________
 >>> ESS-help at r-project.org mailing list
 >>> https://stat.ethz.ch/mailman/listinfo/ess-help

 > ______________________________________________
 > ESS-help at r-project.org mailing list
 > https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list