[racket] A language mode for SQL

From: Stephen De Gabrielle (stephen.degabrielle at acm.org)
Date: Fri May 10 07:53:39 EDT 2013

That's a shame,

Anyway, I took a punt and created a tool by lifting
its own collection.
I gave it a folder and an info.rkt file and popped it into collects.
(raco setup datalog-editor-mode & restart DrRacket to install )

Seems to work OK as example, but I can't work out how to get it to select
the mode based on file extension on loading the document. Currently it
defaults to racket mode.

I think I should be overriding a method 'mode:surrogate-text%', but I can't
work out from the documentation, as everything 'Returns the result of
invoking call-super.' but a search for 'call-super' turns up noting. Any
suggestions from the list appreciated :)


   1.     (define datalog:surrogate-text% ;; keep
   2.       (class mode:surrogate-text%
   3.         (define/override (put-file text sup directory default-name)
   4.           (parameterize ([finder:default-filters
   5.                           (list (list "Prolog (.prolog)" "*.prolog")
   6.                                 (list "Datalog (.datalog)" "*.datalog"
   7.                                 (list "Any" "*.*"))]
   8.                          [finder:default-extension "datalog"])
   9.             (sup directory default-name)))
   11.         (super-make-object)))


On Thursday, May 9, 2013, Jay McCarthy wrote:

> On Thu, May 9, 2013 at 10:02 AM, Stephen De Gabrielle
> <stephen.degabrielle at acm.org> wrote:
> > Weirdly Datalog on planet seems to have a editor mode, but it doesn't
> > seem to be
> > in datalog as distrubuted with DrRacket (full?) version
> > [3m].
> > (maybe I'm not looking hard enough - or I have an old instance - I'll
> > check again wehn I get home)
> I switched Datalog to be a #lang and they can't communicate edit-modes
> to DrRacket.
> Jay
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://faculty.cs.byu.edu/~jay
> "The glory of God is Intelligence" - D&C 93
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130510/4570f478/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tool.rkt
Type: application/octet-stream
Size: 3812 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20130510/4570f478/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: info.rkt
Type: application/octet-stream
Size: 556 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20130510/4570f478/attachment-0003.obj>

Posted on the users mailing list.