Hi Greg,
    Thank you for the very detailed explanation. I was also very much not
my intention to belittle racket-mode and I will evoke my "yes indeed my
knowledge was quite incomplete." I have learned many very useful things
from this thread (C-u C-c C-c is a reminder that stopping by the manual is
usually surprisingly productive in all parts of the racket world)! As you
suggest, I'm also fairly certain that some of my issues came from me
writing my own macros and stripping the loc without realizing what I was
doing (syntax vs syntax/loc was on the list of things to contribute to the
docs but has now been bumped up). I wonder if there is a way to indicate
that the source location of a piece of code has been stripped and warn the
user about it and whether that would result in a blizzard of warnings or
whether it might be useful for indicating a potential source of missing
debug information (a hard problem).

Best!
Tom

PS Extra major thank you for all your work on racket-mode I find myself
missing many of its features whenever I have to work in another language or
editor!

On Thu, Apr 4, 2019 at 8:48 PM Greg Hendershott <greghendersh...@gmail.com>
wrote:

> > Are you using emacs racket-mode? I have experience this issue only in
> that mode since it does not (to my knowledge) implement all the error
> anchoring features of DrRacket.
>
> It might just be that you have DrRacket set to user a higher
> errortrace level than racket-mode?
>
> That is, in DrR, Language | Choose Language | Dynamic Properties, you
> may have chosen one of the "Debugging"  radio buttons and checked
> "Preserve stack trace".
>
> In racket-mode, the equivalent is the `racket-error-context` variable:
>
>
> https://github.com/greghendershott/racket-mode/blob/master/Reference.md#racket-error-context
>
> If you have it set to 'low or 'medium, you might not get as much error
> context as with 'high (just like if you had "weaker" options in that
> DrR dialog box, DrR wouldn't show you as good error context).
>
> As Eric notes, you can leave this set to 'low or 'medium, and do C-u
> C-c C-c to re-reun with it temporarily set to 'high. This can be a
> nice way to get the best of both worlds: Normally things build and run
> faster (errortrace can be slow). If you experience an error, and the
> message isn't ideal, you can C-u C-c C-c.
>
>
> Finally, racket-repl-mode tries to notice Racket error messages in the
> output and "linkify" them. You can click them with the mouse, or use
> the standard M-x next-error (often bound to C-x `) to go to the error
> location. This works with rackunit failures as well as errors.
>
> Of course, it helps if the error file is /path/to/foo.rkt instead of
> foo.rkt. Sometimes Racket tries to be helpful and abbreviate long
> pathnames to be <pkgs>. racket-mode tries to defeat this abbreviation
> so go-to-error can work. :)
>
> Also, some macros don't do the ideal thing -- i.e. don't use e.g.
> syntax/loc or quasisyntax/loc -- and the error location is inside the
> macro when it might make more sense for it to be the macro use site.
> There's not much racket-mode can do about that, AFAICT.
>
>
> p.s. I didn't feel like you were dissing racket-mode, so I hope the
> above doesn't sound defensive. I want to explain what it attempts to
> do. I dogfood it heavily and I don't like it to annoy me. :)  However
> I know it's far from perfect.  Also there are sometimes long stretches
> where I have to be mostly just another user of racket-mode for $WORK,
> and can't really detour to work on racket-mode much. Fortunately there
> are other people who help contribute fixes and improvements (although
> sometimes I get so busy I can barely keep up with their offered help,
> and feel doubly guilty).
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to