From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 24 16:32:57 2024 Received: (at submit) by debbugs.gnu.org; 24 Jun 2024 20:32:57 +0000 Received: from localhost ([127.0.0.1]:35702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLqMz-0005G1-Bn for submit@debbugs.gnu.org; Mon, 24 Jun 2024 16:32:57 -0400 Received: from lists.gnu.org ([209.51.188.17]:38166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sLqMu-0005Fp-N1 for submit@debbugs.gnu.org; Mon, 24 Jun 2024 16:32:55 -0400 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 1sLqMt-0008Ev-24 for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2024 16:32:51 -0400 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sLqMr-0005wJ-FO for bug-gnu-emacs@gnu.org; Mon, 24 Jun 2024 16:32:50 -0400 Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-444c0d2d503so20567081cf.1 for ; Mon, 24 Jun 2024 13:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719261168; x=1719865968; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=aaOBErZa4JdOiz3vjyWqOOeOIdUM88cWdp1fcrkuTTk=; b=CkOR4BtRxqAgQwycj0zw3cFI1MkT8ac5Hlj3Ok8XK92psJRcYL/arrEJ1/NUkJ11JM bbGYA6NxBSmFeDh01CruZt7s0Wj9IkMGZv2mNeZ86xdNRG69GJxDdIuO/OJFKvwQTn8f xwepMWJsfgaUlQmklHcTVds8ZjzLelxD14nOFGm2coQhrQ23OM+HF/2a1mkCwS8lD/ZG EhrRKSJk2j2CiJ8pGf7yyB9KBydJKmahABBxSHaKzIR1I285lZp/mSPCMGlcxnni3JaL x1GI05H5zAhg64afeFaWt1VJYNH8JW17uFdgFRqcgRbZ6+WX0i2a7snMA4zVKg1Bs8x4 H2DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719261168; x=1719865968; h=content-transfer-encoding:mime-version:user-agent:message-id:date :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aaOBErZa4JdOiz3vjyWqOOeOIdUM88cWdp1fcrkuTTk=; b=CoTV7cdMl1UXvS4xWTbPkpvR8HY1e37B+RU7aV8yzFGA0ALHB4BS262D9x2Dg1I9zM wQFBy8LbtUIROl9MrxkG3RQMBLlz1JvpyTui6e4YoboaFUXY34C8wpJCcagTM/kARop3 fZXVy4ffOLM02NhhooGnue/8C4wJzX17bzPiAHn2mQV7pxn4VArL3uc4AiWwNNf7nJ15 L6xqiFzWWUFxbTTDRm0rx1mv/kmN8Rr0K45AXSL3U8c0m1i6m2j9sBi6SYaGauzvGjNP ksz1iFGNZe71DoIemMpJ3+Le242nWUgn5urjx3ofx68sMjsBrtyMewOcPs5cUC6zy486 a6Kg== X-Gm-Message-State: AOJu0YyFXB5ZITEIKQpIcxqemepQlTVte3oUpJX3NtaENXU5Hv0ZGrC+ unETRXrzevhRjicg0+hrPhLY0sFh95wMKsGH+DUd/eA9MbOl5U0rcPhyUw== X-Google-Smtp-Source: AGHT+IFr40641/r4MT40IjNAswVGtazcJITD9oS8SnDRwn/Oxs+CS16UlRJmT2LSOjSBe+AKe7QsDg== X-Received: by 2002:a05:622a:1aa1:b0:43e:3b2f:e2 with SMTP id d75a77b69052e-444d64f3c6bmr65799501cf.37.1719261167668; Mon, 24 Jun 2024 13:32:47 -0700 (PDT) Received: from t530.local ([2600:8806:a801:3150:6232:a925:a650:ba8c]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-444e316673csm16166661cf.89.2024.06.24.13.32.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 13:32:47 -0700 (PDT) From: tpeplt To: bug-gnu-emacs@gnu.org Subject: 29.3; Emacs-Lisp menu display is incorrect during Edebug Date: Mon, 24 Jun 2024 16:32:46 -0400 Message-ID: <87ed8m9j4h.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::833; envelope-from=tpeplt@gmail.com; helo=mail-qt1-x833.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 (--) Emacs Maintainers, When a function has been instrumented for debugging with Edebug and the debugger has entered the function for stepping, the menu item =E2=80=98Emacs-Lisp=E2=80=99 does not list the correct entries (which should be the same entries as they were before entering the debugger) in its drop-down menu. Instead, the drop-down menu lists two entries =E2=80=98Emacs-Lisp=E2=80=99 and =E2=80=98Emacs-Lisp=E2=80=99. These two entries, in turn, are sub-menus whose contents are the correct menu items for =E2=80=98Emacs-Lisp=E2=80=99, namely, =E2=80=98Indent Line=E2=80=99, =E2=80=98Indent Region=E2=80=99, and= so on. After exiting the debugger, the menu items for the =E2=80=98Emacs-Lisp=E2=80=99 menu item are displayed correctly. Recipe for reproducing this menu-display error: 1. Start Emacs from a shell prompt with: $ emacs -Q 2. Create a new Emacs Lisp file with C-x C-f, say, new-file.el 3. Create a simple Emacs Lisp function: (defun new-fun (name) (if name 'some-name nil)) 4. Instrument the function with C-u M-C-x. 5. Check the menu listing for =E2=80=98Emacs-Lisp=E2=80=99 to confirm that it is correct. 6. Invoke the instrumented function to enter Edebug: (new-fun t) 7. Check the menu listing for =E2=80=98Emacs-Lisp=E2=80=99 to see that it now lists (only) two identical =E2=80=98Emacs-Lisp=E2=80=99 entries, each of which is a sub-menu. The sub-menus will list the correct entries for =E2=80=98Emacs-Lisp=E2=80=99. 8. In the debugger, type =E2=80=98c=E2=80=99 to continue to complete the debugging session. Once it has exited, check the =E2=80=98Emacs-Lisp=E2=80=99 menu item to confirm that it now has the correct entries. Each time that Edebug is entered, the =E2=80=98Emacs-Lisp=E2=80=99 menu=E2=80=99s entries are two incor= rect sub-menus. Please let me know if anything above is unclear or if you are unable to reproduce this problem. --=20 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 28 14:10:19 2024 Received: (at 71761) by debbugs.gnu.org; 28 Jun 2024 18:10:19 +0000 Received: from localhost ([127.0.0.1]:46329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNG39-0005n4-3y for submit@debbugs.gnu.org; Fri, 28 Jun 2024 14:10:19 -0400 Received: from out-183.mta0.migadu.com ([91.218.175.183]:38347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNG34-0005mk-RH for 71761@debbugs.gnu.org; Fri, 28 Jun 2024 14:10:17 -0400 X-Envelope-To: 71761@debbugs.gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1719598206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n8tg3pF2+Jp6oGH/E+rNvpsj8ULKI7RKM/h6jG69UUQ=; b=HoyawPLkfvk3ap9B3g6OiRAgku66fv8qgTWRW9ijVgOop98enA3RS+paOEMBgTcut3wpim 5JMx3VpwLND4PqRhONlHTzaIp7L5Ex2xquglT4PB+MQ8qkXt60/doHQjXyKlXOylcNGTzl 6Av+A1PVe7mXUUmKHrlfDNw8N3RmfqwHX41+GaUpz4wsq5QXTPV26XBtzZdXXeDNgt80X3 WYd08nFoxT4gfV0jzWcgv94EpnRZ0liaOdi/7zJYybVpZpbLBEvoJujWHcz3vfIbyJYJbv URdZc00Uhrm7iO6Vi6iP1KASv8qloeakEYnq2Pc2XS/UNms3+lRXb7OO50nNnA== X-Envelope-To: tpeplt@gmail.com X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Jeremy Bryant To: tpeplt Subject: Re: bug#71761: 29.3; Emacs-Lisp menu display is incorrect during Edebug In-Reply-To: <87ed8m9j4h.fsf@gmail.com> (tpeplt@gmail.com's message of "Mon, 24 Jun 2024 16:32:46 -0400") References: <87ed8m9j4h.fsf@gmail.com> Date: Fri, 28 Jun 2024 19:10:05 +0100 Message-ID: <87cyo1hrb6.fsf@jeremybryant.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71761 Cc: 71761@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 (-) tpeplt writes: > Emacs Maintainers, > > When a function has been instrumented for debugging with > Edebug and the debugger has entered the function for > stepping, the menu item =E2=80=98Emacs-Lisp=E2=80=99 does not list the > correct entries (which should be the same entries as they > were before entering the debugger) in its drop-down menu. > Instead, the drop-down menu lists two entries =E2=80=98Emacs-Lisp=E2=80=99 > and =E2=80=98Emacs-Lisp=E2=80=99. These two entries, in turn, are sub-me= nus > whose contents are the correct menu items for =E2=80=98Emacs-Lisp=E2=80= =99, > namely, =E2=80=98Indent Line=E2=80=99, =E2=80=98Indent Region=E2=80=99, a= nd so on. > > After exiting the debugger, the menu items for the > =E2=80=98Emacs-Lisp=E2=80=99 menu item are displayed correctly. > > Recipe for reproducing this menu-display error: > > 1. Start Emacs from a shell prompt with: $ emacs -Q > > 2. Create a new Emacs Lisp file with C-x C-f, say, > new-file.el > > 3. Create a simple Emacs Lisp function: > > (defun new-fun (name) > (if name 'some-name nil)) > > 4. Instrument the function with C-u M-C-x. > > 5. Check the menu listing for =E2=80=98Emacs-Lisp=E2=80=99 to confirm > that it is correct. > > 6. Invoke the instrumented function to enter Edebug: > > (new-fun t) > > 7. Check the menu listing for =E2=80=98Emacs-Lisp=E2=80=99 to see that= it > now lists (only) two identical =E2=80=98Emacs-Lisp=E2=80=99 entries, > each of which is a sub-menu. The sub-menus will list > the correct entries for =E2=80=98Emacs-Lisp=E2=80=99. > > 8. In the debugger, type =E2=80=98c=E2=80=99 to continue to complete t= he > debugging session. Once it has exited, check the > =E2=80=98Emacs-Lisp=E2=80=99 menu item to confirm that it now has t= he > correct entries. Each time that Edebug is entered, > the =E2=80=98Emacs-Lisp=E2=80=99 menu=E2=80=99s entries are two inc= orrect > sub-menus. > > Please let me know if anything above is unclear or if you are unable > to reproduce this problem. The following may help to narrow down the problem: In Emacs 29.4: I am able to reproduce the bug in Emacs GUI But in Emacs TTY (emacs -nw), the problem seems absent, the menu bar appears correct. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 29 07:05:52 2024 Received: (at 71761) by debbugs.gnu.org; 29 Jun 2024 11:05:52 +0000 Received: from localhost ([127.0.0.1]:37164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNVtw-0001Ul-04 for submit@debbugs.gnu.org; Sat, 29 Jun 2024 07:05:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNVtu-0001UY-90 for 71761@debbugs.gnu.org; Sat, 29 Jun 2024 07:05:50 -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 1sNVto-0002SJ-Li; Sat, 29 Jun 2024 07:05:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=kmCeIyUj8fSRnooLJZsgTCld6pzv/4YejqZtPLmGSDI=; b=FE022yfeKePh6+PUdfP3 f54t0JRE4XsjarpwWzIpJbq+AvUKVSqwnzQHawXMK+9bKzCrtTqicom4fx5xroDPgk4YJVdfp2FfO n+RoEWAqXJXyMD6CFJ8DPgVRFChOsg5SqlFJY3YN4SPyax52WGMFTe1Wh3EhslUc1rSvs/oVVcfU8 B2R3lb+q9lcqh0U51uEWiAqTFCTW8KKDEN0KmKEcoDW0PuprkCKyQDa9f4WCXV39ySqIp1zdDxRpi nSGLkb/slEzuXnA2UjdbfB9hKCpZqyZaudQCmrl/azOTVWiAx0PolT7L0G4gyZTTM4qbGvItf4IPF +RXtlw8ZHGw0KQ==; Date: Sat, 29 Jun 2024 14:05:40 +0300 Message-Id: <86cyo0j9ff.fsf@gnu.org> From: Eli Zaretskii To: Jeremy Bryant , Stefan Monnier In-Reply-To: <87cyo1hrb6.fsf@jeremybryant.net> (bug-gnu-emacs@gnu.org) Subject: Re: bug#71761: 29.3; Emacs-Lisp menu display is incorrect during Edebug References: <87ed8m9j4h.fsf@gmail.com> <87cyo1hrb6.fsf@jeremybryant.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71761 Cc: 71761@debbugs.gnu.org, tpeplt@gmail.com 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 (---) > Cc: 71761@debbugs.gnu.org > Date: Fri, 28 Jun 2024 19:10:05 +0100 > From: Jeremy Bryant via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > tpeplt writes: > > > Emacs Maintainers, > > > > When a function has been instrumented for debugging with > > Edebug and the debugger has entered the function for > > stepping, the menu item ‘Emacs-Lisp’ does not list the > > correct entries (which should be the same entries as they > > were before entering the debugger) in its drop-down menu. > > Instead, the drop-down menu lists two entries ‘Emacs-Lisp’ > > and ‘Emacs-Lisp’. These two entries, in turn, are sub-menus > > whose contents are the correct menu items for ‘Emacs-Lisp’, > > namely, ‘Indent Line’, ‘Indent Region’, and so on. > > > > After exiting the debugger, the menu items for the > > ‘Emacs-Lisp’ menu item are displayed correctly. > > > > Recipe for reproducing this menu-display error: > > > > 1. Start Emacs from a shell prompt with: $ emacs -Q > > > > 2. Create a new Emacs Lisp file with C-x C-f, say, > > new-file.el > > > > 3. Create a simple Emacs Lisp function: > > > > (defun new-fun (name) > > (if name 'some-name nil)) > > > > 4. Instrument the function with C-u M-C-x. > > > > 5. Check the menu listing for ‘Emacs-Lisp’ to confirm > > that it is correct. > > > > 6. Invoke the instrumented function to enter Edebug: > > > > (new-fun t) > > > > 7. Check the menu listing for ‘Emacs-Lisp’ to see that it > > now lists (only) two identical ‘Emacs-Lisp’ entries, > > each of which is a sub-menu. The sub-menus will list > > the correct entries for ‘Emacs-Lisp’. > > > > 8. In the debugger, type ‘c’ to continue to complete the > > debugging session. Once it has exited, check the > > ‘Emacs-Lisp’ menu item to confirm that it now has the > > correct entries. Each time that Edebug is entered, > > the ‘Emacs-Lisp’ menu’s entries are two incorrect > > sub-menus. > > > > Please let me know if anything above is unclear or if you are unable > > to reproduce this problem. > > The following may help to narrow down the problem: > > In Emacs 29.4: > I am able to reproduce the bug in Emacs GUI > But in Emacs TTY (emacs -nw), the problem seems absent, the menu bar > appears correct. That could be a bug in TTY menus, or maybe a side effect of how the menu bar is displayed there. AFAICT, the duplicate menu is the consequence of the fact that edebug-mode has its keymap inherit from emacs-lisp-mode: (defvar-keymap edebug-mode-map :parent emacs-lisp-mode-map So when Edebug is activated, it wants to display yet another "Emacs Lisp" menu on the menu bar. Stefan, do you see a way to avoid that? Or maybe we should not consider this a bug at all? After all, what's the damage? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 29 08:21:15 2024 Received: (at 71761) by debbugs.gnu.org; 29 Jun 2024 12:21:15 +0000 Received: from localhost ([127.0.0.1]:37316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNX4s-0006MP-Un for submit@debbugs.gnu.org; Sat, 29 Jun 2024 08:21:15 -0400 Received: from out-170.mta0.migadu.com ([91.218.175.170]:53174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNX4r-0006M7-0f for 71761@debbugs.gnu.org; Sat, 29 Jun 2024 08:21:13 -0400 X-Envelope-To: 71761@debbugs.gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1719663636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eATDeLqAu6/ZxPyZQWpQU9RsbJ0rZpPROnZEzdpuWf0=; b=rlXhnyEbv89Vmz7/bJQwjLAuSHJ7bUEhdlvdN12gZtpX6f/CGV+f4txisyIt/BVbnmflvl 8ki9+rLL1BWrU5AQzlczUmRS9E8h2LKLIp9QOyC2zbBrUgfNrIS6QQmCDrlSz3y60T3vJL qSwHqzabC4DafObVQZdcEWRoDeXc8L0a3DA1P+i1JmeUhxhkR9LFCaALd765K1aE/Vteuk a1tWAcjsShD4EzYeFzGNuriXNSWAbMWnNThT0VJaFABNbE7BZrgK1rRtbDJoMas9KgVuZx daIxCAiS0VrkdEo6df3mcWxMmLvB7kH8NlP4heaIP+A0PC34+C2lC2l4GAgQ0g== X-Envelope-To: tpeplt@gmail.com X-Envelope-To: monnier@iro.umontreal.ca X-Envelope-To: eliz@gnu.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Jeremy Bryant To: Eli Zaretskii Subject: Re: bug#71761: 29.3; Emacs-Lisp menu display is incorrect during Edebug In-Reply-To: <86cyo0j9ff.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Jun 2024 14:05:40 +0300") References: <87ed8m9j4h.fsf@gmail.com> <87cyo1hrb6.fsf@jeremybryant.net> <86cyo0j9ff.fsf@gnu.org> Date: Sat, 29 Jun 2024 13:20:33 +0100 Message-ID: <87sewwgctq.fsf@jeremybryant.net> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71761 Cc: 71761@debbugs.gnu.org, tpeplt@gmail.com, 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: >> > Please let me know if anything above is unclear or if you are unable >> > to reproduce this problem. >> >> The following may help to narrow down the problem: >> >> In Emacs 29.4: >> I am able to reproduce the bug in Emacs GUI >> But in Emacs TTY (emacs -nw), the problem seems absent, the menu bar >> appears correct. > > That could be a bug in TTY menus, or maybe a side effect of how the > menu bar is displayed there. I fear I wasn't clear in my diagnostics. It appears from my testing the bug is in Emacs GUI, and the TTY menus are OK. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 29 08:47:39 2024 Received: (at 71761) by debbugs.gnu.org; 29 Jun 2024 12:47:39 +0000 Received: from localhost ([127.0.0.1]:37395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNXUR-00077j-FJ for submit@debbugs.gnu.org; Sat, 29 Jun 2024 08:47:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNXUQ-00077W-0H for 71761@debbugs.gnu.org; Sat, 29 Jun 2024 08:47:38 -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 1sNXUK-0001Ov-VO; Sat, 29 Jun 2024 08:47:32 -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=MMJpbVgavrVUJ2hHxK6XsBtO6vVddwv6PdpJEQB9nGM=; b=haGuf2z3ecg/ MH1Th+VK7HS5XWyBZP6Q2VRPEdjLqqUfzaRrwPxOQn5pCgJOJGyrPZYAY4p+6eJv4tCbKHX/njokV op7C9LGq47y7JponuD7mf6tqe8QYzsKOBJdPcCxYe7sLLzOPt4RsypCCbrqxo/NUH76f4Mdp+9bn2 /z3eAe5HWYdp2SC3phTplJcdIZkaLzUIj3EmiEXKC4t5D0Wq4nKaw7KQ8EmBc3jYkRXXKqK/aYw4x HHaUPGwPvGXmIg/JUGqu8ef2TADmZe7Jxh/5Rz+BF12f4bUav6BhZe1Pl1IVmz6e+8Tr2Ykg0NZDh Ot6uwlqgXwFbhycbavdJdg==; Date: Sat, 29 Jun 2024 15:47:30 +0300 Message-Id: <86r0cfj4pp.fsf@gnu.org> From: Eli Zaretskii To: Jeremy Bryant In-Reply-To: <87sewwgctq.fsf@jeremybryant.net> (message from Jeremy Bryant on Sat, 29 Jun 2024 13:20:33 +0100) Subject: Re: bug#71761: 29.3; Emacs-Lisp menu display is incorrect during Edebug References: <87ed8m9j4h.fsf@gmail.com> <87cyo1hrb6.fsf@jeremybryant.net> <86cyo0j9ff.fsf@gnu.org> <87sewwgctq.fsf@jeremybryant.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71761 Cc: 71761@debbugs.gnu.org, tpeplt@gmail.com, 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: Jeremy Bryant > Cc: Stefan Monnier , tpeplt@gmail.com, > 71761@debbugs.gnu.org > Date: Sat, 29 Jun 2024 13:20:33 +0100 > > Eli Zaretskii writes: > > >> > Please let me know if anything above is unclear or if you are unable > >> > to reproduce this problem. > >> > >> The following may help to narrow down the problem: > >> > >> In Emacs 29.4: > >> I am able to reproduce the bug in Emacs GUI > >> But in Emacs TTY (emacs -nw), the problem seems absent, the menu bar > >> appears correct. > > > > That could be a bug in TTY menus, or maybe a side effect of how the > > menu bar is displayed there. > > I fear I wasn't clear in my diagnostics. > > It appears from my testing the bug is in Emacs GUI, and the TTY menus > are OK. I understood that. But are you aware of the fact that TTY menus use the same code from xmenu.c that the X build without toolkits uses? My point is that the fact that TTY menus don't show this problem is because there's a bug in xmenu.c which somehow hides this problem. After all, when the code which traverses the menu structures finds a menu item that already exists, it could start a new pane or it could overwrite the existing one. Which one is the buggy one? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 29 18:04:45 2024 Received: (at 71761) by debbugs.gnu.org; 29 Jun 2024 22:04:45 +0000 Received: from localhost ([127.0.0.1]:53909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNgBZ-0002Qq-3b for submit@debbugs.gnu.org; Sat, 29 Jun 2024 18:04:45 -0400 Received: from out-182.mta1.migadu.com ([95.215.58.182]:17050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNgBX-0002Qd-W1 for 71761@debbugs.gnu.org; Sat, 29 Jun 2024 18:04:44 -0400 X-Envelope-To: 71761@debbugs.gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1719698678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CTBCebbq56t8SfLqbF53/nZWleLvq2AjMv/XFH5bgW4=; b=src6FD2UUaMgAtzfTdaSouvZXIPXJB1jod/pX6FNn1Uc7LUlVM0R40ew4zouuezKNMk2eM /hTASRTADqWqg6CkiTbg7Hnr4JiQFVUCsxus6Qy9Y315l8CO9GQN9aiwwDgrozdTc4La4R A8ByQSSolLjaExiGhJrpQzX50A2P1Obn29K5tEZWyAGS/jniouPFyP452b1QmSyrELNcwq tFUKVL1PukNSYvijK9jwpiup4b7c6a9mlEdAcOFokUort13fwoFaazl29SVept08Fra+uF MdFIESKcU0BYXWeVLy6nVd0pWNzYhsO4uIpQPVzV4/Zfew9wsddD/6J0mODW6Q== X-Envelope-To: tpeplt@gmail.com X-Envelope-To: monnier@iro.umontreal.ca X-Envelope-To: eliz@gnu.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Jeremy Bryant To: Eli Zaretskii Subject: Re: bug#71761: 29.3; Emacs-Lisp menu display is incorrect during Edebug In-Reply-To: <86r0cfj4pp.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Jun 2024 15:47:30 +0300") References: <87ed8m9j4h.fsf@gmail.com> <87cyo1hrb6.fsf@jeremybryant.net> <86cyo0j9ff.fsf@gnu.org> <87sewwgctq.fsf@jeremybryant.net> <86r0cfj4pp.fsf@gnu.org> Date: Sat, 29 Jun 2024 23:04:35 +0100 Message-ID: <87o77jflsc.fsf@jeremybryant.net> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71761 Cc: 71761@debbugs.gnu.org, tpeplt@gmail.com, 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: -1.7 (-) Eli Zaretskii writes: >> > That could be a bug in TTY menus, or maybe a side effect of how the >> > menu bar is displayed there. >> >> I fear I wasn't clear in my diagnostics. >> >> It appears from my testing the bug is in Emacs GUI, and the TTY menus >> are OK. > > I understood that. But are you aware of the fact that TTY menus use > the same code from xmenu.c that the X build without toolkits uses? > > My point is that the fact that TTY menus don't show this problem is > because there's a bug in xmenu.c which somehow hides this problem. > After all, when the code which traverses the menu structures finds a > menu item that already exists, it could start a new pane or it could > overwrite the existing one. Which one is the buggy one? Interesting (glad to hear my testing was understood properly.). I wasn't aware of this, thanks for explaining the code structure. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 30 00:12:57 2024 Received: (at 71761) by debbugs.gnu.org; 30 Jun 2024 04:12:57 +0000 Received: from localhost ([127.0.0.1]:54361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNlvs-0001Il-R8 for submit@debbugs.gnu.org; Sun, 30 Jun 2024 00:12:57 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:2873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNlvr-0001IY-Hu for 71761@debbugs.gnu.org; Sun, 30 Jun 2024 00:12:55 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 030FD440270; Sun, 30 Jun 2024 00:12:49 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1719720767; bh=+zsbzOthBQyviRHmfY0bk82IevZSW5ROIyK0eg3JWek=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hbnIvdZz+eFenh/kfhymi/g5BzSVQe5+aakBXuQ4aj8JAgnvndLR1b0XV1Xk3rwZ5 ACWkZ2LD6fZM/G7V1WddWBD+6ZLAFhFHYiwcZ29JaHIFdSUq/0DNoNzqnoU6tKagmo CdOass8UN9CdGiO1oB/UjTq3rj68QnKxlxXI8fxBL/ak57CBytGqf3tHQ6KHK68YDC YpE2e8kLDbNNF8/dN/MdwP3V7uWLuYXY81gX2jCZzUzPDsi3eK/Lbafu1FUKE1VTiL X1x9839qZwK3c/eccfv511Xa8LpkL8aSwe8PKf2nUAl/Hi6fN5tWd3ooyoc+e+ih8y dIufeSulQNvGw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 36FE74401A7; Sun, 30 Jun 2024 00:12:47 -0400 (EDT) Received: from pastel (unknown [45.72.245.253]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id F3AB612051B; Sun, 30 Jun 2024 00:12:46 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#71761: 29.3; Emacs-Lisp menu display is incorrect during Edebug In-Reply-To: <86cyo0j9ff.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Jun 2024 14:05:40 +0300") Message-ID: References: <87ed8m9j4h.fsf@gmail.com> <87cyo1hrb6.fsf@jeremybryant.net> <86cyo0j9ff.fsf@gnu.org> Date: Sun, 30 Jun 2024 00:12:46 -0400 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.534 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 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71761 Cc: Jeremy Bryant , 71761@debbugs.gnu.org, tpeplt@gmail.com 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 (---) > AFAICT, the duplicate menu is the consequence of the fact that > edebug-mode has its keymap inherit from emacs-lisp-mode: > > (defvar-keymap edebug-mode-map > :parent emacs-lisp-mode-map > > So when Edebug is activated, it wants to display yet another "Emacs > Lisp" menu on the menu bar. Yup, it's a longstanding problem. E.g. we don't really have a way for major/minor mode keymaps to *add* elements to an existing menu. > Stefan, do you see a way to avoid that? I think `keymap-canonicalize` is the place where we could try to handle that, but IIRC the menu code doesn't really use it, and for "good" reasons: we can't really take all the active keymaps and merge them into a single canonicalized keymap because it's hard for such a merge to be both semantically correct at the same time as providing elements in the expected visual order (e.g. the ordering of top-level menus would naturally be in the order of priority of the keymaps from where they come, which would put minor mode menus at the top-left, followed by major mode menus followed by global menus, whereas we want the exact opposite ordering visually). Stefan