<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 &lt;<a href="mailto:stchang@ccs.neu.edu">stchang@ccs.neu.edu</a>&gt; 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" &lt;<a href="mailto:robby@eecs.northwestern.edu">robby@eecs.northwestern.edu</a>&gt; 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 &lt;<a href="mailto:stchang@ccs.neu.edu">stchang@ccs.neu.edu</a>&gt; wrote:<br>
&gt; I have a drracket plugin that reads the contents of the definitions<br>
&gt; window as syntax and then traverses that syntax object so that for<br>
&gt; each subexpression e it prints<br>
&gt; 1) (syntax-&gt;datum e), and<br>
&gt; 2) the contents of the definitions window at starting at position<br>
&gt; (syntax-position e) and ending at (syntax-position e) + (syntax-span<br>
&gt; e)<br>
&gt;<br>
&gt; I would expect each subexpression in the program to be printed twice<br>
&gt; and the plugin generally works as expected, except when I use the<br>
&gt; unicode lambda character.<br>
&gt;<br>
&gt;<br>
&gt; For example, if I have the program:<br>
&gt;<br>
&gt; #lang racket (add1 10)<br>
&gt;<br>
&gt; the (add1 10) syntax object correctly has position 14 and span 9 and<br>
&gt; the add1 syntax object correctly has position 15 and span 4.<br>
&gt;<br>
&gt;<br>
&gt; But for the program:<br>
&gt;<br>
&gt; #lang racket (λ (x) x)<br>
&gt;<br>
&gt; the (λ (x) x) syntax object has position 14 but span 11 (2 more than<br>
&gt; expected) and the λ syntax object has position 17 (again, 2 more than<br>
&gt; expected)<br>
&gt;<br>
&gt;<br>
&gt; Has anyone seen this behavior before?<br>
&gt;<br>
&gt;<br>
&gt; I'll try to distill my plugin to get something reproducible if it's<br>
&gt; not obvious what's going on.<br>
&gt;<br>
&gt; (I think that syntax positions start at 0 and editor positions start<br>
&gt; at 1 but I account for that so that's not the cause of the problem.)<br>
&gt;<br>
&gt; (I'm also aware that evaluating (syntax-span #'(λ (x) x)) in the repl<br>
&gt; correctly produces 9 so I don't know what's going on.)<br>
&gt;<br>
&gt; _________________________<br>
&gt; &nbsp;Racket Developers list:<br>
&gt; &nbsp;<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> &nbsp;Racket Developers list:</span><br><span> &nbsp;<a href="http://lists.racket-lang.org/dev">http://lists.racket-lang.org/dev</a></span><br></div></blockquote></body></html>