[racket] round/square (was: Re: DrRacket needs work)

From: John Clements (clements at brinckerhoff.org)
Date: Mon Nov 14 17:58:34 EST 2011

On Nov 14, 2011, at 8:43 AM, Robby Findler wrote:

> Yes, I believe the bug is in that interaction. Sorry I've not had a
> chance to look into it yet.

Let me stick my hand up here: I'm the one who added automatic parens.

Yes, automatic parens don't work with square brackets. This is a symptom of the special treatment of square brackets when editing code, and I've suffered with this distinction for two or three years now.

More generally, the right fix is to rewrite this code in order to bring the round-square paren code (should this delimiter be square or round) together with the automatic paren code.

I agree that this is very irritating; I should fix it. With that said, I do believe the existing behavior is superior to the prior behavior.

John


> 
> Robby
> 
> On Mon, Nov 14, 2011 at 7:58 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
>> This may be a bad interaction between the automatic parens and the
>> automatic paren adjustment, which puts in the right kind of paren in
>> the right place.
>> 
>> Robby, do you know what's going on here?
>> 
>> On Mon, Nov 14, 2011 at 8:49 AM, Eric Tanter <etanter at dcc.uchile.cl> wrote:
>>> Here is what I did:
>>> 
>>> - activate the automatic parentheses option
>>> 
>>>  then:
>>> 
>>> type `('
>>> --> ()
>>> 
>>> type `let ('
>>> --> (let ())
>>> 
>>> type `['
>>> --> (let ([))
>>> 
>>> Here I would have expected
>>> --> (let ([]))
>>> 
>>> ?
>>> 
>>> -- Éric
>>> 
>>> 
>>> On Nov 14, 2011, at 10:10 AM, Sam Tobin-Hochstadt wrote:
>>> 
>>>> They have successfully inserted thousands of square brackets for me.
>>>> :)  What are you doing that doesn't work?
>>>> 
>>>> On Mon, Nov 14, 2011 at 6:06 AM, Eric Tanter <etanter at dcc.uchile.cl> wrote:
>>>>> Nice!
>>>>> 
>>>>> but automatic parentheses does not seem to work with square brackets.
>>>>> 
>>>>> -- Éric
>>>>> 
>>>>> 
>>>>> On Nov 13, 2011, at 10:42 AM, Robby Findler wrote:
>>>>> 
>>>>>> Thanks for the suggestions. One minor observation below.
>>>>>> 
>>>>>> On Sun, Nov 13, 2011 at 4:50 AM, Tomi Neste <tomi.neste at gmail.com> wrote:
>>>>>>> - Paredit like editing functions, I can't personally use an editor
>>>>>>> without these anymore. Again, this is something that could be hacked
>>>>>>> up easily in Emacs but with DrRacket I have no idea where to start.
>>>>>> 
>>>>>> 
>>>>>> I think you want to open the preferences dialog, go to the Editing
>>>>>> pane, General subpane, and click "Enable automatic parentheses".
>>>>>> 
>>>>>> Robby
>>>>>> _________________________________________________
>>>>>>  For list-related administrative tasks:
>>>>>>  http://lists.racket-lang.org/listinfo/users
>>>>>> 
>>>>> 
>>>>> 
>>>>> _________________________________________________
>>>>>  For list-related administrative tasks:
>>>>>  http://lists.racket-lang.org/listinfo/users
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> sam th
>>>> samth at ccs.neu.edu
>>>> 
>>> 
>>> 
>> 
>> 
>> 
>> --
>> sam th
>> samth at ccs.neu.edu
>> 
> 
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4624 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20111114/10de6222/attachment.p7s>

Posted on the users mailing list.