Subject: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively

From: João Távora <[email-masked]>
Date: Wed, 23 Sep 2020 15:45:41 +0100

I must say that while this makes some sense at the UI level
to me, resignalling errors is a bad practice all around.  Not only
does it convolute the code, but errors should have, in all situations,
I guess even in interactive ones, as much stack as they can.

I think the correct fix here is to change the way that the error
is *printed*.  In the end that was the original motivation behind
the bug report!  In CL this is easy enough to do with the
PRINT-OBJECTgeneric function.  That print function would  print
the alternate message in this particular interactive context. I
think Emacs has recently gained the means to do something
similar to PRINT-OBJECT, has it not?  I seem to remember
Stefan Monnier telling me so.

If it has not, and we do decide to go this route, I'd just nitpick
that the parameter name should be INTERACTIVE or
RESIGNAL-ERROR.  So that unsuspecting programs calles
won't expect the error to have the properties of the scan-error
object if they pass non-nil in the parameter.

João

On Wed, Sep 23, 2020 at 3:34 PM Mattias Engdegård <[email-masked]> wrote:

> 23 sep. 2020 kl. 15.40 skrev Lars Ingebrigtsen <[email-masked]>:
>
> > The parameter is NOERROR, but now it does signal an error.  :-)
> >
> > So perhaps the parameter should be USER-ERROR/TERSE-ERROR or something
> > and the doc strings adjusted?
>
> Good catch, thank you! The pushed change uses USER-ERROR.
>
>
>
>
>

-- 
João Távora