unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>, Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: My usage of imenu is broken.
Date: Tue, 28 May 2024 13:57:46 +0000	[thread overview]
Message-ID: <ZlXi2grOUfoyNQWX@ACM> (raw)
In-Reply-To: <86r0dmtbk2.fsf@gnu.org>

Hello, Eli.

On Tue, May 28, 2024 at 14:34:21 +0300, Eli Zaretskii wrote:
> > Date: Tue, 28 May 2024 10:53:18 +0000
> > From: Alan Mackenzie <acm@muc.de>

> > Hello, Emacs.

> > imenu no longer works for me.  The imenu page in the Emacs manual says

> >     the command [imenu] always displays the whole list of valid names.  

> > This is not true.  When I type C-c i (my binding for imenu) I see no
> > such list.

> AFAIK, this never worked literally as the manual says.  I went as far
> back as Emacs 23, and I don't see it.

> > When I additionally type TAB I still see no such list.

> I do see the list after TAB.  So I guess the devil is in the details
> (which file you were visiting, under what major mode, etc.) -- details
> you haven't provided...

> > All I see is *Rescan*, Function, and Variable.  I think the manual
> > should be fixed.

> Let's first understand why it doesn't work for you as it does for me.

I now understand what's happening.  Stefan M committed a patch some while
ago, the effect of which is to force users who've set up their
auto-mode-alist for CC Mode to use c-ts-mode, etc., instead.  It is in a
subroutine of normal-mode where this subterfuge occurs.

Yesterday, I'd reverted src/eval.c (which normally gets loaded via
desktop), and Stefan's patch converted it to c-ts-mode without me being
aware of this.

So my problem was being in c-ts-mode, for which all these things I don't
like about imenu are apparently normal.  It's one more reason for me to
carry on using CC Mode.

I'd wrongly jumped to the conclusion that what I was seeing was due to
recent changes in imenu.el, so apologies to yourself and those who
amended imenu.el.

> > The manual talks about "flatten"ing without explaining what this means.
> > The NEWS item doesn't explain it either.  I think this should be fixed.

> Sadly, it is quite pointless to complain about deficiencies of
> documentation in most cases, because no one which is in the position
> to fix that is listening or can be bothered!

:-(  Yes.  Maybe I should fix it myself.  Substandard documentation was
one of the things which led to the fall of XEmacs.

[ .... ]

> > How do I get the old behaviour back, please?  Why doesn't the NEWS item
> > say how to get back the old behaviour?

> Old behavior in what Emacs version, please?  (In fact, you don't even
> say in which version the above misbehavior happened to you, which I
> find unexpected from you.)

Sorry, I was in master, but not in emacs -Q.

[ .... ]

The bug "fix" and its patch which caused all this trouble were:

Bug#69191 New var `major-mode-remap-defaults`, for packages.

commit 2b5d43081a30f816dd38a16c7b5bfbad712a779b
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date:   Sun Mar 3 23:08:16 2024 -0500

    (major-mode-remap(-defaults)): New var and function (bug#69191)

I don't understand what major-mode-remap and major-mode-remap-defaults
are for.  They would appear to be duplicating and confusing the mechanism
of auto-mode-alist, and seem unnecessary.  It seems clear they are too
difficult to use.

I would favour reverting that patch, and thus restore the preference of
users for CC Mode.

Stefan, your comments, please.

-- 
Alan Mackenzie (Nuremberg, Germany).



  reply	other threads:[~2024-05-28 13:57 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28 10:53 My usage of imenu is broken Alan Mackenzie
2024-05-28 11:34 ` Eli Zaretskii
2024-05-28 13:57   ` Alan Mackenzie [this message]
2024-05-28 18:29     ` Eli Zaretskii
2024-05-28 20:46       ` Alan Mackenzie
2024-05-28 21:28         ` Stefan Monnier
2024-05-29  6:04           ` Juri Linkov
2024-05-29 11:31         ` Eli Zaretskii
2024-05-29  5:38       ` Yuan Fu
2024-05-28 21:55     ` Stefan Monnier
2024-05-29 11:16       ` Subversion of user chosen major mode by Emacs. [Was: My usage of imenu is broken.] Alan Mackenzie
2024-05-29 11:43         ` Dmitry Gutov
2024-05-29 12:51           ` Subversion of user chosen major mode by Emacs Alan Mackenzie
2024-05-29 16:08             ` Dmitry Gutov
2024-05-29 16:38               ` Eli Zaretskii
2024-05-29 17:56                 ` Dmitry Gutov
2024-05-29 19:22               ` Alan Mackenzie
2024-05-29 19:45                 ` Andrea Corallo
2024-05-29 19:59                   ` Alan Mackenzie
2024-05-30  5:01                     ` Eli Zaretskii
2024-05-30 11:02                       ` Alan Mackenzie
2024-05-29 22:10                 ` Dmitry Gutov
2024-05-30  5:51                   ` Eli Zaretskii
2024-05-30  5:44                 ` Eli Zaretskii
2024-05-29 12:41         ` Subversion of user chosen major mode by Emacs. [Was: My usage of imenu is broken.] Eli Zaretskii
2024-05-29 13:29           ` Subversion of user chosen major mode by Emacs Alan Mackenzie
2024-05-29 14:20             ` Eli Zaretskii
2024-05-29 15:04               ` Stefan Monnier
2024-05-29 19:17         ` Subversion of user chosen major mode by Emacs. [Was: My usage of imenu is broken.] Eli Zaretskii
2024-05-30  1:32         ` Stefan Monnier
2024-05-30  5:25           ` Eli Zaretskii
2024-05-30  7:39             ` Po Lu
2024-05-30  7:53               ` Eli Zaretskii
2024-05-30 14:18             ` Stefan Monnier
2024-05-30 14:33               ` Po Lu
2024-05-30 15:08                 ` Stefan Monnier
2024-05-30 14:56               ` Eli Zaretskii
2024-05-30 15:12                 ` Stefan Monnier
2024-05-30 15:29                   ` Alan Mackenzie
2024-05-30 18:30                     ` Stefan Monnier
2024-05-30 16:06                   ` 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=ZlXi2grOUfoyNQWX@ACM \
    --to=acm@muc.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).