From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.help Subject: Re: Error does not throw to debugger in 'when' block Date: Thu, 12 Jan 2023 10:08:13 +0100 Message-ID: References: <83o7r4kvgs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16597"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 12 10:10:31 2023 Return-path: Envelope-to: geh-help-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 1pFtbT-0004Bo-A2 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 12 Jan 2023 10:10:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFtZO-0006jU-Eu; Thu, 12 Jan 2023 04:08:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFtZN-0006hp-0N for help-gnu-emacs@gnu.org; Thu, 12 Jan 2023 04:08:21 -0500 Original-Received: from mail-he1eur04olkn2031.outbound.protection.outlook.com ([40.92.73.31] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFtZL-0001wq-Bc; Thu, 12 Jan 2023 04:08:20 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HSw2MlcZNQ+7qLPlu0QZY+Hoo1YowDJyPR0CXU4vFT+Ygzlz9Yfl+UkAqxEl0/yVwzCgVT/+WxSwFBE1c8l23PAgHxIZ/+JDyO2kv9dWn6HLn9jRf/jgYqvdHi96CBuew7QQ6ZGBZDo892RsNcNScNbeXf6Hnoe/eZLw1gOAcDR4LrIJZFHxEC+WLI0h8Hgj5g6Wbi7YeWIRboATeobWj7UDODa8oM7EZStVb1tJwv36uc9IEdf3g0d/oXgT562trVHqsFqZmW0MvemsnXwUTZXmNzx/W2UrJl5SfozQzFWzJOCZE76LT+0MnwqFTDsyKZhbDZkeBvkoBcph7QfOJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S8fwMAUHfp2C1R8jdOqdHUJ1sphmUHgKghyhCUmkfW8=; b=gdw8tOdt2C10tu9jlokFJD8mt/6ulYjoMaHVAkJTc1ENK2nSO2PREKkUeANMI+Lmqfmu2dWEnmPYlhCcojRfknaM68y5m9Dgb3tmwLS329k3GVVhM0IiCuIVJSw1Os5B6Vxh+rlTp4VHMvGTCXNy3M5t0FGDKEi0Ss2uimO4ryuClgugI3XQ30zRfehKlE4/JiMyIobNMibWXP6ll6IHiQ/jNDrfjl3xqbBgSrrbIXxfG+yc6PK5nY1CNCFiFCmfW5abvsrYuoqBzh3nEor3HMr01hiHHcXt/l0C74DvqX/NZ4jGeYlSDdgHSO6gdZRfepaEEyyq+97b5tUA/1ZuBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S8fwMAUHfp2C1R8jdOqdHUJ1sphmUHgKghyhCUmkfW8=; b=RxqNFPxIofuoBbrk02BKHGJZcx81my4wLXZYFXOfz0qrvbtXlbLs4TfIKbOB79trK4AqgTu+LqPhjfaY6ds/z1hPwuyDwvlM8BK2ClOpoBB+XdipFzpWzMBM+EWdskLSS8mfD85ZFReX0ebr+N7R65ncMA+GDp4HVTKCnrDPxM9NXSO22vAPKxDFhP0s3Z3tZyql3OyvH1M1j9WuButzDw6HkjbvyWl+LxOZVoWf7maUHZ/4H1gjFTnFoOLAot57jUI5TvTsab9DNZLy2jhjqOUEl8JhbGrF+Ak4F8PncARjnQaaTtLUr48YENxIu3c79Bit5jygzTqdVUKmEWpsBg== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by VI1PR09MB4287.eurprd09.prod.outlook.com (2603:10a6:800:159::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Thu, 12 Jan 2023 09:08:15 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::f2af:9752:58df:ad9]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::f2af:9752:58df:ad9%3]) with mapi id 15.20.5986.019; Thu, 12 Jan 2023 09:08:15 +0000 In-Reply-To: <83o7r4kvgs.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 12 Jan 2023 10:28:35 +0200") X-TMN: [1F4NxK8BNahSNeoyc5YZbKh1tOJe8suz] X-ClientProxiedBy: BE1P281CA0037.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:22::18) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <871qo05ddu.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|VI1PR09MB4287:EE_ X-MS-Office365-Filtering-Correlation-Id: 8cac63b3-718b-4325-c13a-08daf47c897e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nYO5vhlIGQXybdI5m1hYloh8yOu2co3zLtXRMM0v9CtRpWqat38Ry+uIP3Dyyx2Tw41NqEnkz+WKxHOfzklDdGyes2Ep+EahA9+2vu0PqmWihixT8LGd3pitn1YUSFkBE80cr90QTugM7EbZg2e2qdAT3d+/yJRks7qiZWr2VM3RAr+oKP0K+9+sBvljT2Hhd3uD77ME92OY/0ANX+CLa+WBPdRedBMDY5IBIqgMvSAt9UyYzQXIsQIZTF3zznHRpyGAKuBaTgHBVdwvwGzgaVTt55X6nIm6GCdRLkfH2Vl0kFnhcLi2TmkQJx361oR4JF36j+Rj2/CJzA2jwAEK5eFpy9bx+FGwYIbtIAm24yCJZZ9b0UxiBybsNZwLesSSoDKSb5V6KcedZhbqTCkZTHy8229XXFDQy/UOuzhtjtGtaZLaK9B5nJtb2xHbhogps7JV8dEBAlacFLulmF1KtB7icU88EhoiatmtudCksMq5aEd3lG4eaAlCIUeX+4VvgK2MLmlmykUzDp7WPFKPLOsTbkwGt3XgS44oqD6lV/Chf9Srzp5iTX4z6j/uW8zjs+vTz7yHAsLrIkcjptzXIiLQIxTeLfItYWx4wY0wJRpnJ/KJyPV6Vyo9vNoNg4pD198Sr8Xc/Ow1A7nl08ifjyAWT2nOlx/B8x/R+uWNDMk= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Bf0ZAwyT3r+50ZUvTOshYDtwfBSiKvhIwpersAT66NJ/8SEpjITyOEAI2QXC?= =?us-ascii?Q?cME4TxtBxzohW9VNNiZug+uk5B0SIvu9HqYdSITYsleHjCrv2Ii7D9OTugIm?= =?us-ascii?Q?9k+zec73jmj9bcdVKX5RqScMqY9sP2j7AQ7FYOStFms2Qpg9A6NUY5/8yEs1?= =?us-ascii?Q?3LR0pk3qN12vqK/vLt9gxwwOc3mwmFi+RrWIJgmCwJO36jIeYeBPStxHJlUx?= =?us-ascii?Q?5WQUdGZoK+3NfL8IhZ1t8IhGn/BoIU7yOIQkcnX2iQb6FtdEgG3GSv/uEdZI?= =?us-ascii?Q?8pwgP3DcSAx7ggDpRfyR4+DrX1D/b3dECLILCHZjexyzIvlBOvFX9+xrxcMm?= =?us-ascii?Q?K2ZQBa0uvoAiumFIZv+E67MIGr6oSIt/I5vKq0AgPn4wy5pcAhjk+m5yp+Vc?= =?us-ascii?Q?qdYkYPJR+VtsEEpHaSIbfBJ09RNrTZtF5pvE4QyXJhSvnhsOJXT9OsHHIMXr?= =?us-ascii?Q?IzJUMBr2XSrvZGEhZ5e+dMUW6RO9PsLsHs8S9cQkwIf353Ok16kxsOLUb3/c?= =?us-ascii?Q?5e2uSpGz8+b59LO1mcbIujH8bWi8IV4EWPrkJY05vXWWX8pZhjvbE7SNkjkr?= =?us-ascii?Q?1n4l/5RE0rqoFKWithpUurAK+IDsqxO//SP35RqBwiztrN8NS+QtQx5ZYmSV?= =?us-ascii?Q?w4 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 8cac63b3-718b-4325-c13a-08daf47c897e X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2023 09:08:15.3610 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR09MB4287 Received-SPF: pass client-ip=40.92.73.31; envelope-from=arthur.miller@live.com; helo=EUR04-HE1-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142212 Archived-At: Eli Zaretskii writes: >> From: Arthur Miller >> Date: Thu, 12 Jan 2023 07:51:01 +0100 >> >> When running this little code, I have observed that 'error' does not end in >> debugger: >> >> (defun new-patch (&optional patch-name) >> (interactive "sPatch name: ") >> (let ((path (expand-file-name patch-name))) >> (message "PATH: %s" path) >> (when (file-exists-p path) >> (error "A worktree with this name already exists")))) >> >> If I run this code, I see it correctly executes error, but it does not open >> debugger. If I place cursor after the error form, debugger is >> opened. Value of debug-on-error is 't. >> >> This is output in *Messages* buffer for 'Emacs -Q': >> >> PATH: /home/arthur/repos/emsrc/28.2 >> progn: A worktree with this name already exists >> Mark set [2 times] >> >> Just curious, is this intended new behaviour for 'error' or a bug? > > How exactly do you "run this code"? The details matter. Just pasted the above defun in scratch buffer, in emacs with -Q option, then C-x C-e, and run with M-x. Nothing special. I have observed later, that it correctly exits from the execution of defun, if I add more code after the 'when' form. It just does not end up in the debug buffer. I am ok with the new behavior, I think it is probably more handy, was just surprised, haven't noticed it before. The Emacs used was built today from the lastest master, maybe a couple of hors before I posted this message.