all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: "Mattias Engdegård" <mattiase@acm.org>,
	"Stefan Monnier" <monnier@iro.umontreal.ca>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 43489@debbugs.gnu.org
Subject: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively
Date: Wed, 23 Sep 2020 15:45:41 +0100	[thread overview]
Message-ID: <CALDnm529LiWa9-TtujyyQMmjtepB-w6cuwNvTMxmXWn=jwZVtA@mail.gmail.com> (raw)
In-Reply-To: <C2BC1345-1AF1-40F9-A95A-1BADC6596C36@acm.org>

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

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 <mattiase@acm.org> wrote:

> 23 sep. 2020 kl. 15.40 skrev Lars Ingebrigtsen <larsi@gnus.org>:
>
> > 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

[-- Attachment #2: Type: text/html, Size: 2245 bytes --]

  reply	other threads:[~2020-09-23 14:45 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 11:31 bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively Mattias Engdegård
2020-09-18 13:13 ` Lars Ingebrigtsen
2020-09-18 13:18   ` Dmitry Gutov
2020-09-18 13:42     ` Lars Ingebrigtsen
2020-09-18 13:48       ` Dmitry Gutov
2020-09-18 15:13   ` Mattias Engdegård
2020-09-18 15:23     ` Lars Ingebrigtsen
2020-09-18 16:01       ` Mattias Engdegård
2020-09-19 14:13         ` Lars Ingebrigtsen
2020-09-20 17:33           ` Mattias Engdegård
2020-09-20 19:54             ` Lars Ingebrigtsen
2020-09-21 10:55               ` Mattias Engdegård
2020-09-21 14:47                 ` Lars Ingebrigtsen
2020-09-21 17:12                   ` Mattias Engdegård
2020-09-22 14:32                     ` Lars Ingebrigtsen
2020-09-23  9:17                       ` Mattias Engdegård
2020-09-23 13:40                         ` Lars Ingebrigtsen
2020-09-23 14:33                           ` Mattias Engdegård
2020-09-23 14:45                             ` João Távora [this message]
2020-09-23 16:24                               ` Mattias Engdegård
2020-09-23 16:37                                 ` João Távora
2020-09-24 15:50                                   ` Mattias Engdegård
2020-09-24 15:58                                     ` João Távora
2020-09-24 17:32                                       ` Stefan Monnier
2020-09-24 19:23                                         ` João Távora
2020-09-28 17:05                                           ` Stefan Monnier
2020-09-20 21:39             ` Dmitry Gutov
2020-09-21 11:21               ` Mattias Engdegård
2020-09-21 12:36                 ` Dmitry Gutov
2020-09-21 17:12                   ` Mattias Engdegård
2020-09-21 17:49                     ` Dmitry Gutov
2020-09-21  8:49   ` João Távora
2020-09-21 14:43     ` Lars Ingebrigtsen
2020-09-21 17:12     ` Mattias Engdegård
2020-09-21 17:25       ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDnm529LiWa9-TtujyyQMmjtepB-w6cuwNvTMxmXWn=jwZVtA@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=43489@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=mattiase@acm.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.