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

Vitalie Spinu spinuvit at gmail.com
Tue Nov 8 11:07:46 CET 2011


On 8 November 2011 10:49, Rainer M Krug <r.m.krug at gmail.com> wrote:
> Just an idea:
> I don't know much about minor-modes and elisp ut would it be possible to
> create a new minor-mode for debugging and to add different face, and other
> customizations to it? The default could be the same as the normal R
> minor-mode, but one could customize it quite easily?
>
> But it is possible that the effort is higher then the reward.

Yes it's higher. It's not that simple in this case, because minor
modes are associated with buffers they reside in. Our case is
different bebug mode or developer mode is associated with the process
and what your proposed would require installing the feature (faces
etc) into all buffers what are associated with curent process.
Moreover it would require taking care of switching processes and
opening new buffers to activate the feature. So as you can see it's
not worth it. Mode line highlight is quite enough in my opinion.


On 8 November 2011 10:31, Rainer M Krug <r.m.krug at gmail.com> wrote:
> have cases where I wants to check if changes to foo() in package1 will break
> the function foo() in package2 as
>
> package2:foo might be as follow:
>
> foo <- function(x) {
>   y <- package1::foo(x)
>   y <- y + 1
>   return(y)
> }
>
> So the search order becomes important. If ess-developer-package is set to
> "package1, package2", I could easily switch between editing package1 and
> package2 by changing the search order from "as-entered" to "R".

If implemented it would require displaying the order in mode line.
You can easily write a simple function  to reset your
ess-developer-packages to whatever value you want, or toggle between
several of them. Trying to anticipate all possible work-flows would be
too complicated and confusing for users. Reseting
ess-developer-packages manually will not take long either. I have in
mind IDO type of interaction here.

Cheers,
Vitalie.



More information about the ESS-help mailing list