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.orgmode,gmane.emacs.devel Subject: Re: [FR] Allow flattened imenu index (was: [PATCH] Add new option 'org-imenu-flatten') Date: Sat, 09 Dec 2023 13:28:41 +0200 Message-ID: <835y17y5qu.fsf@gnu.org> References: <87plzgbalt.fsf@localhost> <87msujskxg.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7477"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Morgan.J.Smith@outlook.com, emacs-orgmode@gnu.org, 58131@debbugs.gnu.org, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sat Dec 09 12:29:56 2023 Return-path: Envelope-to: geo-emacs-orgmode@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 1rBvWs-0001kk-Sd for geo-emacs-orgmode@m.gmane-mx.org; Sat, 09 Dec 2023 12:29:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBvW3-0000ve-AZ; Sat, 09 Dec 2023 06:29:03 -0500 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 1rBvVz-0000v2-TQ; Sat, 09 Dec 2023 06:29:00 -0500 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 1rBvVz-0001Lh-9i; Sat, 09 Dec 2023 06:28:59 -0500 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=mJfhBHdBwcQx7/mGg0fvLnra7rtIFWHasUVCVjfHiZI=; b=G/KsRGl55dcw KmKcNB7pqeS/EvT5DqlFcX0AREk9tgJxJoU2h3PNpQax2zsTBa227+6utuuQ+A5kh2FWG/vigpV99 hvsz1cBiFG4KjoiRDTAlFEHmv3eTsrs7L3Wejmq8ECW2lz8gb16gtIwAN0Sdg611EG1jZdnvVvMEm ROlcCoVoLb5lpoE+8c84rppuJMRRgjiPYgw5S3sM9AMIMtduU6a6RBJZEppXtI3KzVd5XbBR4yekn G/UIWVAlPJP8uESF/yx/or99EZKk74iiyiN5pnSqIviIJZZaeUkfhijSM/ai+JhwKG2cUIC1DMBkb K6XgU3WYdXdkXf8UMxRsZg==; In-Reply-To: <87msujskxg.fsf@localhost> (message from Ihor Radchenko on Sat, 09 Dec 2023 10:57:15 +0000) X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Original-Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.orgmode:158504 gmane.emacs.devel:313632 Archived-At: > From: Ihor Radchenko > Cc: emacs-orgmode@gnu.org, 58131@debbugs.gnu.org, emacs-devel@gnu.org > Date: Sat, 09 Dec 2023 10:57:15 +0000 > > Morgan Smith writes: > > > Ihor Radchenko writes: > > > >> Have you considered adding a "flatten" option to imenu itself? > >> That way, you could automatically get the functionality for free > >> everywhere, not just in Org mode. > > > > I have considered that but gave up with minimal investigation because it > > seemed harder then this solution. It's possible imenu did actually have > > this functionality sometime before 1998 (see commit > > fe2908be7b09f4c765ebdaf16fe07b0a77f78ba8). > > > > The doc-view imenu-flatten stuff was added 2022-09-28 (see commit > > fe002cc8ce38efb256a2a60660ee626c2b2cdf81). This makes me feel like > > maybe that person thought adding it to imenu directly would be hard. > > > > I might at some point investigate doing that but likely not soon. Also > > if that feature was ever added, it would still be compatible with the > > patch I sent. For those reasons, I advocate my patch should still be > > applied even though it is clear that it is a sub-optimal solution. > > I'd prefer to ask Emacs upstream first. > > We are discussing adding a new feature to Org imenu - an option to > flatten the menu, so that all the nested index entries are displayed at > top level. > > This feature is also present in doc-view via `doc-view-imenu-flatten', > and in python.el via `python-imenu-create-flat-index' > > I am wondering if it makes more sense to add this "flatten" option > globally into imenu instead. I'm not sure I understand what you are asking. As we don't seem to have an active maintainer of imenu on board, more details are needed to understand the request. Of course, patches are even more welcome. Also, should this be a new bug report? the one mentioned in the CC is already closed and archived. Thanks.