emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61629: closed (master: Sometimes M-x imenu throws an error when ther


From: GNU bug Tracking System
Subject: bug#61629: closed (master: Sometimes M-x imenu throws an error when there's a single function in the buffer.)
Date: Sun, 19 Feb 2023 16:18:02 +0000

Your message dated Sun, 19 Feb 2023 16:17:03 +0000
with message-id <Y/JLfztLjHIZd//0@ACM>
and subject line Re: bug#61629: master: Sometimes M-x imenu throws an error 
when there's a single function in the buffer.
has caused the debbugs.gnu.org bug report #61629,
regarding master: Sometimes M-x imenu throws an error when there's a single 
function in the buffer.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
61629: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61629
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: master: Sometimes M-x imenu throws an error when there's a single function in the buffer. Date: Sun, 19 Feb 2023 15:39:13 +0000
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<RET>.

This throws the error "Wrong type argument: seqencep, #<marker at 1 in
graziosi.cc>".  This is a bug.

-- 
Alan Mackenzie (Nuremberg, Germany).



--- End Message ---
--- Begin Message --- Subject: Re: bug#61629: master: Sometimes M-x imenu throws an error when there's a single function in the buffer. Date: Sun, 19 Feb 2023 16:17:03 +0000
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<RET>.

> This throws the error "Wrong type argument: seqencep, #<marker at 1 in
> graziosi.cc>".  This is a bug.

-- 
Alan Mackenzie (Nuremberg, Germany).




--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]