Marc, I figured out what caused my DrScheme/Emacs problem: pasting in from a DrScheme help window. So I have 2 suggestions:
1) Get gambit.el to alert folks to invisible garbage characters.
2) Port the DrScheme utilities in list.ss & etc.ss. Very useful functions, and I'm sure you could code up very fast versions.
How to replicate my DrScheme/Emacs fiasco:
drscheme & ;; version 208
Click "Help Desk" from Help menu
Find docs for: memf
select
PLT MzLib: Libraries Manual (memf f l) in "list.ss: List Utilities"
PLT MzLib: Libraries Manual (memf f l) in "list.ss: List Utilities"
Paste this text into an Emacs window:
(memf f l) PROCEDURE
Applies f to each element of l (from left to right) until f returns a true value for some element, in which case the tail of l starting with that element is returned. If f does not return a true value for any element of l, #f is returned.
Now I have invisible garbage characters to puzzle gsi with. I'm in trouble if I turn this garbage into a define: (define (memf f l) ...) The memf line looks like
(memf\hat{A} f l) \hat{A}\hat{A}\hat{A}\hat{A}\hat{A} PROCEDURE
when I view it with M-x find-file-literally in Emacs.
Query-replacing and C-x Esc-Esc (repeat-complex-command) tells me that \hat{A} is \302.
But it's worse than that, because there's bogus SPC's on the line that are invisible even with M-x find-file-literally. I only noticed they were there because I had a "1" in the far left mode line, which is the tipoff for coding systems. Query-replacing these \302s away leaves the top line looking like
(memf f l) PROCEDURE
But there are only 2 honest SPC's on this line. M-x find-file-literally, Query-replace and C-x Esc-Esc tell me the bogus space is \240: (query-replace "\240" " " nil nil nil)
Now I'm fine! Apologies to Neil vD: it wasn't quack.el's fault :) I suppose I shouldn't expect sympathy when I was too lazy to type (define (memf f l) ...) & pasted it in. A tipoff of the invisible garbage characters is that the words memf, f & l have different colors in the Help Desk window. Sorry for double-posting my earlier post.