racket-mode
racket-mode copied to clipboard
Major indentation in describe buffer
I just found C-c C-.
, which lets me see docs in Emacs rather than a browser. Nice!
However, some of the docs have so much indentation that they become difficult to read, such as the one for para
in slideshow
:
In the screenshot above, the para
form seems to be duplicated, which I don't see happen.
The indent for the second one is indeed crazy. But it shouldn't be present at all, so I'm tempted to set that aside for now as being some distinct other problem. Which, again, I can't repro (yet).
The indent for the first one is reasonable, up until the final element
argument. I see it indented a few spaces too far (not nearly as far as your screenshot) but otherwise no issues. What I'm seeing, isn't quite right, but I'd probably shrug it off as "good enough" until I had more time to fix it. (The spirit of racket-describe
is to be something in-Emacs that's more helpful than eldoc
level of info, but not attempting to re-implement the UX of Racket docs in a real/full browser.)
What you're seeing, of course, definitely isn't "good enough".
I'm just stumped, at the moment, what's happening and how to fix it.
There are two main stages where something could do wrong:
- Racket doesn't supply a way to get the HTML doc for a function. See hackery in
scribble.rkt
. - To render the HTML in an Emacs buffer, we use
shr
. Its behavior may be changing over Emacs versions. What Emacs version are you using? I tried this with 25.0.50.2, just now (a bit old).
I just tried it with an Emacs in which M-x emacs-version
prints:
GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.16.7) of 2016-01-13
using the latest racket-mode
from MELPA. I can try with another later.
I've been reviewing open issues, and I'm going to close this -- I was never able to reproduce this, and, the code involved has changed enough there's a non-zero chance you would no longer be able to, either... I'm pretty sure.
Having said that if you or anyone else sees this, feel free to re-open and I'll take another look!