[ESS] Windows Emacs: still hangs on install.packages(); no fix?

Joshua Wiley jwiley.psych at gmail.com
Wed Sep 19 07:19:30 CEST 2012


Hi Paul,

Probably not really what you want but note that:

require(tcltk)

before running will also fix it.  If you have access to global emacs
files, perhaps a system R profile?  I'm not sure of a pure ESS
approach, but maybe other smarter folks will chime in.

Cheers,

Josh

On Tue, Sep 18, 2012 at 9:45 PM, Paul Johnson <pauljohn32 at gmail.com> wrote:
> Greetings ESS developers:
>
> After my impassioned plea in favor of Emacs and ESS
> (http://pj.freefaculty.org/guides/Rcourse/emacs-ess/emacs-ess.pdf),
> a few of the students relented and tried it out. It is mostly working
> as I expect, but a widespread problem has developed. The ESS session
> hangs if the user runs commands that need CRAN access. A command like
>
>> install.packages("lmtest")
>
> hangs the session.  The ESS buffer says choose CRAN repository from
> list, but the list never pops up. Is this a tcltk problem? (In Linux,
> the CRAN chooser is a tcltk thing, I wonder if Windows uses same).
>
> I've found a few posts about this problem, which proposes some
> workarounds, but none are great.
>
> https://stat.ethz.ch/pipermail/ess-help/2008-January/004470.html
>
> That one says that C-c C-c will break the freeze, but it does not do
> that in Emacs 24.1 or 24.2 for Windows. For me, Emacs stays frozen,
> the minibuffer says "Text is read only".
>
> I wish this problem could be fixed on your end, but in lieu of that, I
> need a "solution" that I can engineer for all users on a system,
> something to put in site-start.d. When I go from one machine to
> another, I can't remember to re-run these workarounds every single
> time.
>
> Here are the workarounds that do work, but they aren't great.
>
> 1. Remember to run this every time you start R in ESS:
>
>> chooseCRANmirror(graphics = FALSE)
>
> That gives a text chooser for the desired CRAN mirror. That's fine.
>
> It is hard to remember to do that every time.
>
> 2. In  ~/.Rprofile file, put such:
>
> local({r <- getOption("repos")
>         r["CRAN"] <- "http://rweb.quant.ku.edu/cran"
>         options(repos=r)})
>
> The only problem there is that you have to re-do that when you go to a
> new computer or run in a different user account.  It is driving me
> insane.
>
> Is there something I can put in the Emacs startup file system-wide
> that forces all CRAN chooser things to obey the graphics=FALSE policy?
> In the old days, Emacs for Windows had the problem that the file
> chooser menu could not let the user choose a file.  TO address that, I
> put this in init.el:
>
> (if (eq system-type 'windows-nt)
>     (setq use-file-dialog nil))
>
> If there were something I could put in there to tell ESS to NOT try to
> open the CRAN mirror chooser, I could be happy.
>
> --
> Paul E. Johnson
> Professor, Political Science    Assoc. Director
> 1541 Lilac Lane, Room 504     Center for Research Methods
> University of Kansas               University of Kansas
> http://pj.freefaculty.org            http://quant.ku.edu
>
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/



More information about the ESS-help mailing list