From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#47677: [PATCH] condition-case success continuation Date: Sun, 25 Apr 2021 18:45:31 +0200 Message-ID: <87wnsql3dg.fsf@gnus.org> References: <219007D9-0FD0-4AC2-A8B0-24A0FC277AE8@acm.org> <87lf9nzy48.fsf@gnus.org> <87F315E7-7F8A-46C5-A71B-F090F067D0B8@acm.org> <87sg3uskgt.fsf@gnus.org> <87zgy1qkni.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10424"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Kangas , Stefan Monnier , 47677@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 25 18:46:23 2021 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 1lahtm-0002bB-Uj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Apr 2021 18:46:22 +0200 Original-Received: from localhost ([::1]:38720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lahtl-0006QT-Vq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Apr 2021 12:46:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lahtS-0006PM-Ee for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 12:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lahtR-0004ue-SC for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 12:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lahtR-0007ay-R4 for bug-gnu-emacs@gnu.org; Sun, 25 Apr 2021 12:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Apr 2021 16:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47677 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 47677-submit@debbugs.gnu.org id=B47677.161936914729173 (code B ref 47677); Sun, 25 Apr 2021 16:46:01 +0000 Original-Received: (at 47677) by debbugs.gnu.org; 25 Apr 2021 16:45:47 +0000 Original-Received: from localhost ([127.0.0.1]:43610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lahtC-0007aT-Lw for submit@debbugs.gnu.org; Sun, 25 Apr 2021 12:45:46 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:36784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lahtB-0007aH-NN for 47677@debbugs.gnu.org; Sun, 25 Apr 2021 12:45:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Ntk5PHW32LLI+YG+JytdYCjpRonMWU1B11iOmZZgces=; b=H5UjDrXkMdbAkgyIe9Y15Z4ny8 Fgn+yBJEkiWddxdn0JxoojF4IKrX6vqRTUO6ENyXUL0rOVOdn8e/34BkEXOvB/ppCGDymSQsgDQee df+wW43WuYGAE3Fz6GvQQI4e7XiWyBZEiqwweDQJvEFmUgZTXhWcAWDzWXPaHPL7mxGY=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lahsy-00005O-I7; Sun, 25 Apr 2021 18:45:38 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAKlBMVEUGDREtIhotGBEw LTF1a2qCdm9VTElpXVRDPkCakJSHf4ZIMCCYiXz////g6gyvAAAAAWJLR0QN9rRh9QAAAAd0SU1F B+UEGRApG4DJazMAAAChSURBVDjLY2AgGQjhklAg3axRQD1g4pqWll7iEoEhkeLGYMCYOXM6hkSL AEOVi0U5psRWBobIWRltWCWqMtzSsEoYM2Y0u2ORYC5gNDYox5DYo+6WbGxs6IIhoZYGBsXE+VpI CQQUlRQFBYFMRUEBqDjTJiUUoL0BJrGBCSygoKQE0qvAvQGXDgHiXIAHMAkoYJdQwiUxXABjAy4J A4rMBQBojSPfqYhURgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNC0yNVQxNjo0MToyNyswMDow MLnKXeUAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDQtMjVUMTY6NDE6MjcrMDA6MDDIl+VZAAAA AElFTkSuQmCC X-Now-Playing: Spirit's _1983-1991 (4): Original Versions_: "Nature's Way" In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Thu, 22 Apr 2021 15:58:10 +0200") 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:204888 Archived-At: Mattias Engdeg=C3=A5rd writes: > (condition-case x > (throw 'meep 2) > ((:catch 'meep) (+ x 3))) > =3D> 5 > > Multiple catch and error handlers can be mixed freely in the same > `condition-case` form, which can also include a :success clause. Sorry; I'm not very enthusiastic about this construct -- it just seems like an awkward hack to me. condition-case is about handling errors -- it can be used as a general flow control system, but that's an awkward fit. It conveys intention. So I don't think we should extend it to handle more throw/catch-like things. However, I do agree that Emacs Lisp could need some beefing up in the "early return" department (which this is a kind of example of), but I don't know what that would look like. But I don't think it should look like this. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no