Reproduce steps:
2. Emacs -Q (Emacs 29.3 on Windows)
3. Open etc/NEWS.30 from the Emacs source code (by default Emacs will use emacs-news-mode)
4. M-x imenu and press TAB to complete
Emacs shows 515 possible completions.
6. M-x emacs-news-view-mode
7. M-x imenu and press TAB to complete
Emacs shows 202 possible completions.
This is the problem, i.e. emacs-news-mode and emacs-news-view-mode return different imenu lists.
The Background:
I am reading Emacs NEWS and using the "imenu-list" package to display the outline of the NEWS as a side window since NEWS are often very long. It works well in
emacs-news-mode, but
lacks many entries in emacs-news-view-mode. BTW the
emacs-news-view-mode is nice because it allows button click symbol references in the buffer..
In step 4 and step 7, you can do M-x eval-_expression_
```
(progn
(require 'imenu)
(setq message-log-max t)
(let ((inhibit-read-only t))
(with-current-buffer "*Messages*" (erase-buffer)))
(pp (imenu--make-index-alist)))
```
and save
the *Messages* buffer to two files
respectively, e.g.
news-mode.txt and news-view-mode.txt. You will find that these two files are different. The
news-view-mode.txt lacks many imenu entries.
P.s. This issue only occurs for NEWS.30. It is OK for NEWS.29.
Thanks.
Best regards,
Siyuan Chen