[racket] #lang text ? #lang none ?

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Jan 20 11:48:41 EST 2012

Yesterday, John Clements wrote:
> Scribble tipped the balance for me; I now find myself using DrRacket
> to edit text files.
> As part of a quest for world domina^H^H^H^H^H^Hcompatibility, I'd
> like to add either
> #lang text
> or 
> #lang none
> which could begin a text file and indicate that no highlighting
> should be done, and that evaluation should be a no-op.

1. If the point is only about using DrRacket for editing text files,
   then I don't think that a #lang is the right place for that.
   Instead, it's much better to use the file suffix (and yes, editing
   modes for unsaved files -- if that's hard to use then it's the UI
   that should change).

2. For nearly plain text files, you have `scribble/text'.  That still
   has the "@" escapes, but I could make an option to the language
   that would use a "customized delimited" by default, so that only
   "|@" is the delimiter, or more stuff between them.

   (To make it go in-line with `at-exp' such an extention could be
   some prefix too (though I personally dislike the semi-convention of
   using prefixes for setting reader options).)

Yesterday, Tony Garnock-Jones wrote:
> On 01/19/2012 02:52 PM, John Clements wrote:
> > #lang text
> How about #lang text/plain ? (Leaving the way open for #lang
> text/xml and so forth) (#lang application/octet-stream !)

And that's a good demonstration for #1 -- if the goal is to build on
some future extension of DrRacket that make it a great editor for
editing XML files, then you wouldn't want to require invalid XML
content to get to that feature.

Also, what about a langugae for editing pictures? Diagrams? Equations?

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.