From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#43489: [PATCH] Don't signal scan-error when moving by sexp interactively Date: Mon, 28 Sep 2020 13:05:27 -0400 Message-ID: References: <64C7CB3A-36F2-4988-9FF9-B99115C9ED13@acm.org> <87imcbds81.fsf@gnus.org> <9FE2FD7F-84CF-415B-BD7F-DDAF0D401414@acm.org> <874kntsvm7.fsf@gnus.org> <9852E6CA-1EB9-41B6-8B01-DAD627C2ED21@acm.org> <87tuvsjkax.fsf@gnus.org> <47564F1F-5826-43B1-A9F1-1F4440AF2A6A@acm.org> <87ft7bmbj9.fsf@gnus.org> <87d02dj312.fsf@gnus.org> <87eemsd32m.fsf@gnus.org> <23809679-C345-4780-94FF-3CDF8AEC0787@acm.org> <87lfgzm124.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27656"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Lars Ingebrigtsen , 43489-done@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 28 19:06:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMwbK-00076M-Vs for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Sep 2020 19:06:10 +0200 Original-Received: from localhost ([::1]:33914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMwbJ-00061V-U1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Sep 2020 13:06:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMwbC-00060I-Nt for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 13:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMwbC-0004sr-Ce for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 13:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kMwbC-0002zN-7D for bug-gnu-emacs@gnu.org; Mon, 28 Sep 2020 13:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Sep 2020 17:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43489-done@debbugs.gnu.org id=D43489.160131273711454 (code D ref 43489); Mon, 28 Sep 2020 17:06:02 +0000 Original-Received: (at 43489-done) by debbugs.gnu.org; 28 Sep 2020 17:05:37 +0000 Original-Received: from localhost ([127.0.0.1]:53876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMwan-0002yg-AQ for submit@debbugs.gnu.org; Mon, 28 Sep 2020 13:05:37 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMwal-0002yU-JE for 43489-done@debbugs.gnu.org; Mon, 28 Sep 2020 13:05:36 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 34660441331; Mon, 28 Sep 2020 13:05:30 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id F1EDB44132E; Mon, 28 Sep 2020 13:05:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1601312728; bh=G5Un/6xsvBJAga+BBE9rOeogAg1lw4Rr7/qyfJrph20=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=mPXcTbkWDOjSU0DRgRBdA/EBY//HF5daIyvz57L23CVDDJNBLlxApTVhTr4f3G6kN CyeRpwLIofbV2FMzWuGFOmI9ABKi6XmI40SvUgEXu4qsSxTRQGD/z5zgrHxJ/7s/1V mGATMHoA6+oFLiV7NG8i/fi5oZOX/uaqo/MOQOpjzyFvXRFQ5kuwx9Ofk+4U1csjmP xe23t1vnlr4qVqgc5KNiPWopmUFTszBRQdVExDejPeALjllHcLy/yE/yjw9aBJ4H4b QlOdm2Vk+3iTu/9ZUtnkpOp40DSuujAreqjIW40fWa7oX1uRx0mN+MqA3kgi5qxFS4 gp+PlwV2uyFGg== Original-Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B03E112051F; Mon, 28 Sep 2020 13:05:28 -0400 (EDT) In-Reply-To: <87lfgzm124.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Thu, 24 Sep 2020 20:23:15 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189216 Archived-At: >>> 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