Closed soegaard closed 8 months ago
I believe racket-xp-mode
is showing the exn-message
string as-is.
When the error-print-source-location
parameter is true (the default) then that path:line:column prefix is baked into the exn-message
string.
I guess it would be possible to prevent it by setting error-print-source-location
false, OR, try to eliminate it via a regexp. I can think of gotchas both ways, not sure which way is the least worst...
Rather than remove the location prefix from the error message at a low level, I decided to detect it with a regexp and remove it only as a "presentation detail" for the specific purpose of the help-echo property (displayed as a popup).
The full error message text is used in other places, e.g. for M-x next-error
, and I think that's fine and less likely to cause unintended consequences.
The following image shows what happens when I enter an { and waits a bit.
The popup error is correct of course - but the error location is unhelpful - since the cursor is already on that line. It would better just to display "remember the closing }" when the cursor is on the same line as the error location.
Package
System values
Buffer values
Racket Mode values
Minor modes
Disabled minor modes