From unknown Fri Jun 20 07:10:16 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#60768 <60768@debbugs.gnu.org> To: bug#60768 <60768@debbugs.gnu.org> Subject: Status: 30.0.50; edebug-instrument-function off by one Reply-To: bug#60768 <60768@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:10:16 +0000 retitle 60768 30.0.50; edebug-instrument-function off by one reassign 60768 emacs submitter 60768 No Wayman severity 60768 normal tag 60768 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 12 21:35:16 2023 Received: (at submit) by debbugs.gnu.org; 13 Jan 2023 02:35:16 +0000 Received: from localhost ([127.0.0.1]:49022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pG9uW-0007cW-7i for submit@debbugs.gnu.org; Thu, 12 Jan 2023 21:35:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:42028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pG9uU-0007cN-LB for submit@debbugs.gnu.org; Thu, 12 Jan 2023 21:35:15 -0500 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 1pG9uU-0003zJ-Fr for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2023 21:35:14 -0500 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pG9uR-0001Nw-Gm for bug-gnu-emacs@gnu.org; Thu, 12 Jan 2023 21:35:14 -0500 Received: by mail-qt1-x831.google.com with SMTP id z12so18077584qtv.5 for ; Thu, 12 Jan 2023 18:35:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=pS4nZD5UdRcBqNxEbZiS6EwI6MQpoYT1yk0nvcaE9FI=; b=Xbmfai7iVzLxlKYmDLIgRSu9UkOsshzBTRfCTJpfDsti6H/RlHiHKv82eE1PalgFZr v2hk8YeKbwJEg6zCX74xVvNhmFrDgh8Y1NAYv1awwDbZAyZ5/8Miv4WJE/pwhSiWEZ1J JiC7lwFpZD1gew0m+9AMQTonkgUtBptnfKytJaIbYqHlVs3UKl427ErxC7q951s4cytN AU/Uus+IwQX/X2drA2Vmkr+G70k22HCC5O2PGAaWZr8nOar/pZsJh5HuXFs3pKnBKThB K+EIRkqTbivV5DzlpjSV32WKtpR7gMffCcBOAaKNxlRzUD4qzyAB+rR+zUhhuD3nnGAn Iolw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pS4nZD5UdRcBqNxEbZiS6EwI6MQpoYT1yk0nvcaE9FI=; b=qIq0ilVaSTRRdfeg09xdDRC8rIISemR0KRP68qv7owG7l1uC4evja4W+0E+/SdfPmR QmNZ6uGtyLWzv4dctF0TwGNOaIs2NLrkEG0tfnskw44wsPR2yu22impYsaOzPOGNcXgC SWekzOpNTSqd74QAzyFIlCLLIsu/yLPu02t5QXFP4KR1Lu559JJdHvfSZDJ4j0CUNKjg c/XrdQqZkLzoGNQCoU2er2MQVMf9Gjz4nlaiqdrOqurdm9/XKKEGZ2LtK27pKcSxVMgp bvYvGTmCblq6ATjv9L92oGjBQQS6N4FBgSGXhhb1WcVBZK4l2NkryePJBLBtw/PIGVpF KwKA== X-Gm-Message-State: AFqh2krW7Gq2j6IVOQTK9dDfMJe+1AyNI746UMf4vXn8Rrq88T3KxVK2 Be+NMfOmjyO14QlEzAT9b0/TJ+iWof4= X-Google-Smtp-Source: AMrXdXso0tD7Iwm2nAzDflnJ0R3BU4I+NeFy308nakKR+3pLg6NzT3HuExHDC3DUoBe4eV8/Dkc1zA== X-Received: by 2002:ac8:7a8a:0:b0:3a6:9ac7:9d71 with SMTP id x10-20020ac87a8a000000b003a69ac79d71mr18396430qtr.37.1673577309965; Thu, 12 Jan 2023 18:35:09 -0800 (PST) Received: from nbook ([2601:82:c200:166d:7a0:14e6:e26:75bd]) by smtp.gmail.com with ESMTPSA id s14-20020ac8528e000000b003af5a18a4a1sm4679669qtn.90.2023.01.12.18.35.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jan 2023 18:35:09 -0800 (PST) User-agent: mu4e 1.9.12; emacs 30.0.50 From: No Wayman To: bug-gnu-emacs@gnu.org Subject: 30.0.50; edebug-instrument-function off by one Date: Thu, 12 Jan 2023 21:27:06 -0500 Message-ID: <87lem740sy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=2607:f8b0:4864:20::831; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qt1-x831.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Reproduction steps: 1. Save the following elisp to /tmp/test.el: --8<---------------cut here---------------start------------->8--- ;; -*- lexical-binding: t; -*- ;;;###autoload (defun one () "ONE" (1+ 0)) (defun two () "TWO" (1+ (one))) (defun three () "THREE" (1+ (two))) (provide 'test) --8<---------------cut here---------------end--------------->8--- 2. Run emacs from the command line with the following: emacs -Q --batch -l /tmp/test.el --eval "(progn (require 'edebug) (edebug-instrument-function #'one))" Expected output: Edebug: one Actual output: Edebug: two If you repeat the test with an additional autoload cookie added above function "two", function one is correctly instrumented. If you repeat it with an autoload cookie only above function "three", function two is, incorrectly, instrumented. My hunch is find-function-search-for-symbol being thrown off somehow. Haven't had time to debug farther yet, though. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-08 built on nbook Repository revision: 5d1e14bd8b9a11ab860937d3ab97248ddeef30b1 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101005 System Description: Arch Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-modules --without-libotf --without-m17n-flt --without-gconf --with-native-compilation=yes --with-xinput2 --with-x-toolkit=gtk3 --without-xaw3d --with-sound=no --with-tree-sitter --without-gpm --without-compress-install '--program-transform-name=s/\([ec]tags\)/\1.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection' LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 08:05:49 2023 Received: (at 60768) by debbugs.gnu.org; 13 Jan 2023 13:05:49 +0000 Received: from localhost ([127.0.0.1]:49835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGJkj-0004wT-0O for submit@debbugs.gnu.org; Fri, 13 Jan 2023 08:05:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGJkh-0004wF-5f for 60768@debbugs.gnu.org; Fri, 13 Jan 2023 08:05:47 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGJkb-0004Ni-Mz; Fri, 13 Jan 2023 08:05:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=OgM2KVQ7BLBBKlYR9FHyTQkmRm1czMH5HFKWAulaKYc=; b=QfXs7fQySsGd rpWZkZhMzImKjdAuTub3lWdCZsJocw8KLa7lQwaUUxeRyXAiP3PQVbz6Mmv9zGPJzLrtLlXBTWbbp qopiT+HAo20FF8pZaltnH66rMKd1wusfOUeGA5OT82wkk/vK93gnHa3c5pnhI3Q3WeYgIskAUXrBB dIAi1kKjZCaLfv93SLS+r4V/ZPFdILYMKK2mfPcRz1JvHmxM0BiZpaOxffoJOfbdx39zXjBmPUB9p ImWVjE8+38DnLCw9DUfdyyfjQIWenH4qHkRuHUm0NZ69CxR9HRMncvYdZEDRtoANhnUZuCWBTy6ny BA8MD6LwOkpafDmQ8C7ZiA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGJka-00076K-TC; Fri, 13 Jan 2023 08:05:41 -0500 Date: Fri, 13 Jan 2023 15:05:40 +0200 Message-Id: <83lem6a8kb.fsf@gnu.org> From: Eli Zaretskii To: No Wayman , Stefan Monnier In-Reply-To: <87lem740sy.fsf@gmail.com> (message from No Wayman on Thu, 12 Jan 2023 21:27:06 -0500) Subject: Re: bug#60768: 30.0.50; edebug-instrument-function off by one References: <87lem740sy.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60768 Cc: 60768@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: No Wayman > Date: Thu, 12 Jan 2023 21:27:06 -0500 > > 1. Save the following elisp to /tmp/test.el: > > > --8<---------------cut here---------------start------------->8--- > ;; -*- lexical-binding: t; -*- > > ;;;###autoload > (defun one () > "ONE" > (1+ 0)) > > (defun two () > "TWO" > (1+ (one))) > > (defun three () > "THREE" > (1+ (two))) > > (provide 'test) > --8<---------------cut here---------------end--------------->8--- > > 2. Run emacs from the command line with the following: > > emacs -Q --batch -l /tmp/test.el --eval "(progn (require 'edebug) > (edebug-instrument-function #'one))" > > Expected output: Edebug: one > Actual output: Edebug: two > > If you repeat the test with an additional autoload cookie added > above function "two", function one is correctly instrumented. > > If you repeat it with an autoload cookie only above function > "three", function two is, incorrectly, instrumented. > > My hunch is find-function-search-for-symbol being thrown off > somehow. It's not a real problem, and it has nothing to do with the autoload cookie, AFAICT. If you modify edebug.el like below: diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 2f7d03e..0ac51ad 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -518,6 +518,7 @@ edebug-read-top-level-form ;; Don't enter Edebug while doing that, in case we're trying to ;; instrument things like end-of-defun. (edebug-active t)) + (save-excursion (end-of-defun)) (end-of-defun) (beginning-of-defun) (prog1 i.e., add one call to end-of-defun whose result is thrown away, before the _real_ call to end-of-defun, the problems go away. The reason seems to be that end-of-defun calls scan-sexps, and the first call to scan-sexps does something that wasn't done before. Stefan, any ideas what could that be? Any hints where to look? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 11:42:57 2023 Received: (at 60768) by debbugs.gnu.org; 13 Jan 2023 16:42:57 +0000 Received: from localhost ([127.0.0.1]:52229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGN8r-0001FM-4U for submit@debbugs.gnu.org; Fri, 13 Jan 2023 11:42:57 -0500 Received: from mail-qv1-f51.google.com ([209.85.219.51]:45907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGN8p-0001F7-Vf for 60768@debbugs.gnu.org; Fri, 13 Jan 2023 11:42:56 -0500 Received: by mail-qv1-f51.google.com with SMTP id l14so11309336qvw.12 for <60768@debbugs.gnu.org>; Fri, 13 Jan 2023 08:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=Q+tDlZGuaMauhLPydvWNn0/Lcg3UY7o4Iw9xiBlFvWc=; b=LqsRQuLYb25ba6oKqB5wjcKd9cwvsFVbcWJkyGP8z32pa2KaqdGxVZUbIymCIKkyxb zhlIHuEOLOg1JwUdXjWxsW9WMHnAgesOmAudMs1TVU0sWPxZTZNbumjwOf8YVPWfkQou bnQ7XiZNNR5YzNf1+Ilo5wFlWdH1e8layglZ0LsYC2/GI0FN9IqWd1qGXcy0DzPJY+7m vP5RGDLXZp6L/zvLfgV2sfs2eLZtrbxGvp8OXLRVR+UkpumKjrartRW/Pz1wi7hQdmpz Pymbyv4XqifXee8WR38LH/AKf9NGpF80F1kJmHR9nrcEvyQ9UUY6athzYM2u3J+xQysU ALkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Q+tDlZGuaMauhLPydvWNn0/Lcg3UY7o4Iw9xiBlFvWc=; b=pQI+YKoNAMT/F4FqSX1E45+xO+jJ1f+LXh0mw8RKRsgxOxO0g10fVjZA133AuHU15B lFP0ECFe4p7sOr/QQc7V6z+VRJMh0cm9MPnTfkHfYMKI8sFM4FG0AbWsfG1qIpVxEXO1 8jSpgT39Hl8aEPkwmBS8Wvv2/LEv9zX8nkXcLRC0EDhzjP4dQFIuqJoeOnBRCCFeC+89 9kJtMCHZ7nf+GuG3ZSSosQi3LYw1KTgj9/z5+Wwdo1D/hY3gmsYBcteQnAmbKL36xHIG ILkdQQ0YpGUh0+ByX9R5ipem1TzT4/n24yni1BaZkTugpWvsOsd6G+GN5YxG+FBPLie/ lNFQ== X-Gm-Message-State: AFqh2kq+nk1gr/1GiMU4evP7ozJc1IFTi5U2EEnmBpDNzeQiXhc3BgZ0 dhJWD2DwFv4UZu1q8nBP5RniuaALk4KkYA== X-Google-Smtp-Source: AMrXdXsg8hAX+vkf6sJW3jKlFV/ucoZSP8RDjUy3WkU7acM4X03XMrtKo+cXmxcKLBoAOZ4FauWtsA== X-Received: by 2002:a05:6214:418d:b0:532:2141:e5ea with SMTP id ld13-20020a056214418d00b005322141e5eamr42083498qvb.25.1673628170170; Fri, 13 Jan 2023 08:42:50 -0800 (PST) Received: from nbook ([2601:82:c200:166d:7a0:14e6:e26:75bd]) by smtp.gmail.com with ESMTPSA id x4-20020a05620a258400b006fca1691425sm12974831qko.63.2023.01.13.08.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 08:42:49 -0800 (PST) References: <87lem740sy.fsf@gmail.com> <83lem6a8kb.fsf@gnu.org> User-agent: mu4e 1.9.12; emacs 30.0.50 From: No Wayman To: Eli Zaretskii Subject: Re: bug#60768: 30.0.50; edebug-instrument-function off by one Date: Fri, 13 Jan 2023 11:41:30 -0500 In-reply-to: <83lem6a8kb.fsf@gnu.org> Message-ID: <87h6wu4c4l.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60768 Cc: 60768@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > It's not a real problem I'm not sure what you mean by "real problem", but we can agree it's a "real" bug. > add one call to end-of-defun whose result is thrown away, before > the _real_ call to end-of-defun, the problems go away. I can confirm this hides the problem on my end as well. Thanks for looking into this more. Hope to see a proper solution. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 13 11:54:40 2023 Received: (at 60768) by debbugs.gnu.org; 13 Jan 2023 16:54:40 +0000 Received: from localhost ([127.0.0.1]:52255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGNKB-0001bU-NQ for submit@debbugs.gnu.org; Fri, 13 Jan 2023 11:54:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGNKA-0001bJ-Hz for 60768@debbugs.gnu.org; Fri, 13 Jan 2023 11:54:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGNK5-0003b5-6G; Fri, 13 Jan 2023 11:54:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=T5iQxKLRIozOK2Ql1SOLJoKm09Hf5odz0a3wX7S7IGk=; b=HALZlc4gvfs4 al2ZMwP6qTl7tkDaeWaq6ZMW0dTn6JlpMnEswpLwQ2HupnSftr7K1ylT0aIgAzJTXRq7pFVWWEbgj +D548OIs8qmcLsDeFBSrpmyg/eINd5JEDFmS+sSWjxZqbfU5i+SFE1nyiXIv9gi9AOrvcoKeHAKh2 1PqpWzn07COYF/+js8bAx7iziEtGIqsU0PajdRj1baAx3AGWamZmRwJxHwsv1c7mH1ikXls6zmFYQ PR/t4oyV0xAWrSFk0K2FDKgzxtIqW8rRv0BCQM/wqKnjSc8cQrjgVwPjAwyiyK48qkpKsX28/gmvE fzg0lkQUVxCtlzyT/cl9SA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGNK4-0005X3-5e; Fri, 13 Jan 2023 11:54:32 -0500 Date: Fri, 13 Jan 2023 18:54:31 +0200 Message-Id: <831qny9xyw.fsf@gnu.org> From: Eli Zaretskii To: No Wayman In-Reply-To: <87h6wu4c4l.fsf@gmail.com> (message from No Wayman on Fri, 13 Jan 2023 11:41:30 -0500) Subject: Re: bug#60768: 30.0.50; edebug-instrument-function off by one References: <87lem740sy.fsf@gmail.com> <83lem6a8kb.fsf@gnu.org> <87h6wu4c4l.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60768 Cc: 60768@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: No Wayman > Cc: Stefan Monnier , 60768@debbugs.gnu.org > Date: Fri, 13 Jan 2023 11:41:30 -0500 > > > Eli Zaretskii writes: > > > It's not a real problem > > I'm not sure what you mean by "real problem" I mean that there's no problem in Edebug or in the subroutines it calls. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 16 21:29:12 2023 Received: (at 60768) by debbugs.gnu.org; 17 Jan 2023 02:29:12 +0000 Received: from localhost ([127.0.0.1]:35346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHbip-0003uN-27 for submit@debbugs.gnu.org; Mon, 16 Jan 2023 21:29:12 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHbij-0003tl-4O for 60768@debbugs.gnu.org; Mon, 16 Jan 2023 21:29:09 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4AEA71000D6; Mon, 16 Jan 2023 21:28:59 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9CD221000C4; Mon, 16 Jan 2023 21:28:57 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1673922537; bh=22eW+caLzY3dIS9Pn/6Mjrr5tsYHRA2EfjGBHqNlbVo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=kPLW2uUHcJs3WJ+0oYFC7768LTM9Kh4O1/A75044TuemWK1sUyCc50ny+RnD6d7Be FPUvtf4o4s/JYGFdGo9qGb1E6EcqvTQHH2WWpeSEPoL9p0fxljaHsQ32Zoi6jsC9Kh ko4i0b11vDeaV59KjAQzMQfAUKOuOdJEtcaRzEZNwXNdjvCbL5W6jImf62B32QLGqd BoI2rleSuN9rQUkPkCp1PKgSKGAJk/LFgBIEJgaayDGKxR8GiSoKJ5pFpUHoSJzzDt Gt9iRgi1PYJBHAvZFPG0GugyFBjmOUHdMc/79RpG11yT07mCZ2Xub9lXRgHkkN/LeO wL3t0A78hJoSA== Received: from alfajor (unknown [24.62.78.115]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5D5C01209F7; Mon, 16 Jan 2023 21:28:57 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#60768: 30.0.50; edebug-instrument-function off by one In-Reply-To: <83lem6a8kb.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 13 Jan 2023 15:05:40 +0200") Message-ID: References: <87lem740sy.fsf@gmail.com> <83lem6a8kb.fsf@gnu.org> Date: Mon, 16 Jan 2023 21:28:56 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.116 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60768 Cc: 60768@debbugs.gnu.org, No Wayman X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el > index 2f7d03e..0ac51ad 100644 > --- a/lisp/emacs-lisp/edebug.el > +++ b/lisp/emacs-lisp/edebug.el > @@ -518,6 +518,7 @@ edebug-read-top-level-form > ;; Don't enter Edebug while doing that, in case we're trying to > ;; instrument things like end-of-defun. > (edebug-active t)) > + (save-excursion (end-of-defun)) > (end-of-defun) > (beginning-of-defun) > (prog1 > > i.e., add one call to end-of-defun whose result is thrown away, before > the _real_ call to end-of-defun, the problems go away. > > The reason seems to be that end-of-defun calls scan-sexps, and the > first call to scan-sexps does something that wasn't done before. > > Stefan, any ideas what could that be? Any hints where to look? Sounds like a problem with the on-the-fly calls to `syntax-propertize`. Maybe tracing `internal--syntax-propertize` would give us a hint. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 13 08:04:54 2023 Received: (at 60768) by debbugs.gnu.org; 13 Jul 2023 12:04:54 +0000 Received: from localhost ([127.0.0.1]:53546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJv42-0006hA-0u for submit@debbugs.gnu.org; Thu, 13 Jul 2023 08:04:54 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:54716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJv3y-0006gw-66 for 60768@debbugs.gnu.org; Thu, 13 Jul 2023 08:04:52 -0400 Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-765942d497fso58107385a.1 for <60768@debbugs.gnu.org>; Thu, 13 Jul 2023 05:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689249884; x=1691841884; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=CFOCVu+rGqfDFsuDX0d3EtGrD+PhpAsmVCgYpvLnw2o=; b=o3q2M81evFThsxIy8Tux9AsQtHKI2scMrM9w2Suj+opUjqUN9eOaifxk5s76qsWdSo wNYstvSkAgRzYkb9JHeg3sg1y8yDX7Jks7qonXgPN3bJ0lgT/2TyNjhIQHGoW+LQLaeC 3/bDruQ0fphiU45R/Eg9XMM0mL9UxmlAaZ1bcLOT+08v0gKCWE827gMdlDOe1GKld9zI xaTmcjaK3OP8THwpwHaMRS71SHw5iq/8vlBLE5ad3lr7UlhHZask4LAmZbMpp1MhMpuX IAnPpgThR1W0XDXBIwIDpPihDOshLYLiYw3GrshHa8wBAXw4ZtFRfveFZemJvtbYtr3o Jsyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689249884; x=1691841884; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CFOCVu+rGqfDFsuDX0d3EtGrD+PhpAsmVCgYpvLnw2o=; b=ClzCWdjwVJfPPd61JxJanK090xKgWJIFFAmB3JabHyB+N7KuM2v0xtwQcxFkfMhUBl Z/ZxBNg1gdNE1/7SZrY1irL17yESedtqB+kFUUpycKEKkq59vMJxQiVUU1QmZX5gJJPb NVSdzl0OHRg7eXqYnRmx8TGMXsJMIkdWnfuS7rHNFN4WdEeTEV2IIxnE+tZAq8mRbkYd fLLU/JALgByxTzik6Hi0hLi4h3xJw9ope0lmNa+3OCUSCtZQ3/LLBI/jwHtw3guX6PBI iRr0V/+yakFV0c1Jp2pcenRYC/GYZvx8cbh6uTu5by47O8CDhnvrhrIC7VnHlTaEPhhW 3/xg== X-Gm-Message-State: ABy/qLZ8s3GPygnjKTRY87AO0UgmDyUcBOn0HaJv+ieKtNoNACavpzYL pWUznFGJtNGDzizTl4Z18Gw9XgGHXipshQ== X-Google-Smtp-Source: APBJJlGTdhj5ZdV6TSEMyBVaYCBkc+v20q2bjE2mfUv3moAEU9iYcCBOHULYXqAOaauNNnlvKK3nMA== X-Received: by 2002:a05:620a:28c3:b0:767:1db2:c32f with SMTP id l3-20020a05620a28c300b007671db2c32fmr1765496qkp.33.1689249883899; Thu, 13 Jul 2023 05:04:43 -0700 (PDT) Received: from laptop ([2601:84:847f:c697:e217:2894:4724:14f4]) by smtp.gmail.com with ESMTPSA id x20-20020ae9f814000000b00767db1ba172sm2830760qkh.31.2023.07.13.05.04.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jul 2023 05:04:43 -0700 (PDT) References: <87lem740sy.fsf@gmail.com> <83lem6a8kb.fsf@gnu.org> User-agent: mu4e 1.11.9; emacs 30.0.50 From: No Wayman To: Eli Zaretskii Subject: Re: bug#60768: 30.0.50; edebug-instrument-function off by one Date: Thu, 13 Jul 2023 08:03:55 -0400 In-reply-to: <83lem6a8kb.fsf@gnu.org> Message-ID: <87edlc81az.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60768 Cc: 60768@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: No Wayman >> Date: Thu, 12 Jan 2023 21:27:06 -0500 >> >> 1. Save the following elisp to /tmp/test.el: >> >> >> --8<---------------cut >> here---------------start------------->8--- >> ;; -*- lexical-binding: t; -*- >> >> ;;;###autoload >> (defun one () >> "ONE" >> (1+ 0)) >> >> (defun two () >> "TWO" >> (1+ (one))) >> >> (defun three () >> "THREE" >> (1+ (two))) >> >> (provide 'test) >> --8<---------------cut >> here---------------end--------------->8--- >> >> 2. Run emacs from the command line with the following: >> >> emacs -Q --batch -l /tmp/test.el --eval "(progn (require >> 'edebug) >> (edebug-instrument-function #'one))" >> >> Expected output: Edebug: one >> Actual output: Edebug: two >> >> If you repeat the test with an additional autoload cookie added >> above function "two", function one is correctly instrumented. >> >> If you repeat it with an autoload cookie only above function >> "three", function two is, incorrectly, instrumented. >> >> My hunch is find-function-search-for-symbol being thrown off >> somehow. > > It's not a real problem, and it has nothing to do with the > autoload > cookie, AFAICT. If you modify edebug.el like below: > > diff --git a/lisp/emacs-lisp/edebug.el > b/lisp/emacs-lisp/edebug.el > index 2f7d03e..0ac51ad 100644 > --- a/lisp/emacs-lisp/edebug.el > +++ b/lisp/emacs-lisp/edebug.el > @@ -518,6 +518,7 @@ edebug-read-top-level-form > ;; Don't enter Edebug while doing that, in case we're > trying to > ;; instrument things like end-of-defun. > (edebug-active t)) > + (save-excursion (end-of-defun)) > (end-of-defun) > (beginning-of-defun) > (prog1 > > i.e., add one call to end-of-defun whose result is thrown away, > before > the _real_ call to end-of-defun, the problems go away. > > The reason seems to be that end-of-defun calls scan-sexps, and > the > first call to scan-sexps does something that wasn't done before. > > Stefan, any ideas what could that be? Any hints where to look? Any chance of applying this workaround with a note to investigate more for a proper fix? From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 13 09:14:37 2023 Received: (at 60768) by debbugs.gnu.org; 13 Jul 2023 13:14:37 +0000 Received: from localhost ([127.0.0.1]:53584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJw9V-0008Tr-I1 for submit@debbugs.gnu.org; Thu, 13 Jul 2023 09:14:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:32852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJw9S-0008TX-Pa for 60768@debbugs.gnu.org; Thu, 13 Jul 2023 09:14:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJw9N-0003lQ-4L; Thu, 13 Jul 2023 09:14:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=klxb1Fmrr46n1hF/QUVgJ7vbwJacsaKcSr4ENmXkKvo=; b=X8qy7WgE89E+ r4xHeuX4q9gPPZCpF+QXYeGSEwvK3cYvyUr4KFGUck6uG2gi0Fm+SDYPmJGJWPB2VivUYSuHOUykA DwdRU8ytjTAS9IV4a9h87ec+tQAr4cgh7vuVFiFBfKQrrVIwrU15UXYtdKIXBgDwsH+X+CGYba/Sz xK9ryqosCEgDZgTIO/nh24CIprU4KbxuULPjeEirszsyagMnTDUaYj6uk5Ja/efnINb8bFqhTDkWR hMCuTj1G4DSHFNwp1PiozcHDJriJVHhHvDhvu9RZyivCQmPAaj9TMkkIXMAnk+afMk5U43sGdH6iy MkV9Wgz2zoDys1vbDD6HjQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJw9M-0003P8-Jv; Thu, 13 Jul 2023 09:14:28 -0400 Date: Thu, 13 Jul 2023 16:14:45 +0300 Message-Id: <83y1jk3qd6.fsf@gnu.org> From: Eli Zaretskii To: No Wayman In-Reply-To: <87edlc81az.fsf@gmail.com> (message from No Wayman on Thu, 13 Jul 2023 08:03:55 -0400) Subject: Re: bug#60768: 30.0.50; edebug-instrument-function off by one References: <87lem740sy.fsf@gmail.com> <83lem6a8kb.fsf@gnu.org> <87edlc81az.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60768 Cc: 60768@debbugs.gnu.org, monnier@iro.umontreal.ca X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: No Wayman > Cc: Stefan Monnier , 60768@debbugs.gnu.org > Date: Thu, 13 Jul 2023 08:03:55 -0400 > > Any chance of applying this workaround with a note to investigate > more for a proper fix? I'm not sure we want to do that. Stefan, WDYT? From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 30 19:49:12 2023 Received: (at control) by debbugs.gnu.org; 30 Sep 2023 23:49:13 +0000 Received: from localhost ([127.0.0.1]:60063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmjhw-00072J-LS for submit@debbugs.gnu.org; Sat, 30 Sep 2023 19:49:12 -0400 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:59871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmjht-00071W-Qr for control@debbugs.gnu.org; Sat, 30 Sep 2023 19:49:10 -0400 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2c007d6159aso236872141fa.3 for ; Sat, 30 Sep 2023 16:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696117728; x=1696722528; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=qvtxfSonX/uTcrAQSDjBOKrNg4zwNXrBrO4oMI/frxI=; b=SHYZ0diUeh8NZXPg+VRzkvsrSqhuHnsNCKeIAMU0dPSCAP6tDcQ9SawXSiqNIsSPLB HeJJoOzhn0DaBkH6ucalcc+0+Z0FJGbLEKdzyZN07gaDQ0a1xWv8BqnCN0TPV8XmdpDr hTXsaKQckhxeLYu+3s0FgqAdTSF2BGd2jlF6AgldwKiA+wCoGiNQm5ez/7hLbxPXvQtD JkTBYjOqEJQFXDDxMDNjB3dkTpitvZQj6rZbvoAOEofYgnBR5ZQxtfKLyDbaUAFD6ntA lGvjFC29CRd2ss7U3BY/2hP4c8xIVMLeaHyjkkbSqQs8mchRfxdZIabVvvB5qR81XlFA ipjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696117728; x=1696722528; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qvtxfSonX/uTcrAQSDjBOKrNg4zwNXrBrO4oMI/frxI=; b=B9mxCgsszx7fO0V/iue01MFR6JOMPScSi+xqLxlAB6wN9Qpc0lKdYJlsaWJKdLHNts XBxEXMvCtZkS6ST6p2MQfE+LCg3jE1v2y/4oW7ysMCq2W9lb9S1tU5s8HBxTmAePnEc1 s8zS5gFY19xffjGsNbjBy6BEBzZKjARHmylxikaDcr0k78AwlR9x6JJcAp+lsPBJe6QL F/pQSxn6Cv61R3nadtzh2fbWLctKty77FEdchcIpnoMtbD+LJ0SQFdAVDZ/b8bG+oLcW e8ivjXpd5wtEtAlWoq48VQ10o7M5ufwP9jKj2V93S4Vx/JcdH3cUPbl5lGwq7IQwopDk ItVA== X-Gm-Message-State: AOJu0YxosISXIUdeweQPKB/vhIwpRJSKWbvG51FYrK0PoHjzlzky+2O/ ef7XzRk0o75tNAeUMwtt9bKDu2+5ODozlYe1UUw= X-Google-Smtp-Source: AGHT+IGJ7ynU+d5fGIXgrBrbjfdTZVr7tRvkTcPNCKFOiWc97Jg49j/YMsxIo5yPlc/dicQWUtsGu/Ij7jNOwlnQyDk= X-Received: by 2002:a05:6512:15d:b0:503:3587:fd15 with SMTP id m29-20020a056512015d00b005033587fd15mr6334461lfo.61.1696117728083; Sat, 30 Sep 2023 16:48:48 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 30 Sep 2023 16:48:47 -0700 From: Stefan Kangas In-Reply-To: <87jzsa6q2s.fsf@sappc2.fritz.box> (Jens Schmidt's message of "Thu, 28 Sep 2023 21:43:55 +0200") References: <87v8bvun4z.fsf@gmail.com> <87jzsa6q2s.fsf@sappc2.fritz.box> MIME-Version: 1.0 Date: Sat, 30 Sep 2023 16:48:47 -0700 Message-ID: Subject: Re: bug#66218: 29.1.50; `beginning-of-defun' jumps to wrong position in `emacs-lisp-mode' To: Jens Schmidt Content-Type: text/plain; charset="UTF-8" Bcc: control@debbugs.gnu.org X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: No Wayman , 66218@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) forcemerge 60768 66218 tags 60768 + patch thanks Jens Schmidt writes: > No Wayman writes: > >> Possibly related to bug#60768? > > Actually, yes: With above patch your bug seems fixed. The preconditions > for this bug are also met by your bug: Syntax properties previously not > loaded plus the substring "###" which triggers overwriting of the match > data. Thanks, I'm therefore merging those bugs. From unknown Fri Jun 20 07:10:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 11 Nov 2023 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator