# DrRacket and Scribble datums

**URL:** <https://racket.discourse.group/t/drracket-and-scribble-datums/3659>\
**Category:** Questions & Answers\
**Tags:** drracket, scribble\
**Created:** [March 26, 2025, 12:30pm UTC](https://racket.discourse.group/t/drracket-and-scribble-datums/3659 "2025-03-26T12:30:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevebyan](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@stevebyan](https://racket.discourse.group/u/stevebyan)\
**Post date:** [March 26, 2025, 12:30pm UTC](https://racket.discourse.group/t/drracket-and-scribble-datums/3659/1 "2025-03-26T12:30:47Z")

</div>

How do I persuade DrRacket to let me type an opening square bracket to introduce a datum after the command, as in this example from the Scribble docs: @foo[#:width 2]{blah blah}

It insists on inserting an open parenthesis instead. This is in v8.16 on macOS. Is this a bug? Usually DrRacket seems pretty smart about parens versus brackets, and my module did open with #lang scribble/base.

---

<div class="post-metadata">

**Author:** ![bakgatviooldoos](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/bakgatviooldoos/32/1381_2.png) [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Post date:** [March 26, 2025, 1:33pm UTC](https://racket.discourse.group/t/drracket-and-scribble-datums/3659/2 "2025-03-26T13:33:46Z")

</div>

Hi, @stevebyan.

If I understand you correctly, the setting you are looking for, might be here:

 ![image](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/5/5d763ba8aedadcab3887261fc74598b5b29bfe6d.png)  
(The only unticked one)

I hope that helps. Never had the behaviour change spontaneously, before.

---

<div class="post-metadata">

**Author:** ![stevebyan](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@stevebyan](https://racket.discourse.group/u/stevebyan)\
**Post date:** [March 26, 2025, 4:15pm UTC](https://racket.discourse.group/t/drracket-and-scribble-datums/3659/3 "2025-03-26T16:15:18Z")

</div>

I'd prefer not to disable it completely, rather just override it when it's wrong.

I found an answer in the DrRacket docs. If you type ctrl-[, it disables the auto-adjust of the square brackets.

Still, it would be nice if DrRacket understood @-syntax in #lang scribble.

---

<div class="post-metadata">

**Author:** ![robby](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/robby/32/7_2.png) [@robby](https://racket.discourse.group/u/robby)\
**Post date:** [March 26, 2025, 7:59pm UTC](https://racket.discourse.group/t/drracket-and-scribble-datums/3659/4 "2025-03-26T19:59:15Z")

</div>

It would be nice, true. But it isn't clear what square bracket should do when you type `@foo` and then type `[`. Maybe `{` is actually the best choice (as that's more common), which means that we'd have to keep using control-[, anyway.

Anyway, right now, this special casing isn't specific to the `#lang`-line. If you're curious, it is implemented by [this function](https://github.com/racket/gui/blob/master/gui-lib/framework/private/racket.rkt#L1948); there may be a way to improve things.

---

<div class="post-metadata">

**Author:** ![stevebyan](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@stevebyan](https://racket.discourse.group/u/stevebyan)\
**Post date:** [March 26, 2025, 10:15pm UTC](https://racket.discourse.group/t/drracket-and-scribble-datums/3659/5 "2025-03-26T22:15:57Z")

</div>

Thanks for the pointer to the function. I suppose I'd want `{` as the first choice, unless the next character is already a `{`. In that case I'd want it to insert `[]`.

---

<div class="post-metadata">

**Author:** ![robby](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/robby/32/7_2.png) [@robby](https://racket.discourse.group/u/robby)\
**Post date:** [March 27, 2025, 1:03am UTC](https://racket.discourse.group/t/drracket-and-scribble-datums/3659/6 "2025-03-27T01:03:07Z")

</div>

Oh, that's a nice idea!
