[racket] How to keep comments when reading a file?

From: Todd O'Bryan (toddobryan at gmail.com)
Date: Tue Jan 11 11:47:52 EST 2011

I think what I really want to do is to be able to use wxme-read, but
have some way for it to not throw out comments, or
wxme-port->text-port, but be able to supply my own handlers for
non-textual snips.

It seems like one of these two should be possible (there is
register-lib-mapping!), but there are no examples, and the things I've
tried at random haven't been at all successful.

Todd

On Mon, Jan 10, 2011 at 8:51 PM, John Clements
<clements at brinckerhoff.org> wrote:
>
> On Jan 10, 2011, at 10:51 AM, Todd O'Bryan wrote:
>
>> Thanks for the pointer. I had hoped to avoid making two passes with
>> different readers.
>>
>> Can anyone give me a hint? It looks like the pieces are there, but
>> there are no examples in the documentation that explain how to get at
>> the pieces I need and how to plug them in.
>
> It looks to me like you want to create an editor% and load the file into it[*], then examine it using the editor's methods. No?
>
> Apologies if I'm misunderstanding your problem.
>
> John Clements
>
> [*] IIRC, this method is called 'load-file'.


Posted on the users mailing list.