On Fri, Sep 18, 2020 at 2:14 PM Lars Ingebrigtsen <
larsi@gnus.org> wrote:
Mattias Engdegård <mattiase@acm.org> writes:
> When moving by sexp (C-M-f, C-M-u and so on) and point is already at a
> boundary preventing further movement, Emacs currently signals an
> internal error such as
>
> Scan error: "Containing _expression_ ends prematurely", 5010, 5010
>
> or
>
> Scan error: "Unbalanced parentheses", 5010, 1
>
> which is unhelpful and rather looks as if something went wrong in the
> internal machinery.
Yes, those error messages are confusing in interactive usage.
I disagree strongly. Maybe the integers following them and
containing character positions are confusing, but the messages
themselves are fine.
Here's my use case. When selecting a certain amount of forms
inside another one, but not an outermost one, I type a lot of M-PC
until I see the "Containing _expression_..." message. I actively look
out for it. When it pops up, the region persists. I can then C-w
or do whatever, keeping that part of the code balanced. If, however,
the message is "Unbalanced parenthesis", I know something's up
and have to fix it.
Please don't remove the message and/or conflate the two cases.
João