unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Siyuan Chen <chansey97@gmail.com>
To: 72080@debbugs.gnu.org
Subject: bug#72080: imenu returns different lists in emacs-news-mode and emacs-news-view-mode
Date: Sat, 13 Jul 2024 01:52:11 +0800	[thread overview]
Message-ID: <CAHWTsY=y_VbMn12-RV8AYqcdv4UdR+kRXmGDzN36gBkV7GcvXg@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2024-07-12 17:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 17:52 Siyuan Chen [this message]
2024-07-13  8:17 ` bug#72080: imenu returns different lists in emacs-news-mode and emacs-news-view-mode 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHWTsY=y_VbMn12-RV8AYqcdv4UdR+kRXmGDzN36gBkV7GcvXg@mail.gmail.com' \
    --to=chansey97@gmail.com \
    --cc=72080@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).