[racket] Projectional Editors
From: Robby Findler <robby at eecs.northwestern.edu<mailto:robby at eecs.northwestern.edu>>
Date: Friday, 5 July 2013 14:48
To: Tony Clark <t.n.clark at mdx.ac.uk<mailto:t.n.clark at mdx.ac.uk>>
Cc: "users at racket-lang.org<mailto:users at racket-lang.org>" <users at racket-lang.org<mailto:users at racket-lang.org>>
Subject: [SPAM: 10.600] Re: [racket] Projectional Editors
It sounds to me like the
FWIW, the arrows that you see when you mouse around the contents of the blue boxes in the upper-right corner are derived from information obtained post-macro expansion (this is happening continuously in the background in drracket). Probably that's the best way to get this information. That is, you can write your iU, etc. macros so they leave properties in the expanded output that say how to render the thing specially. That sounds straightforward to me. It would not appear immediately (just like the arrows don't appear immediately), tho. So if that's a killer, then you'd need to do something more complex.
That sounds like it will work. If I understand correctly, macro-expansion can leave markers in the AST that the editor then uses when displaying the text on the screen. A difference with the arrows seems to be that this is additional information over and above the text being displayed. A projectional editor would need to hijack the rendering process. Perhaps this is happening already since the markers inserted by macro-expansion do not appear in the rendered text. I guess it would be useful to have a step-by-step description of the DrRacket editing life-cycle. Does such a thing exist?
The way editing would work sounds much more tricky so I would suggest that you start with something that is really dumb on the "recognize the thing" side -- just have something that recognizes specific regular expressions of even fixed strings and then play around with how editing would work, working directly with a text% object, and then later getting that working with a racket:text% object.
As you say, the editing is a different order of tricksy-ness. Not essential anyway.
-- Tony
---------------------------------------------------------------------------
Please note that Middlesex University's preferred way of receiving all correspondence is via email in line with our Environmental Policy. All incoming post to Middlesex University is opened and scanned by our digital document handler, CDS, and then emailed to the recipient.
If you do not want your correspondence to Middlesex University processed in this way please email the recipient directly. Parcels, couriered items and recorded delivery items will not be opened or scanned by CDS. There are items which are "exceptions" which will be opened by CDS but will not be scanned a full list of these can be obtained by contacting the University.