[racket-dev] open untagged files in blank language level?

From: Stephen Bloch (bloch at adelphi.edu)
Date: Thu Oct 6 23:37:06 EDT 2011

On Oct 6, 2011, at 4:35 PM, "John Clements" <clements at brinckerhoff.org> wrote:

> If there's any disagreement, it's about what should happen when an existing file--specifically, one that doesn't begin with #lang--is opened. Unless I'm missing something, this means that the only time students will have to "re-select" the language level is when they download a file that's intended to be evaluated in a student language, but that doesn't have a #lang line in it. Right?
> In my particular case, I had a program for students that reads in a rhythm from a text file.  The problem was that when students opened this text file in a drracket editor and changed it a bit and saved it, all of a sudden their rhythms came out as incredibly bizarre, because of the hidden first lines of the text file.

How about this: when you open an existing file that has no prologue or #lang, it opens in "text mode": the Check Syntax and Run buttons are both disabled.

Stephen Bloch
sbloch at adelphi.edu

Posted on the dev mailing list.