Re: [racket-dev] [racket] Parens/string quotes automatic behavior

2013-05-23 Thread Robby Findler
On Thursday, May 23, 2013, Nadeem Abdul Hamid wrote:

 Hello Racket devs,

 I'm working on tweaking how typing a double quote is handled in strings
 when DrRacket'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'd be
 appreciated: In addition to handling Laurent's initial feature request (see
 message at bottom), I'm setting it up so that if the following string is in
 the DrRacket window:
   abcdefghi
 and you select the _def_ and press  (double quote), then it places
 double-quotes around the def with additional quotes to ensure that the
 other two portions of the string are still validly delimited, i.e.
   abcdefghi

 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.:
   abc|defghi
 or abc|defghi
 ?


Oh: another possibility: keep the selection where it is (or, perhaps
better, select the open quote, the def, and the close quote).


 Another question is whether to space off the def string that is created
 from the surrounding ones, i.e.
   abc def ghi
 instead of abcdefghi?

 (As a side note: the Emacs paredit mode handles the situation of a double
 quotes typed inside a string by inserting an escaped \. It uses a separate
 key combination to handle splitting both strings and parenthesized
 expressions into two pieces.)

 Thanks,

 --- nadeem

 On May 22, 2013, at 7:07 AM, Laurent wrote:

  Hi,
 
  The new behavior of automatic parenthesis matching is really nice, but
 there is one problem with string quotes.
  For example, if the cursor is in the middle of a string and I type the
 string-quote symbol , it places a quote which cuts the current string and
 leaves the right part in a bad syntax.
 
  Most of the time, when I type a quote inside a string, it's because I
 want to split the string in two parts.
  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.
 
  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?

_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] Parens/string quotes automatic behavior

2013-05-23 Thread John Clements

On May 23, 2013, at 8:13 AM, Robby Findler wrote:

 
 
 On Thursday, May 23, 2013, Nadeem Abdul Hamid wrote:
 Hello Racket devs,
 
 I'm working on tweaking how typing a double quote is handled in strings when 
 DrRacket'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'd be 
 appreciated: In addition to handling Laurent's initial feature request (see 
 message at bottom), I'm setting it up so that if the following string is in 
 the DrRacket window:
   abcdefghi
 and you select the _def_ and press  (double quote), then it places 
 double-quotes around the def with additional quotes to ensure that the 
 other two portions of the string are still validly delimited, i.e.
   abcdefghi
 
 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.:
   abc|defghi  
 or abc|defghi
 ?
 
 
 Oh: another possibility: keep the selection where it is (or, perhaps better, 
 select the open quote, the def, and the close quote).

+1

John

_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] [racket] Parens/string quotes automatic behavior

2013-05-23 Thread Laurent
+1 indeed, that way you can follow easily with typing a paren, thus
enclosing it again.

Laurent
Le 23 mai 2013 17:17, John Clements cleme...@brinckerhoff.org a écrit :


 On May 23, 2013, at 8:13 AM, Robby Findler wrote:



 On Thursday, May 23, 2013, Nadeem Abdul Hamid wrote:

 Hello Racket devs,

 I'm working on tweaking how typing a double quote is handled in strings
 when DrRacket'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'd be
 appreciated: In addition to handling Laurent's initial feature request (see
 message at bottom), I'm setting it up so that if the following string is in
 the DrRacket window:
   abcdefghi
 and you select the _def_ and press  (double quote), then it places
 double-quotes around the def with additional quotes to ensure that the
 other two portions of the string are still validly delimited, i.e.
   abcdefghi

 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.:
   abc|defghi
 or abc|defghi
 ?


 Oh: another possibility: keep the selection where it is (or, perhaps
 better, select the open quote, the def, and the close quote).


 +1

 John


 _
   Racket Developers list:
   http://lists.racket-lang.org/dev


_
  Racket Developers list:
  http://lists.racket-lang.org/dev