Carbon Emacs in Panther

Martin Maechler maechler at stat.math.ethz.ch
Fri Oct 10 10:00:43 CEST 2003


>>>>> "tony" == A J Rossini <rossini at blindglobe.net>
>>>>>     on Thu, 09 Oct 2003 22:28:57 -0700 writes:

    tony> Jan de Leeuw <deleeuw at stat.ucla.edu> writes:
    >> 1. If I use /usr/local/bin/R as my inferior R process, then it does
    >> not  work
    >> because it says it needs save, no-save, or vanilla.

    tony> That is weird -- doesn't sound like what I used to get?   In fact,
    tony> sounds more like some form of batch mode than anything else.

Indeed!  Emacs seems to call R "non-interactively" i.e not like
it should.

If you type   
   /usr/local/bin/R --no-readline

it does start alright I presume?
(that's what ESS would do: append the "--no-readline")

The above error message is produced from
Rf_initialize_R()  in src/unix/system.c
when `R_Interactive' is false.

Aqua has some special treatment there : 

  ---------------------------------------------
      /* On Unix the console is a file; we just use stdio to write on it */

  #ifdef HAVE_AQUA
      if(useaqua) 
	R_Interactive = useaqua;
      else
  #endif
      R_Interactive = isatty(0);
  ---------------------------------------------

but could it be that  isatty(0) doesn't return "TRUE" (non 0) when
called from ESS?
{I'm CCing Stefano as R-core's Mac guru}


    >> 2. So I define a script R-ESS that execs R --vanilla, and make that my
    >> inferior R process. That works, but smells like a hack.

indeed.  The above problem should be solved instead!


    tony> C-u M-x R   should let you add any starting arguments that you need
    tony> (instead of scripting them); if you figure the right combination, we
    tony> can stick 'em in.

(as a hacky workaround in ESS)

    >> 3. I also get
    >> 
    >> ess-error: Timeout waiting for prompt. Check inferior-ess-prompt or
    >> ess-loop-timeout.

    tony> That might be expected on a new platform -- we need to tweak
    tony> variables.

Definitely!
[ Ideally we (ESS) could use an emacs version of "BogoMIPS" to set
  this (or multiply the default with) ]

and Jan (and many others) should increase  ess-loop-timeout for the
time being, using "Options -> "Customize" ((or directly in your ~/.emacs))
I have doing this for a while.
Here's the result of 
C-h v ess-loop-timeout :

  help> ess-loop-timeout's value is 500000
  help> 
  help> Documentation:
  help> Integer specifying how many loops ess-mode will wait for the prompt
  help> before signaling an error.   This is important for S-PLUS and R, not so
  help> important for XLispStat.  Increase this, if you have a fast(er) machine.
  help> 
  help> You can customize this variable.
  help> 
  help> Defined in `ess-cust'.



    >> 4. If I have a file with R commands and I "evaluate buffer" in the ESS

    >> menu,
    >> then it says "starts evaluating" and then hangs. This maybe a case of
    >> RTFM on my part.

    tony> I'm assuming that you've got a running process, based on below, so
    tony> this is pretty strange.  Related to #1, perhaps?

    >> 5. I can evaluate lines and functions in a buffer.

That (4. and 5.) is very strange since both
 ess-eval-buffer and ess-eval-function
are just calling ess-eval-region
{and actually ess-eval-buffer is even simpler than the *-function one}.

[can you confirm that it's ess-eval-buffer and ess-eval-function
 that "do" and "do not" work respectively for you?]

    tony> Thanks for the report, Jan.
indeed.

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><




More information about the ESS-help mailing list