From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id +G+KMIxHdGUcIAEA9RJhRA:P1 (envelope-from ) for ; Sat, 09 Dec 2023 11:55:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +G+KMIxHdGUcIAEA9RJhRA (envelope-from ) for ; Sat, 09 Dec 2023 11:55:08 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9E9E514537 for ; Sat, 9 Dec 2023 11:55:08 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=lBD5BFNA; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702119308; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=WY0Jc2HmCuW3YkjHOg5p/hM9nEVO76aGvVDkicNgrEg=; b=J8DWG38LiHiDegh0CUqqTrHTzcCI7FZPPsaxcsB97mcsvQ+do4Xmhdf7luy4XcezZM2cZ7 OttAA4VJ8uQYkFQAaXbfErSbxHeBz8VeQB+8XgN8f3cOPCl+ZK5kbETftKnMbPyT0AC8lG tX0hzJB4jmWs2VXZhJLwBmSjX8+55kbZWrUXCg/1oXbSFufn1YyaPcnZgPz25xFuVhOK2D 766ZEnHssXB3+heDDvUhW1hlOR2wnHcEb4FbFNjMhpe3cHjkYMANoOXOFva/3A3CTjBh+L +Z3iS6eI/htTKhYXoxfkW5eaJIFhWMX4h2lDs+TwB3fiPvQxDPT6O2s7wbOBrg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702119308; a=rsa-sha256; cv=none; b=jZRjeB/SAKWy9O6zAoVwCIBeRM1DzB3+HucuL+i1SPj8BSc3q9WWcGv9JxwVb5inqT+bIF GlhwcBzVkNqA+rGGfzE3CzlBceYscOtew0LD5Zla4eHvMJBqJXD6DsYrroFDkG7h5PvzJ+ V/EYNxibwUInyyOyN1ykVp8CPJUxP5VRvaEzMFVZOOybBv1rsBK481seQBLa0Ai3N4Jomj ifA1zzXTmSAl348kYM8MBzM1cN3pMppZDepmrVWF/qfHMs7zcedZfKa0p6FzZbJJnUmDUt qvs+uMBc5pCdbs6iJjCsGay8wKvORwsZwcCUAhUFWgz5j1Vn5IsbmkdxuXicuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=lBD5BFNA; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBuyL-00011E-EI; Sat, 09 Dec 2023 05:54:13 -0500 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 1rBuyK-00010u-1x for emacs-orgmode@gnu.org; Sat, 09 Dec 2023 05:54:12 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBuyH-0001zp-Tn for emacs-orgmode@gnu.org; Sat, 09 Dec 2023 05:54:11 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CE081240103 for ; Sat, 9 Dec 2023 11:54:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1702119247; bh=ZuNpkRjYhPUJpaMYPXINlGjvsjX80FyJwhMeES43vFI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=lBD5BFNALB6Wf9Wfg7O2oreRZ6fLYUkVjVECIsrEGCWaJADC8hZAvhsRnUp40BxQr sEKrvCzjSG1Ij4/t8rEekRPih58Rhe6FIu/oSojTeqIswt2fUUCUs/6L7sf1mCxZV3 VQ5hGs9eKDxPsg/LgdxM95hl7DIJXK4HDeSZnqn/XRMVs4YxazF70Z0yqT6p21zvTk IBekrGK4nWJmWu481oF7GprFUyL08rjYfy0oxSj7qs7WJGK1GOEs4duCBgGGOhuMYP sfKGo5QEaHoHMchCFnaHUdzmIeaw1yfuND8RuzVNu0YeUW0uiopNigGAUuVMB2exPZ yWOx+wBzv/9xg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SnPyR1TmFz9rxL; Sat, 9 Dec 2023 11:54:07 +0100 (CET) From: Ihor Radchenko To: Morgan Smith , Eli Zaretskii Cc: emacs-orgmode@gnu.org, 58131@debbugs.gnu.org, emacs-devel@gnu.org Subject: [FR] Allow flattened imenu index (was: [PATCH] Add new option 'org-imenu-flatten') In-Reply-To: References: <87plzgbalt.fsf@localhost> Date: Sat, 09 Dec 2023 10:57:15 +0000 Message-ID: <87msujskxg.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.28 X-Spam-Score: -8.28 X-Migadu-Queue-Id: 9E9E514537 X-Migadu-Scanner: mx12.migadu.com X-TUID: Gi+k0bO+kQpo 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. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at