[ESS] ESS in Windows: Unable to run editor "gnuclient.exe"

Martin Maechler maechler at stat.math.ethz.ch
Thu Mar 3 12:37:11 CET 2011


>>>>> "PJ" == Paul Johnson <pauljohn32 at gmail.com>
>>>>>     on Wed, 2 Mar 2011 00:40:24 -0600 writes:

    PJ> Hello, Rich: I'm very happy to get such a quick answer.

[................]
[................]

    >> 2. The gnuclient issue.  We have gnuclient hardwired in
    >> the code for Windows.  The newer emacs distributes with
    >> emacsclient.
    >> 
    >> You can manually issue the command to R,
    >> 
    >>    options(STERM='iESS', editor='emacsclientw.exe')

but unfortunately, that's not working either.
--> it's simply not found.

It seems you need to give the full path to emacsclient or
emacsclientw
*AND* the user must have started   M-x server-start
--- something that could be put into ESS start..
but still.

Also, when saying

  edit(USJudgeRatings)

it still seems to use the (quite nice) Windows internal editor,
which you get from the Windows R GUI default

  options(editor = "internal")


    >> I don't like emacsclient as much as I liked gnuclient. 
    >> If you still have an old gnuclient on your machine you
    >> can use it by starting it in your .emacs file.

Let's not go that route.
The question rather is: Can we have a reliable way on windows,
that emacsclient (or emacsclientw) is used *and* works ?

Otherwise we should rather change the default to
  options(editor = "internal")
and let the people who prefer  edit() , fix() ...
over the real ESS- emacs thing, 
--- namely C-c C-d,; editing source in general --
work with the GUI.

    PJ> I never heard of "gnuclient" before, don't know what its for, but I'm
    PJ> sorry I don't have it :)

    >> ESS intercepts R page() commands at the command line and
    >> open them in emacs.  That is somewhat easier since the
    >> pager doesn't have a return value.
    >> 
    >> It is not obvious to me why you would want to use the R
    >> fix() or edit() command when you are working in the emacs
    >> environment.

The "intercept" is a hack too.
It would fail as soon as someone has

   myFix <- function() { .... ; fix(..); ... }
and used
   myFix(..)


[.............]


    PJ> I need this to "just work" in the Windows lab.  It does
    PJ> in Linux. But in Windows, well, frustrating. I don't
    PJ> mind having to use windows notepad to do the editing, I
    PJ> just need this to work without users having to run

    >> options (editor="whatever")

I understand this -- for teaching students at least.

I'd propose to consider keeping the  Windows RGui default of
    option(editor = "internal")


    PJ> That's a deal killer.

    PJ> Couldn't you change from 'gnuclient' to 'notepad'?  we
    PJ> are sure that exists everywhere.

    PJ> Couldn't you set it to "runemacs.exe". I don't mind if
    PJ> another instance gets spawned.  I don't mind starting
    PJ> the server, if necessary, as long as I can configure it
    PJ> so users never see it.

    PJ> Anyway,

    PJ> I figured, "Why not edit Rprofile.site?".  Users will
    PJ> never have to worry about it.  But Emacs/ESS ignores
    PJ> Rprofile.site?  If I set the editor "notepad" in there,
    PJ> that will fix it.  But no! When I'm in ordinary R (not
    PJ> via ESS), then options("editor") shows notepad and it
    PJ> uses it for functions.  But when I start Emacs/Ess,
    PJ> options("editor") still says "gnuclient.exe".

Yes, we ("ESS coders") insert that code into your R session...
I think we must stop doing that;
particularly putting  "gnuclient" there which is NOT part of
Emacs nowadays.

    PJ> Until now, I couldn't understand why there's so much
    PJ> push for Windows people to use "Tinn-R".

    PJ> Check out the R for beginners by Zuur from Springer
    PJ> publications, or Maindonald's notes "Installation of R,
    PJ> of R packages, and Editor Environments"
    PJ> http://maths.anu.edu.au/~johnm/r-book/xtras/setup.pdf.

    PJ> I don't want Windows people to get "stuck" to their OS
    PJ> by Windows-only solutions, that's why I make them all
    PJ> try to use Emacs, even though the've never edited a file
    PJ> before :)

Good!   Hence we should try to help you ..



    >> Question for other ESS-core members:  would it make sense
    >> to intercept the edit() and fix() commands?  See defun
    >> inferior-R-input-sender in ess-inf.el for details.

(you can do it, but see above about the flaw, and
 as Kurt mentioned elsewhere, a real solution would work more
 tightly together with R code).

Martin

    >> 
    >> 
    >> Rich
    >> 


-- 
Paul E. Johnson
    PJ> Professor, Political Science 1541 Lilac Lane, Room 504
    PJ> University of Kansas

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



More information about the ESS-help mailing list