From unknown Tue Jun 17 20:15:46 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#61629 <61629@debbugs.gnu.org> To: bug#61629 <61629@debbugs.gnu.org> Subject: Status: master: Sometimes M-x imenu throws an error when there's a single function in the buffer. Reply-To: bug#61629 <61629@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:15:46 +0000 retitle 61629 master: Sometimes M-x imenu throws an error when there's a si= ngle function in the buffer. reassign 61629 emacs submitter 61629 Alan Mackenzie severity 61629 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 19 10:39:21 2023 Received: (at submit) by debbugs.gnu.org; 19 Feb 2023 15:39:21 +0000 Received: from localhost ([127.0.0.1]:49504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTlmb-000311-89 for submit@debbugs.gnu.org; Sun, 19 Feb 2023 10:39:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:49542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTlmZ-00030r-7A for submit@debbugs.gnu.org; Sun, 19 Feb 2023 10:39:19 -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 1pTlmY-0002Hf-Pl for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2023 10:39:18 -0500 Received: from mx3.muc.de ([193.149.48.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTlmW-0008BD-UT for bug-gnu-emacs@gnu.org; Sun, 19 Feb 2023 10:39:18 -0500 Received: (qmail 68813 invoked by uid 3782); 19 Feb 2023 16:39:14 +0100 Received: from acm.muc.de (pd953a64b.dip0.t-ipconnect.de [217.83.166.75]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 19 Feb 2023 16:39:14 +0100 Received: (qmail 8798 invoked by uid 1000); 19 Feb 2023 15:39:13 -0000 Date: Sun, 19 Feb 2023 15:39:13 +0000 To: bug-gnu-emacs@gnu.org Subject: master: Sometimes M-x imenu throws an error when there's a single function in the buffer. Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.5; envelope-from=acm@muc.de; helo=mx3.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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.4 (--) Hello, Emacs. On the master branch, the recipe below leads to an error being thrown from imenu. Awareness of this bug resulted from the thread Subject: Error in C++ Mode with Emacs 27.0.90, Date: Tue 24 Mar 2020, From: Angelo Graziosi. This thread reported a bug in imenu, which never made it to debbugs, but which was partially fixed. Thanks to Dmitry Gutov, who made me aware of the bit that didn't get fixed then. To reproduce the error in the master branch: (i) emacs -Q in a GUI environment. (ii) Evaluate the following: ;; C/C++ modes (defun my-c-mode () "My customization for `c-mode' and `c++-mode'." ;; Add index of func. to menu bar (imenu-add-to-menubar "Functions")) ;; c++-mode (add-hook 'c-mode-common-hook 'my-c-mode) (setq imenu-auto-rescan t) (setq imenu-use-popup-menu t) (iii) Type the following into an empty C++ buffer called graziosi.cc: int main () { return 0; } (iv) M-x imenu. This throws the error "Wrong type argument: seqencep, #". This is a bug. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 19 11:17:13 2023 Received: (at 61629-done) by debbugs.gnu.org; 19 Feb 2023 16:17:13 +0000 Received: from localhost ([127.0.0.1]:49552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTmNE-00043X-Tu for submit@debbugs.gnu.org; Sun, 19 Feb 2023 11:17:13 -0500 Received: from mx3.muc.de ([193.149.48.5]:17080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTmND-00043J-B5 for 61629-done@debbugs.gnu.org; Sun, 19 Feb 2023 11:17:11 -0500 Received: (qmail 96963 invoked by uid 3782); 19 Feb 2023 17:17:04 +0100 Received: from acm.muc.de (pd953a64b.dip0.t-ipconnect.de [217.83.166.75]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 19 Feb 2023 17:17:04 +0100 Received: (qmail 9577 invoked by uid 1000); 19 Feb 2023 16:17:03 -0000 Date: Sun, 19 Feb 2023 16:17:03 +0000 To: 61629-done@debbugs.gnu.org Subject: Re: bug#61629: master: Sometimes M-x imenu throws an error when there's a single function in the buffer. Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61629-done 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 (-) Bug fixed in master. On Sun, Feb 19, 2023 at 15:39:13 +0000, Alan Mackenzie wrote: > On the master branch, the recipe below leads to an error being thrown > from imenu. > Awareness of this bug resulted from the thread Subject: Error in C++ > Mode with Emacs 27.0.90, Date: Tue 24 Mar 2020, From: Angelo Graziosi. > This thread reported a bug in imenu, which never made it to debbugs, but > which was partially fixed. > Thanks to Dmitry Gutov, who made me aware of the bit that didn't get > fixed then. > To reproduce the error in the master branch: > (i) emacs -Q in a GUI environment. > (ii) Evaluate the following: > ;; C/C++ modes > (defun my-c-mode () > "My customization for `c-mode' and `c++-mode'." > ;; Add index of func. to menu bar > (imenu-add-to-menubar "Functions")) > ;; c++-mode > (add-hook 'c-mode-common-hook 'my-c-mode) > (setq imenu-auto-rescan t) > (setq imenu-use-popup-menu t) > (iii) Type the following into an empty C++ buffer called graziosi.cc: > int main () > { > return 0; > } > (iv) M-x imenu. > This throws the error "Wrong type argument: seqencep, # graziosi.cc>". This is a bug. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 19 12:50:19 2023 Received: (at 61629) by debbugs.gnu.org; 19 Feb 2023 17:50:19 +0000 Received: from localhost ([127.0.0.1]:49618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTnpL-0006ki-0H for submit@debbugs.gnu.org; Sun, 19 Feb 2023 12:50:19 -0500 Received: from mail-wm1-f54.google.com ([209.85.128.54]:44612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTnpJ-0006kL-0F for 61629@debbugs.gnu.org; Sun, 19 Feb 2023 12:50:17 -0500 Received: by mail-wm1-f54.google.com with SMTP id o9-20020a05600c510900b003ddca7a2bcbso711819wms.3 for <61629@debbugs.gnu.org>; Sun, 19 Feb 2023 09:50:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=IEB0aTx+0SQBRXw+vJTK+7i2cE85z+ElwPqcjDXwkvU=; b=S7bd/OnjHpKCkbWbP0jI0i1qojpGtsOiewor8nFD4dcuWCjKH2pUlipCQOBp3ngWSQ zY28k6iQuHRJAgFn7t+qIkdbvI/ctuoTGm9PVEG/3f8Xd9swH+i6hC/0yWx1+xtdZUw5 2bF7QS/seHKcazl84EduWDdHrJCfQgUIKSebpdGO03H/s36u8LC4ycp68L5lxEk1Qd/s 1+CgKue5n84RgJ9ReZkiFmBiVl3WCajYHunWn/q62oRx3w4nypSrpsr7i2CwtXJI9cju 5uqIxJuzA76jZpRph8MXk2i1AXhf+/2eXN9RraZ7Qyt3uRFGIbrmCAWOZk2DUBjLfn17 35Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IEB0aTx+0SQBRXw+vJTK+7i2cE85z+ElwPqcjDXwkvU=; b=c2a9N3fn2Ww2YOh6BMjHdLZ8ZFtcF+k4ntX23onbAlGjEy6CYtrUDYSWf8uTTqbV/5 GuJH5whSN+8WrQVZ8OGC9MJc83BNXwIfcxhH/sLENxT+eztlgFtLGXMA7wXKcAtJ8rt5 zi3odc7VCST2G4R8O49pyfu4IPJ8HZUfENEndzVgaznm7esTyiqiskmWY1hSTZJl0S0k OIhoZwWMnDBOfMY59EpZAsN0X5YRWYIzM5bLB8b4liGu+66vmng9a2yIjFL5TnuLQQu+ HZSNrU79b29kwvUvgsQV5NfqDht6jCMMyPUDXfAlxM1PzYa1bfoBKdmtLTeRKlHYwLnh ljiA== X-Gm-Message-State: AO0yUKUkignxfZ4bnLaAnrKLMQU1eRfeGanKot0QwbXJyVjwh+Sb2qd/ qkDqYCQvaz8BcuI6aPuh2dOzMYQNisQ= X-Google-Smtp-Source: AK7set84ymdv3fUri14ZScoaDrcHc+JjK6SwFwNUHXphMJVduFUKEOOjVe9cNjUY/1eIQbQaum4FpQ== X-Received: by 2002:a05:600c:21d6:b0:3d0:6a57:66a5 with SMTP id x22-20020a05600c21d600b003d06a5766a5mr5593646wmj.0.1676829010933; Sun, 19 Feb 2023 09:50:10 -0800 (PST) Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q12-20020a7bce8c000000b003db0ee277b2sm8059120wmj.5.2023.02.19.09.50.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Feb 2023 09:50:10 -0800 (PST) Message-ID: <7f184419-0053-2f80-f413-8a2bf17e656e@yandex.ru> Date: Sun, 19 Feb 2023 19:50:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: bug#61629: master: Sometimes M-x imenu throws an error when there's a single function in the buffer. Content-Language: en-US To: 61629@debbugs.gnu.org, acm@muc.de References: From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 61629 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.9 (-) On 19/02/2023 18:17, Alan Mackenzie wrote: > Bug fixed in master. Thanks, Alan! From unknown Tue Jun 17 20:15:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 20 Mar 2023 11: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