[ESS] Failed match for ess-function-pattern

Peter Meilstrup peter.meilstrup at gmail.com
Sat Jan 11 08:25:01 CET 2014


Over both eval-function (which doesn't usually do what I want when I
have inner functions) and eval-paragraph (which doesn't when I put a
line break in a function definition), I would prefer a command that
did "evaluate all lines that include the top-level bracket enclosing
point." That would be easy to implement using parse-partial-sexp and
cover the case discussed here.


On Fri, Jan 10, 2014 at 2:05 PM, Vitalie Spinu <spinuvit at gmail.com> wrote:
>
> 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
>
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list