[racket] Command line Racket equivalent of DrRacket's Racket | Run (CTRL+T or F5)?

From: Greg Hendershott (greghendershott at gmail.com)
Date: Mon Dec 13 12:49:50 EST 2010

Thank you Eduardo.

Actually I had looked at Geiser but wasn't able to find just what I
was looking for. I would love to try it again.

Do you know what command in Geiser would be closest to doing a Racket
| Run (e.g. F5 or C-t) in DrRacket?  Meaning, it would (1)
evaluate/run the entire Emacs buffer, and, (2) provide an interactive
Racket prompt afterward?

On Mon, Dec 13, 2010 at 12:43 PM, Eduardo Bellani <ebellani at gmail.com> wrote:
> Hash: SHA1
> For racket in emacs, I would advise you to try geiser:
> http://www.nongnu.org/geiser/
> See you
> On 12/13/2010 03:19 PM, Greg Hendershott wrote:
>> I feel like I'm missing something obvious here.
>> Using Racket interactively from the command-line, how do I get a
>> similar result as choosing Racket | Run (e.g. CTRL+T or F5) in
>> DrRacket?
>> Meaning: All the expressions in the file are evaluated, and afterward
>> you have a prompt to do some more interactive things (or just type
>> "(exit)").
>> For instance if I have test.rkt which is
>> #lang scheme
>> (define (foo)
>>   (displayln "I am foo."))
>> (foo)
>> then here's what happens at the OS command line:
>> [1] "racket test.rkt"
>> Runs it: Yes.  Racket prompt: No (Racket exits automatically).
>> [2] "racket -i test.rkt"
>> Runs it: No.  Racket prompt: Yes.  Typing "foo" at prompt: "reference
>> to undefined identifier: foo"
>> [3] "racket -i -f test.rkt"
>> Runs it: No.  Racket prompt: Yes.  Typing "foo" at prompt: "reference
>> to undefined identifier: foo"
>> [4]  "racket _______ "
>> Runs it: Yes.  Racket prompt: Yes.  Typing "foo" at prompt: "#<procedure:foo>"
>> What is ____ in for 4?
>> P.S. As more background, I want to be able to do this from the command
>> line. So that's why I put the question that way.  But also, I'm
>> interested in trying to use Racket from Emacs. At the moment the only
>> thing I really want now is "get the same thing as pressing F5 in
>> DrRacket". And (again maybe I'm missing something obvious, or botched
>> the config) neither Racket nor Geiser seem to provide just quite that.
>> So I was looking at binding F5 to mode-compile and setting the correct
>> Racket flags ... that I haven't figured out yet, because apparently
>> I'm a numskull.
>> Thank you.
>> _________________________________________________
>>   For list-related administrative tasks:
>>   http://lists.racket-lang.org/listinfo/users
> - --
> Eduardo Bellani
> omnia mutantur, nihil interit.
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> hLQAniIlTHQPUZ15hmd0RBrzMij6KiS5
> =Nfln

Posted on the users mailing list.