[racket] DrRacket needs work

From: Nadeem Abdul Hamid (nadeem at acm.org)
Date: Mon Nov 14 17:29:21 EST 2011

One other suggestion/request for the automatic parens feature: Can it
be set up so that it skips over the closing paren if the user types
')' while the cursor is right in front of the automatically-inserted
')' ?

I don't know about paredit but Eclipse does this with parens and
various types of braces and it's *very* convenient. A concrete
example: if you're in the process of typing an expression like  (+ 4
(- 1 2) 3) ,  after typing the "2", the expression looks like
  (+ 4 (- 1 2|))
where the | represents the cursor. With the current implementation,
you have to then use the right arrow key to make the cursor skip past
the ) after the 2 and then you can type the 3 . However, that really
disrupts the typing process because even if you don't automatically
type a ) and then realize you have to delete the extra one, you still
have to lift and move your finger to the arrow keys area of the
keyboard. It would be better if, after the state of the expression
above, you type ) and it detects that the cursor is right in front of
a ) and just advance the cursor without adding the extra ) ...  if
that makes sense.

Thanks,

--- nadeem


On Mon, Nov 14, 2011 at 11:43 AM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> Yes, I believe the bug is in that interaction. Sorry I've not had a
> chance to look into it yet.
>
> 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



Posted on the users mailing list.