GNU bug report logs - #43489
[PATCH] Don't signal scan-error when moving by sexp interactively

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Fri, 18 Sep 2020 11:32:02 UTC

Severity: normal

Tags: patch

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


Message #109 received at 43489-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: João Távora <joaotavora <at> gmail.com>
Cc: Mattias Engdegård <mattiase <at> acm.org>,
 Lars Ingebrigtsen <larsi <at> gnus.org>, 43489-done <at> debbugs.gnu.org
Subject: Re: bug#43489: [PATCH] Don't signal scan-error when moving by sexp
 interactively
Date: Mon, 28 Sep 2020 13:05:27 -0400
>>> I disagree Mattias.  I think swallowing errors is bad, generally.
>>
>> Agreed, BUT the reason Matthias did it this way is that the error we get
>> currently from `scan-sexp` can't be turned into a good error message
>> without knowing that it was triggered during `forward-sexp`.
>
> I don't understand.  The point about not swallowing errors is that we
> don't want to turn them into anything else.

By "turning into" I'm referring to the job of `print-object` done in
the command-loop when it catches an unhandled error.

> I don't see why scan-sexp needs to be changed.

Because the error objects it throws give information that is
difficult/impossible to turn into good error messages.  For example,
when doing an up-list, `scan-sexp` may signal the error object:

    (scan-error "Unbalanced parentheses" 5010 1)

even tho there is no unbalanced paren in the buffer.
Instead, the error is that we were not within a set of parens when
we started.


        Stefan





This bug report was last modified 4 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.