<br><br>On Thursday, May 23, 2013, Nadeem Abdul Hamid  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Racket devs,<div><br>
<div>I&#39;m working on tweaking how typing a double quote is handled in strings when DrRacket&#39;s auto parens mode is on, per recent post on the users list. If any of you use the mode and can offer feedback on the following, it&#39;d be appreciated: In addition to handling Laurent&#39;s initial feature request (see message at bottom), I&#39;m setting it up so that if the following string is in the DrRacket window:</div>


<div>  &quot;abcdefghi&quot;</div><div>and you select the _def_ and press &quot; (double quote), then it places double-quotes around the &quot;def&quot; with additional quotes to ensure that the other two portions of the string are still validly delimited, i.e.</div>


<div>  &quot;abc&quot;&quot;def&quot;&quot;ghi&quot;</div><div><br></div><div>One question is where to put the cursor following this operation? Should it be right inside the beginning of the lifted string, or in front of its double quotes, i.e.:</div>


<div>  &quot;abc&quot;&quot;|def&quot;&quot;ghi&quot;  </div><div>or &quot;abc&quot;|&quot;def&quot;&quot;ghi&quot;</div><div>?</div><div><br></div></div></div></blockquote><div><br></div><div>Oh: another possibility: keep the selection where it is (or, perhaps better, select the open quote, the def, and the close quote).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div></div><div>Another question is whether to space off the &quot;def&quot; string that is created from the surrounding ones, i.e.</div>


<div>  &quot;abc&quot; &quot;def&quot; &quot;ghi&quot;</div><div>instead of &quot;abc&quot;&quot;def&quot;&quot;ghi&quot;? </div><div><br></div><div>(As a side note: the Emacs paredit mode handles the situation of a double quotes typed inside a string by inserting an escaped \&quot;. It uses a separate key combination to handle splitting both strings and parenthesized expressions into two pieces.)</div>


</div><div><br></div><div>Thanks,</div><div><br></div><div>--- nadeem</div><div><br></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">On May 22, 2013, at 7:07 AM, Laurent wrote:</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">


<br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt; Hi,</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">


<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt;</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt; The new behavior of automatic parenthesis matching is really nice, but there is one problem with string quotes.</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">


<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt; For example, if the cursor is in the middle of a string and I type the string-quote symbol &quot;, it places a quote which cuts the current string and leaves the right part in a bad syntax.</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">


<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt;</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt; Most of the time, when I type a quote inside a string, it&#39;s because I want to split the string in two parts.</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">


<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt; To do that, I have to type string-quote, string-quote, delete (to remove the extra string-quote added by the paren-match behavior), and left to go back between the two strings, which is mildly annoying.</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">


<span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt;</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">&gt; Would it be possible (unless problematic) to have the default paren-match behavior for strings that splits the string instead of inserting a single string-quote, possibly unless the left symbol is a backslash?</span><br style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">


</div></div>
</blockquote>