laurent.orseau
2020-3-13 08:42:18

@laurent.orseau has joined the channel


laurent.orseau
2020-3-13 08:43:20

@greg Seen on http://racket-mode.com\|racket-mode.com. I guess the indentation was lost? :slightly_smiling_face:


greg
2020-3-13 08:43:28

@greg has joined the channel


laurent.orseau
2020-3-13 08:44:03

and thanks a ton for racket-mode! It has been proven very useful to me recently


greg
2020-3-13 13:16:45

@laurent.orseau Yes. http://racket-mode.com\|racket-mode.com consists of some “user guide” sections, followed by (mostly) “reference” sections. The reference sections are generated from the same doc strings that you would see in Emacs if you (say) C-h f.

So the good news is that doc strings are a thing. The bad news is that they are strings. There’s really no formatting. And any markup you might put there, like org or markdown, will be visible as such in the doc strings. The story here isn’t as nice as it is with Racket and Scribble.


greg
2020-3-13 13:16:52

Anyway, I’ve started to use more markup in doc strings — including that example, just not yet merged to master and deployed to http://racket-moe.com\|racket-moe.com. It means the C-h f doc strings may look a little weird. You will see e.g. this (in my upcoming revised doc string):

To extend, use your Emacs init file to #+BEGIN_SRC racket (put SYMBOL 'racket-indent-function INDENT) #+END_SRC SYMBOL is the name of the Racket form like "'test-case" and INDENT is an integer or the symbol "'defun". When INDENT is an integer, the meaning is the same as for lisp-indent-function and scheme-indent-function: Indent the first INDENT arguments specially and indent any further arguments like a body. For example: #+BEGIN_SRC racket (put 'test-case 'racket-indent-function 1) #+END_SRC This will change the indent of `test-case` from this: #+BEGIN_SRC racket (test-case foo blah blah) #+END_SRC to this: #+BEGIN_SRC racket (test-case foo blah blah) #+END_SRC


greg
2020-3-13 13:17:30

Although that looks a little weird, I think it’s OK. Also it means the formatting will be nicer on http://racket-mode.com\|racket-mode.com.


greg
2020-3-13 13:18:01

And in Info docs e.g. C-h i.


greg
2020-3-13 13:20:45

It’s still a bit weird, trying to follow the conventions for doc strings and include some org markup, both. It’s definitely not win/win. But I felt like it’s not-lose/win, maybe? :slightly_smiling_face:


laurent.orseau
2020-3-13 13:26:19

:slightly_smiling_face: