<html><head></head><body bgcolor="#FFFFFF"><div>No, Robby meant "on". Line counting matters even more for programs with non-ASCII characters.<br></div><div><br>On Jun 12, 2012, at 8:07 AM, Stephen Chang <<a href="mailto:stchang@ccs.neu.edu">stchang@ccs.neu.edu</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><p>Do you mean turn off? I didn't but I will try it. Would it affect some programs but not others though?</p>
<div class="gmail_quote">On Jun 11, 2012 8:01 PM, "Robby Findler" <<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Did you turn out port-count-lines! on the port?<br>
<br>
Robby<br>
<br>
On Mon, Jun 11, 2012 at 6:57 PM, Stephen Chang <<a href="mailto:stchang@ccs.neu.edu">stchang@ccs.neu.edu</a>> wrote:<br>
> I have a drracket plugin that reads the contents of the definitions<br>
> window as syntax and then traverses that syntax object so that for<br>
> each subexpression e it prints<br>
> 1) (syntax->datum e), and<br>
> 2) the contents of the definitions window at starting at position<br>
> (syntax-position e) and ending at (syntax-position e) + (syntax-span<br>
> e)<br>
><br>
> I would expect each subexpression in the program to be printed twice<br>
> and the plugin generally works as expected, except when I use the<br>
> unicode lambda character.<br>
><br>
><br>
> For example, if I have the program:<br>
><br>
> #lang racket (add1 10)<br>
><br>
> the (add1 10) syntax object correctly has position 14 and span 9 and<br>
> the add1 syntax object correctly has position 15 and span 4.<br>
><br>
><br>
> But for the program:<br>
><br>
> #lang racket (λ (x) x)<br>
><br>
> the (λ (x) x) syntax object has position 14 but span 11 (2 more than<br>
> expected) and the λ syntax object has position 17 (again, 2 more than<br>
> expected)<br>
><br>
><br>
> Has anyone seen this behavior before?<br>
><br>
><br>
> I'll try to distill my plugin to get something reproducible if it's<br>
> not obvious what's going on.<br>
><br>
> (I think that syntax positions start at 0 and editor positions start<br>
> at 1 but I account for that so that's not the cause of the problem.)<br>
><br>
> (I'm also aware that evaluating (syntax-span #'(λ (x) x)) in the repl<br>
> correctly produces 9 so I don't know what's going on.)<br>
><br>
> _________________________<br>
> Racket Developers list:<br>
> <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
</blockquote></div>
</div></blockquote><blockquote type="cite"><div><span>_________________________</span><br><span> Racket Developers list:</span><br><span> <a href="http://lists.racket-lang.org/dev">http://lists.racket-lang.org/dev</a></span><br></div></blockquote></body></html>