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 23:49:45 +0100 Message-ID: References: <83o7r4kvgs.fsf@gnu.org> <87mt6oyows.fsf@web.de> <87wn5re9oe.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14272"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 12 23:51:07 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 1pG6Pa-0003MX-6C for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 12 Jan 2023 23:51:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pG6Oa-0005nY-Cs; Thu, 12 Jan 2023 17:50:04 -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 1pG6OW-0005n8-HJ for help-gnu-emacs@gnu.org; Thu, 12 Jan 2023 17:50:01 -0500 Original-Received: from mail-vi1eur04olkn2034.outbound.protection.outlook.com ([40.92.75.34] helo=EUR04-VI1-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 1pG6OT-0002Bi-27 for help-gnu-emacs@gnu.org; Thu, 12 Jan 2023 17:49:59 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J0OspHR8KSc0DF/czexiIHHnYrZNEfLRAL3mWp9ZnQj/TRRtxJ9O566h+2X5QfN8i5G4mOVIfQcagnPtucSGRUS6jHxczRJCE6QB9tx2osp0ZljHZEK4t6i5lFn5dQ0wVpQVVFRs4sIxEBLDGb74Q9ghKO0LlRWTKXfOS9ZQi5iz6fCRXKo8TJ2xfO+JvX0mlB92irvuS04j/alxoQ+wfE03AGd4GQWvrcEgROk0ekTvGo2mUWxyXB4LW3oYXe7Nuf7ibb/5Lko3uPaoxZUIkygn+3502tuadgfXYpHMW82fRYPRqnOGlyOfMjLiMH4L3tPQWLQxaewJRvW8avaDXA== 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=jeNJbMlUSBvHdhow+pDhZLa6vu7mO5Kejj8D5OLWGKU=; b=EhIwA3da4u1Ohdr/eY8XtOZ22IJmMAieL1D0ZE5bGPh4Bmr8RScAvuhPu5G7j589rVr+UeBtbwWiDXsPGXnBDYGNRYi4ju0OEHYDJwTCfTB5rI7FccwL9zAtOmhG9YZ2AXMYhjQFGI7+nHwSq/6LfqlTpzKO2Nh84884mkBIMKW6Fxd8sHjqC7HhPMieZNjCK6FFsS0ESXlOuzDaosWwbwNbqDXVTu+oGdBJAn1o+HuDeX9j81W2AuyppNMluAqmRIJnGjcnBZESiNkloKIBMPiijWj1oMNy0lnL9yrkUYQJIxH71x1fxLkqcfXaldZtvzjHk/LLGwfavuMxQPDvFw== 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=jeNJbMlUSBvHdhow+pDhZLa6vu7mO5Kejj8D5OLWGKU=; b=dglwgk7bJjhHPMyRQ8CNdOas9u0ce0qEJSnyYf8e097rBDNtsKgxT/DFVOvpwQYOGPS/uwm4MECG3IJ9wPEyOZduYD77+gx4Vth0huLLE1BqQboAxA1TYuCvzChqgS+v6EgqHvtF2n0U6bRqJdphrWw+42OdXP1Em5CBNpKpNHCFF49pZzeWumrdvm9/20XWZZwc/JHwsEQQBKYWf7Le7PYN/5SM3NTc9gXEECo6WSUidJajNOLhaHtOQnLnDDl/0DtJrpoLkBry/QIgeg5hTzJH9auA+yrutY44+nb/QHQGWfZ0JFUiWkO7r27U7cKQM2ctLW32/NWJMMVso235XA== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by DBBPR09MB4681.eurprd09.prod.outlook.com (2603:10a6:10:207::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Thu, 12 Jan 2023 22:49:47 +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 22:49:47 +0000 In-Reply-To: <87wn5re9oe.fsf@web.de> (Michael Heerdegen's message of "Thu, 12 Jan 2023 22:15:45 +0100") X-TMN: [HOyP0dT6kL9fDamBONbGtzRuBQ2MK2gG] X-ClientProxiedBy: MM0P280CA0092.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:9::22) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87y1q7v052.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4977:EE_|DBBPR09MB4681:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b32431b-b12b-4100-fba7-08daf4ef4def X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3/fg9vMYXSzYGZtHidCns5aAqoRrV7HGkxXeEsrhpSu4/35E2sfbzV3Qufb0R0HTRX0Zp9qNJ++cAScKI+9ZhSgy9dwBqlQqz8iglU1pc5oN0kqmCLWfdFaN4Q8iIHKaI9+eJ9VqpG2uppiAdt1otAHoGB9fb2xNzsY0AbsCeiLFLzwNh8VVVgvhVfsxyMVW22XaYMoNJkkE5K8zy0h3GLdkzUA2Y706DY2aC9A3klx5VkdfsoHo3vZVMs7XvS9dkwm5HQw6+lvtKnW2EAAEzQfNiuZiJ/QwKboLw0UQl3Y3lzOwJJRXgCRFOY/lcXB8Zx5W65t1YixRO1MSHdejTX0hicbCuX+7duVgX5JzDgEyP5FNCJ24EJIt8vZIvP51Y/o0Bj1kwfYQ+j/u+NNtTiexd0+0rt0aS+0NJBB5vmvqQW+y7DhVnhg8VtEL3RgwVWO4Qeuash8M7DyOYknznNFt7TOT7G8aAA5DZgDp2FduJXNcqVzKjilJ/WDp3ROr/kDFCFdOYjnFKcO6e0277L9LEs3opbMQrI+FOWctnIw7aaeeGTYr+Grw4/5FmugMuYCMCZ9msyX/vuHJxBY6/MuUbHtJ/I/ZbGK+E9/W11upmli2FRUsxPasKbMsMweYy0z6I2xBisbkF8/obyAh8a+ixabuQ7CdECGu+Ooazpc= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?HkN5NaNnRdPkwXm/hTDWAkNZyduwc4jleNYi9tng6BlThk7LhKiFt6QcEIt4?= =?us-ascii?Q?XTdn7xiSCyDxECEQn4sBptsgbSRq60dbHz04sP6GjwtYYV2nrx2mlu9tMyxw?= =?us-ascii?Q?4Zh8kXgFkjXjAzcEjqkGrSKF8SFJgxvokt4kGdSrK3pEcCnafrbG0akDNaBu?= =?us-ascii?Q?1jREb+opAIZW/KHgAyH4nPvWmJYJLYGp2GCR3JbFhrPjWEEgwyJ430m6QCYe?= =?us-ascii?Q?YYy8fDCY1HGzRoxmPNbG/sfvd7rpsC+vzVAAgjUhZuptz+h5IHPXF9r5LSRm?= =?us-ascii?Q?0jyMhstKdF9IJbe0wBKV/wS0IdJ2kCcc8JUtWZ3SZZwoOtcBbAw1EYDfqtlN?= =?us-ascii?Q?ZCzviyZq0AyLzinm83hCvjmg9zsAERJF8p43hSjFMtpjssHMGKupDOQlHaJj?= =?us-ascii?Q?Tmtq7FMM5NhqLJb6mB/lNIFTSjvvLwCX4jqk7i4Br5n/qIXVcXlSJyCWZLPB?= =?us-ascii?Q?2cdyA8ywlhbmESt1pectwR6YnJn5P2lIlPwc0ohbZANr3ebZI3KMRWpmYPMF?= =?us-ascii?Q?LVnrPZGgT5xUiwf3s7MPn/CwQp8JFArifapwsBugD5eHE7JLwGrnutUdOmCZ?= =?us-ascii?Q?DTq4YU2MIRiz+Dq4IotVnZ56nFjjbC8CmW5ZMW3SjPHvqby07U3XjM6ZCccp?= =?us-ascii?Q?O7 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-64da6.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 6b32431b-b12b-4100-fba7-08daf4ef4def X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2023 22:49:47.3279 (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: DBBPR09MB4681 Received-SPF: pass client-ip=40.92.75.34; envelope-from=arthur.miller@live.com; helo=EUR04-VI1-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:142217 Archived-At: Michael Heerdegen writes: > Arthur Miller writes: > >> Michael Heerdegen writes: >> >> Let's just do the part that matters: >> >> > For C-x C-e you need to eval a form that raises an error. Also that >> > works as expected: evaluating the defun doesn't raise an error as >> > expected. >> >> Yes of course. As Eli said details matters. >> >> I have now looked more into it, tested another example, and I do >> understand now >> what happeneds; I just didn't know it worked that way: >> >> When called interactively with M-x, (as the command) the evaluation of the >> function exits on error, the error message is emittied, but the >> evaluation is >> not trapped in the debugger. When called from lisp, for example via: M-: it >> ends up in the debugger. I was calling it interactively, and didn't realize >> realized it worked this way. I wasn't aware that "commands" does not >> trap in the >> debugger on errors. Maybe I need to set some other of debug-on-* flags? > > Only debug-on-error. That's what I tested. I enabled that option and > called your command in the original form and got a debugger. > > [ Note there is a pitfall: M-: debug-on-error RET prints t although the > variable's value "is actually" nil - that's because M-: binds the variable > to t temporarily when evaluating the specified expression. ] > Aha :) Now you say something. Yes that seems to be the case. I have checked Customize now, and that indeed was off. I was always thought I had debug-on-error to be always on. I obviously didn't. When I checked it's value I did from within M-:, so that explains it. I should have checked with C-h v instead or looked in Customize (which I barely ever use). When I have explicitly set it debug-on-error to 't now it works same even with interactive commands, it ends in debugger. What a small thing can take such a long time. If I just checked with C-h v instead. I didn't know M-: let-bind the error-on-debug, so thanks for the kind explanation on that one! Best regards /arthur