From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: My usage of imenu is broken. Date: Tue, 28 May 2024 14:34:21 +0300 Message-ID: <86r0dmtbk2.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21869"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 28 13:35:33 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sBv76-0005Os-2X for ged-emacs-devel@m.gmane-mx.org; Tue, 28 May 2024 13:35:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBv67-0004MS-5R; Tue, 28 May 2024 07:34:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBv65-0004L0-3o for emacs-devel@gnu.org; Tue, 28 May 2024 07:34:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBv64-0006DC-JB; Tue, 28 May 2024 07:34:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=G0L+TZuvJ9ZjsE0QfZKSkIjeiS/6Da9U8DJmc71F1kk=; b=jLpTCqAiGejL 1UdyWFSheVFWVL/4D9e8e/OBorvHEwbASv1a1S7bB2g7aj1JR2kMe+TDYTinFt6gXex2dg0pNlw6M dtXEnpPVcaRo1GEGUx1pG/oIhladSRlluZ/jz4YAM1l50JHanYFrGVO1X7Ix6xgfbijVepchEWz4V EBBytWooVU/dvtULamNUbsve5skUkbySQDtEeGMVyFYTty876Rl2T/glzT/xh7IDE1EH6n32Gx1q4 1NzGIRVpoBGO/DC/ItayJgToDGxxL5D+x+naF4GjAwyWI87ahOdjkiTEYy7MZdE41nyYmMgMh3m8h H0MkNOdFm1XgApIctjpaHA==; In-Reply-To: (message from Alan Mackenzie on Tue, 28 May 2024 10:53:18 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319647 Archived-At: > Date: Tue, 28 May 2024 10:53:18 +0000 > From: Alan Mackenzie > > 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. > 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! My advice is to invest the time, study the code (which will most probably allow you to find ways of getting the behavior you want or find and fix the bugs which prevent that), and fix the documentation as required. This way, everyone wins, starting from you! And I did just that in this case: loaded 'imenu' and tried your recipes. Lo and behold, it does work for me, at least when I visit src/dispnew.c from our tree (the first file I thought about, nothing special about it). > On typing C-c i, I used to be able to type the first characters of a > function name and complete it with TAB in the minibuffer. This no > longer works. It does for me. > It doesn't work even if I set imenu-flatten to t. Instead I've got > to type boilerplate first. This is unacceptable to me. > > 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.) > What happened to Emacs's convention that new facilities are disabled by > default to begin with, and only made the default after positive > experience with their use? Nothing happened (except bugs, here and there).