From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#3466: 23.0.94; have `d' in debugger treat macro expansion like `c' does Date: Thu, 20 Oct 2022 16:04:04 +0000 Message-ID: References: <87pmx3463n.fsf@gnus.org> <87h7ie0ys4.fsf@gnus.org> <87h6zz2qtf.fsf_-_@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12171"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "3466@debbugs.gnu.org" <3466@debbugs.gnu.org> To: Michael Heerdegen , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 20 18:14:12 2022 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 1olYBP-0002yJ-WC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 18:14:12 +0200 Original-Received: from localhost ([::1]:41298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olYBN-00055J-DF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 12:14:10 -0400 Original-Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olY5V-0007lc-6O for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 12:08:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olY2Z-0007W0-4K for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2022 12:05:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olY2Y-00019T-Ro for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2022 12:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olY2Y-0004gt-FW for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2022 12:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2022 16:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3466 X-GNU-PR-Package: emacs Original-Received: via spool by 3466-submit@debbugs.gnu.org id=B3466.166628186417980 (code B ref 3466); Thu, 20 Oct 2022 16:05:02 +0000 Original-Received: (at 3466) by debbugs.gnu.org; 20 Oct 2022 16:04:24 +0000 Original-Received: from localhost ([127.0.0.1]:35996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olY1w-0004fw-1X for submit@debbugs.gnu.org; Thu, 20 Oct 2022 12:04:24 -0400 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:28214) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olY1j-0004fZ-IV for 3466@debbugs.gnu.org; Thu, 20 Oct 2022 12:04:22 -0400 Original-Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29KFiduc000907; Thu, 20 Oct 2022 16:04:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=MyPw+nHBE5INnQPdVZ7lhjYxJ+tcfcXnikT5RqVZNRk=; b=FCdTfU+wrMJhBkOcRM6qBm9tRFyxgDDW4jnjNpazcLLLu9Ptr6ILmYCfi7PLbx/+ON/q olaQdnMIqsbdEu9KG8Mk0+qql0tjCFnCnW7Lc1iJs34+HsNQjxix38ODfsNl8kg15+0A 8sHEkc+Es3lALb7fEci93ZrSbcvV6M+9u8mvLyL5tuuPLgwr2JNf3e4/qJ2Oizz0f8qo TbPWomme1soBsBijZSa0UNrhp8XSbUTZI1kiQaT33k62smxzB6L5Brlr5CDjR8iKSeyo dv1PNqlEi6NMSkb2HgFUUA1X7H8cwPTZ9pFb11vmzUOCP7+JZLJK8/8+MdVrH0fYyCLV Og== Original-Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3k7mw3ns46-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Oct 2022 16:04:08 +0000 Original-Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 29KFVEcN038669; Thu, 20 Oct 2022 16:04:07 GMT Original-Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2174.outbound.protection.outlook.com [104.47.59.174]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3k8hr2cxtt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Oct 2022 16:04:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WZ0jfkAULqUiBWLBjqW1LZRx6n1ye0Cq+vB03fJ9RoMOVE/ntTpTI0gk/CLTVxQISA+5in8UzKRlt7Fk5DMwIcEdPTnFPD2NzG2v+C9kubVFT/GLnMZ1et9gCyZpwRxDEnVx2R93obNZupzmrxPbK4vTfDhOk2R3q6k62HCxv2A/XgDEJ96tyMD/CIIa0rqmzCclBpXGgsPJ7IkRcjOX5mkVdPwVaY+clSJmgrwjNM6ox6ILgDh+/FUN80RGLiOYtlD3yecGxLGv6u5DRhEJ5EBXAIxqbhLobPpBo/qlz7/SzrpebyPX817LdQOTjIesMitUWIV9RUoenJl4DKPjRg== 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=MyPw+nHBE5INnQPdVZ7lhjYxJ+tcfcXnikT5RqVZNRk=; b=Gpkt4P3RdAyWw2LnVLHnsrb78hoqTK5UzfXIsdq3/Jb+bjExhxOidKGm9+Yy57DUaFY0YHWO+KSrXrE0mQyf7jvv8qHmzUm6sOyclh9r9yXJQTla2PuTzKLhcbY2gGVe1aBC+1z84CnkjFmCR/S5PVb/5t0sS2nRTTzfv6H0obtN1ThcfceKgy0T+YEL4YBZgQ2q/dllbfF/brnf0gHRu4GnpDZABEumN2xh7QwomhqTS0E8pB5OlMOQNubYtvpvTJZikfpr+QnhG1ipBvQpOQfrODjSvxNDr7UGx2oslIryp/3bb/9hKbBjLQymLcov8ML2IA/uNK4pevVIsWOqiw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MyPw+nHBE5INnQPdVZ7lhjYxJ+tcfcXnikT5RqVZNRk=; b=ceLTsc7Qtaa1EUXTcwxo9btG94JhVvlsQgJo4+IDOCZCEFd2rkujFeCm2CtU28BAVc4NHaMPv5EM+Ie5/7zxatR1akOcOUIZjFxz4tOf3z8o1gQq+RRbf0sWexAXxQvH9xeY6L4PPpvgQnj5BFY0st736+lQO+9cuqZ7eDmZjkE= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by PH0PR10MB4472.namprd10.prod.outlook.com (2603:10b6:510:30::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.35; Thu, 20 Oct 2022 16:04:05 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::2e97:93c5:7222:5b31]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::2e97:93c5:7222:5b31%5]) with mapi id 15.20.5723.033; Thu, 20 Oct 2022 16:04:04 +0000 Thread-Topic: [External] : Re: bug#3466: 23.0.94; have `d' in debugger treat macro expansion like `c' does Thread-Index: AQHY5ChZbtqvl01Vu0yOxl+lFrkokK4XbG2g In-Reply-To: <87h6zz2qtf.fsf_-_@web.de> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|PH0PR10MB4472:EE_ x-ms-office365-filtering-correlation-id: 09b7583b-6872-4354-7f4d-08dab2b4b650 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3rwU23J52gcIp4HxsDtZbqfhQKFRAyFWlrmdh5hp9YH9WsSllSe+0KgFVdzhXbKSpfQ0b+7xcWN2EPD++V+vlR4iPITKMagYaukqLzBiA6L+ItepuABqKaw+A13JJE0C0xW/pzPv3WqktWZolcMHp+cg+OKmGXUVzSbdgyevlbm/g5o8mDfkTZtVxKmGB2dOtPxoBlzp3ybXR49IXKtVb+L1o44mUJ5DSQHWWjfhR8oVIaKzvODhXXvN4+hmVdPuU6Tc7aGyNXQusZ5XUu/fJ31ef2JEpxOxgWJbQWDhcRy0AaZEmW9/xLo/OFqGrpLlcrM6azyBhoqyVhXlrcDsQ8EpshEA0d4Huoki5hZO+DwJcLzA43IT8TluV5JMEEwI743uUGacmmswTpftxW87dDBgyDpg2juBzQMIRYYbNMx+vsOKRvH0P1XFOiA6jqUYBJzd244PEpoXSm4vNJ7QDHQgLF/IfMA8U6KBpCv03NjqmZVN+Kl6rpN4R+l+/5IGzDMTnF4MJ9s7XcnAU/PYewbd9MkRuS/OwrwS03lh2C/EVk6RoUf376kS+BnnGTQ+bLT/9r1YAqZT0CMxiZ4xYviGVLJFUVr7oTxrneiB4Opxf9UTJEwVveyx48cSWytsoihQa7vc3k0VfvX8NNcJoQdXLOC+g8ICNdOEY37V31U6288K1OsWNzyEWUMRYYNeItzs7xw4FzDQoygbIlu+cHwjsXX7a4Mtq1VVbqh0i8eMWZzeYouIRQ1atqoli MCooaHQHBxgoUQjIEEiqjM9EANl3FnCGcHw6APNm3Dj7B0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(376002)(39860400002)(366004)(136003)(346002)(451199015)(2906002)(5660300002)(66446008)(66476007)(66556008)(110136005)(4326008)(8936002)(316002)(38070700005)(66946007)(76116006)(41300700001)(52536014)(478600001)(71200400001)(33656002)(83380400001)(7696005)(6506007)(9686003)(26005)(64756008)(8676002)(44832011)(55016003)(122000001)(86362001)(186003)(38100700002)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: yewEjn/Nu8+VruRKd/4Ss5Og1svKyoFW7Udc7EEsn4mvM7EJlF4go53A+lNJWAsFng6fA2aYQUZU7g4xrWA/q6UiKB8pISnbMMxatN86SG4fJ2i1CmyTqyUBhY/u8xFKkb2BFRhLRYrsZThEAwCZki7KNACYK3+zGDWfO9nLMkpofPXyEeNKe1ZLEEBvd7V4msqs4HsInYZveMPXYPb1RUHx4wSyn6MP5lXhFngyfDQ1wWT45ESsTdbEBIakiGIqkwFPwY9CLbQQm7gz1iQ1A2HFucP0hxQ+s5cDR289z1Q6er0vQb9fDD+JvmfThwq4BBQpJucevvYgcjZDU6vDgB/FEdEdWckNxKBDh/I+XaB05OwHzPglMG3wcStTgwk42OIY4faO5jvJajBcVYVbqaX2e5oaaMdqtWAz6uQ9PN9PbQK234LHWg8KpIpUQ3xcwk4B7FEhG+OaGuiK3c+5YCPYrVJYZecq9iTiD0D8JhYH3ZdgTfsAv5Vo6H78M16pll7KZrcvuj7+W5JPbD9c4lfiEF9WmiP4C045G+pktkZIBXQQ6pixVhdf7CWgGfZGML0LyyXb8VG1JLWaJ/bCG6LZWohaayxrAZcLbLvExToH18rN84xXmZBUOWqiGdRKBy8TbZcBuQn7OGkeYqQGbeaJWa0uczLn6HpHbkY3kX+CHZhFMWA/OPzybNW6TLzIYtsKb4gQbujwGcJ6XLJQdcObQDZIK26hLE4hFtksT+pD1lpKCgSRCOO3Gd qmT6TntTbYm5JxEnMt04SLoOLtiEpOCCkofdodcQiYrlz2mGZEb4bKNzPA/qxhwJ+JyF5i2YB0LsrzwCPRDn0F/ReMbUo2Xhb6 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 09b7583b-6872-4354-7f4d-08dab2b4b650 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2022 16:04:04.8776 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ddA+sLH74KpMyIiRedw9GfJm20BY+WZ3BprQz/eb8KIKBADyKZKxU68FYn7+qb1Kv5Trq3x33h6grzeZ/rdZnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4472 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-20_07,2022-10-20_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 bulkscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210200095 X-Proofpoint-ORIG-GUID: 5oigChTzMxdEGFA6Hi4L4lroF9kzlMFr X-Proofpoint-GUID: 5oigChTzMxdEGFA6Hi4L4lroF9kzlMFr 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:245938 Archived-At: > > (defun foo () (dotimes (i 2) (message "foo"))) > > > > and `M-x debug-on-entry' on foo, `M-: (foo)', just hitting `d' a lot > > does what I'd expect -- stepping through all the code. It does not see= m > > to step the through the macro expansion itself. (At least not in Emacs > > 27.1 or 28.) >=20 > I also don't understand what Drew writes. Especially why c would do > something that a repeated d would not get you to, sooner or later. Nothing in the enhancement request suggested that `c' does anything that repeated `d' won't do. The point was to (optionally) have some particular repetitions of `d' be handled like `c': skip over the need to repeat `d' for those cases. Which cases: macro expansions. > Drew, did you bind c to something else? Or had your code been loaded > under some special conditions? Normally what the debugger steps through > doesn't contain macro calls - even for uncompiled code and even for the > dynamically binding dialect. So unless you were debugging quoted > lambdas, I'm ... confused. I appreciate the attention to the bug report, but it was reported 14 years ago. Well, let's see. I think the point of the enhancement request was to optionally be able to have `d' in the debugger act like `c' when a macro is encountered - only to expand the macro, not to evaluate the result of expansion. More precisely, act like `c' when the macro expression to be expanded would be shown. `dolist' is a macro. In Emacs 23 (which is when the request was filed), you see this, if you use (debug-on-entry 'foo), for this code: (setq xs '((1 2) 42 (a b c))) (defun foo () (dolist (x xs) (message "%S" x))) Debugger entered--entering a function: * append(((message "%S" x)) ((setq --dolist-tail-- (cdr --dolist-tail--)))) * #[(spec &rest body) ... * (dolist (x xs) (message "%S" x)) * foo() eval((foo)) eval-expression((foo) nil) call-interactively(eval-expression) The point was to (be able to, optionally) have `d' on the #[(spec &rest body) ... line (not the `dolist' line) act like `c' there - immediately giving the result of its expansion. Now, in more recent versions of Emacs you don't see the (dolist...) line at all; you directly see `while' instead: Debugger entered--beginning evaluation of function call form: * (while --dolist-tail-- ... * (let ((--dolist-tail-- xs) x) (while --dolist-tail... * (lambda nil (let ((--dolist-tail-- xs) x) (while --dolist-tail... * apply((lambda nil (let ((--dolist-tail-- xs) x) (while --dolist-tail--... * foo() eval((foo) t) eval-expression((foo) nil nil 127) funcall-interactively(eval-expression (foo) nil nil 127) call-interactively(eval-expression nil nil) command-execute(eval-expression) That's fine. Emacs was enhanced as requested.