unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#72080: imenu returns different lists in emacs-news-mode and emacs-news-view-mode
@ 2024-07-12 17:52 Siyuan Chen
  2024-07-13  8:17 ` Eli Zaretskii
  2024-07-13  9:08 ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Siyuan Chen @ 2024-07-12 17:52 UTC (permalink / raw)
  To: 72080

[-- Attachment #1: Type: text/plain, Size: 1382 bytes --]

Reproduce steps:

1 Clone Emacs source code from https://github.com/emacs-mirror/emacs

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

[-- Attachment #2: Type: text/html, Size: 2336 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-07-20  9:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 17:52 bug#72080: imenu returns different lists in emacs-news-mode and emacs-news-view-mode Siyuan Chen
2024-07-13  8:17 ` Eli Zaretskii
2024-07-13  9:08 ` Eli Zaretskii
2024-07-13 13:33   ` Siyuan Chen
2024-07-14 12:57   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-14 13:16     ` Eli Zaretskii
2024-07-20  9:34     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).