[ESS] r-related question: editing NAMESPACEd functions in packages

Vitalie Spinu spinuvit at gmail.com
Fri Nov 18 21:30:14 CET 2011

On 17 November 2011 21:44, Martin Maechler <maechler at stat.math.ethz.ch> wrote:
> On Wed, Nov 16, 2011 at 15:53, Stephen Eglen <S.J.Eglen at damtp.cam.ac.uk> wrote:
>> Thanks for adding this Vitalie.
>>> In develper mode `ess-eval-function' (and frends) checks
>>> if the function name could be found in the `ess-developer-packages'.  If
>>> so, it assigns the function into the namespace using
>>> 'assignInNamespace()'.
>>> "C-M-d t" to toggle developer mode
>>> "C-M-d a" to add a package to your development list (with C-u - remove)
>>> "C-M-d r" to remove a package to your development list
> well, guys,  I'm too busy to bring this up with my R core mates just now....
> but note that the NEWS.Rd for  R-devel (2.15.0 to be) contains  for a
> few weeks now
>    o assignInNamespace() has further restrictions on use apart from at
>      top-level, as its help page has warned.  Expect it to be disabled
>      from programmatic use in the future.

Bad news, we are running out of options. There is insertSource in
"methods" package which is intended to source all the functions and
methods into the namespace. I've implemented the interface to it
(bound to C-c C-l and C-M-d s when ess-developer is active), but
insertSource is not working.

I am getting :

Error in assign(this, thisObj, envir = envwhere) :
  cannot add bindings to a locked environment

and there is no function to unlock the environment.
Really not getting it, is that a bug or intended behavior? Or may be a joke?


> which seems a bit severe .. and I think quite a bit adverse to our new
> developer mode..
> --> This is a topic to be discussed on the R-devel mailing list
> (same address/URL as 'ess-help', just use 'r-devel' instead).
> Martin
>> I would prefer telling .emacs which packages I am a developer of -- is
>> that possible?  Can I just ess-developer-packages myself?
>> It may also be a wording issue, but you say
>>> if the function name could be found in the `ess-developer-packages'
>> since that variable contains package names, rather than function names,
>> I'm confused as to how this is working.
>> thanks, Stephen
>> ______________________________________________
>> ESS-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help

More information about the ESS-help mailing list