[plt-scheme] DrScheme online syntax highlighting

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon Nov 3 16:24:37 EST 2003

You may be interested in the PLTNOTOOLS and PLTONLYTOOLS environment 
variables in the drscheme manual.

On Nov 3, 2003, at 2:31 PM, Daniel Silva wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> On Mon, 2003-11-03 at 15:05, John Clements wrote:
>> On Monday, November 3, 2003, at 02:59  PM, Daniel Silva wrote:
>>> On Mon, 2003-11-03 at 14:42, John Clements wrote:
>>>> On Monday, November 3, 2003, at 02:27  PM, Daniel Silva wrote:
>>>>> Does anybody who tried highlight.ss get errors like these when
>>>>> loading
>>>>> scheme files?
>>>>> open-input-text-editor: end index outside the range [1997,3000]: 
>>>>> 1024
>>>>> open-input-text-editor: end index outside the range [2596,4000]: 
>>>>> 2011
>>>>> #<struct:object:/home/daniel/plt/collects/stepper/stepper-
>>>>> tool.ss:525:8>:1:0: read: expected a ')'
>>>> No idea, but the "#<struct....stepper-tool.ss:525:8>" is actually
>>>> DrScheme's definitions-text%.  This is because the stepper tool
>>>> applies
>>>> a mixin to this text% to override several text% methods.
>>> It looks like stepper-definitions-text-mixin overrides on-insert and
>>> on-delete.  I override after-insert and after-delete to change the
>>> nearest sexp's style.  I didn't think that change-style would trigger
>>> on-insert or on-delete.
>>> Do drscheme:eval:traverse-program/multiple, syntax-case, expand, or
>>> drscheme:language:make-text/pos invoke on-insert or on-delete?  I'm
>>> using those to read sexps, and the combination of get-backward-sexp 
>>> and
>>> get-forward-sexp to find the last sexp typed.
>> No, no, let me clarify.  The error that you're getting in all
>> likelihood has
>> nothing whatsoever to do with the stepper.  Since the stepper is the
>> last
>> one to mix something into drscheme's definitions-text, the object that
>> is
>> the result of this composition (the text%) is given a source position 
>> in
>> the stepper.  Any error message in DrScheme that involves DrScheme's
>> definitions-text% will refer to it as a struct that comes from the
>> stepper.
>> Put another way:  rm -rf the stepper collection.  I claim that (with
>> high likelihood) the bug will still be present, and the error message
>> will
>> look the same, except that the source position given will come from 
>> some
>> other tool.
> Oh, you're right -- it came from syntax-color before and when I removed
> the dir, the error came from the steppper.
> Do mixins make it impossible to debug classes then?  I can't remove the
> stepper because DrScheme requires it.  The error message points to the
> beginning of the mixin class, not a method, and a with-handlers guard
> around my code isn't catching the error.  Can I catch errors with some
> other way? Is there a with-all-inclusive,-even-internal-errors-handlers
> form?
> Daniel

Posted on the users mailing list.