racket-mode icon indicating copy to clipboard operation
racket-mode copied to clipboard

Major indentation in describe buffer

Open david-christiansen opened this issue 8 years ago • 2 comments

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: screenshot from 2016-01-04 21-56-58

david-christiansen avatar Jan 04 '16 21:01 david-christiansen

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:

  1. Racket doesn't supply a way to get the HTML doc for a function. See hackery in scribble.rkt.
  2. 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).

greghendershott avatar Jan 17 '16 15:01 greghendershott

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.

david-christiansen avatar Jan 18 '16 14:01 david-christiansen

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!

greghendershott avatar Jan 31 '24 17:01 greghendershott