From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.orgmode,gmane.emacs.devel Subject: Re: [FR] Allow flattened imenu index Date: Mon, 11 Dec 2023 11:51:03 +0000 Message-ID: References: <87plzgbalt.fsf@localhost> <87msujskxg.fsf@localhost> <835y17y5qu.fsf@gnu.org> <874jgrsiyy.fsf@localhost> <86r0jv8efr.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26685"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Ihor Radchenko , Eli Zaretskii , Morgan.J.Smith@outlook.com, emacs-orgmode@gnu.org, 58131@debbugs.gnu.org, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Mon Dec 11 12:52:16 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 1rCepc-0006kf-0p for geo-emacs-orgmode@m.gmane-mx.org; Mon, 11 Dec 2023 12:52:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCeoq-0004e2-NQ; Mon, 11 Dec 2023 06:51:28 -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 1rCeok-0004W3-8T; Mon, 11 Dec 2023 06:51:23 -0500 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCeog-0007X1-ND; Mon, 11 Dec 2023 06:51:21 -0500 Original-Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50bee606265so4479583e87.2; Mon, 11 Dec 2023 03:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702295475; x=1702900275; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7ZzDfsr8ipfWNTLeCSaJMmY+qqmpnxognRf3jIAYyTo=; b=k1uJe7/liiuBA2g4P5w0rBVcqspM0We/6XD9LOv9+fQWpKykyXuSJPqGbxfdKLX8jr 0aP+WNX6lFN5yu29nF1X9rkXH3+qSh2pJ15FOe/T6CzQuQxhz0grOKurrUJ6adCg5S06 rskJFpudD8DYPkQ2SoFPnNGKphS3UyKqe2AVyRI4xEoWdoGJMojR+yH7FhW0lhjmlc49 oxTguI5354OcdHfhek96YAKLnm+llCcqXxjl9x+qr1m0Q+39/078sgFn3Qs9HPPYz7MV eL4qLolNEJjdWU2QBb1g9MaSASISN1DrcmoVhiXwIba1oq1m1sDjMIFAJ+oy1h72VbHU Le8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702295475; x=1702900275; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7ZzDfsr8ipfWNTLeCSaJMmY+qqmpnxognRf3jIAYyTo=; b=YsWOsXooeKmqPJuKU19waoHAmOdhSkn4gC+jRCB8qOgFyiewBJl9SIBlwQQnqlz/LV iT7rzkQJ3wgwYjgsuMLEKS1iBTlnSEoxfc4iY4OLDiUrQmugwFgYwL2BI8zhJIIXNNM9 vj30nbI2/SXsX6y/5+XDt85fNqwNK6mQskkM8Bx8wXbtQzrg+uJ1lafyxay+wZVTJO8W OYkVO8EJg7BaBy8a3kNgTh4rx94oqWer8pDgTb2/xckDpoG8OH5Vb4XdyBFSzqLX6YuQ 5JGmkidaZnL5bqdHXIyTCCzkxl6Vzu9uqaouJIv8rZGErDlmBKj40ms8OzLDPb7mygDP WNLA== X-Gm-Message-State: AOJu0YxceE6CXMrQ+is60U1RWC7IuKjNeYbxSlUS0g0rsvwwu1Raw818 Y8KIRc1N9RuLNp7V1duPylfROFuvCrHACD/6mMtVbnPHTpk= X-Google-Smtp-Source: AGHT+IHMDVGeDgxFyRoNE8DEc3nxQgqbUpipXJcuUl+QNCgYJi1x0EMilC05vLgDSv7Gc+aCf+PLyD0s2CiWKlXwv7E= X-Received: by 2002:ac2:5294:0:b0:50b:f7b5:5ce5 with SMTP id q20-20020ac25294000000b0050bf7b55ce5mr1685977lfm.68.1702295475015; Mon, 11 Dec 2023 03:51:15 -0800 (PST) In-Reply-To: <86r0jv8efr.fsf@mail.linkov.net> Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x132.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+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:158536 gmane.emacs.devel:313702 Archived-At: On Sat, Dec 9, 2023 at 5:39=E2=80=AFPM Juri Linkov wrote: > menu1 > sub-item1 > sub-item2 > > could be flattened to > > menu1 -> sub-item1 > menu1 -> sub-item2 By the way, this seems to be exactly what the breadcrumb-jump command in my breadcrumb.el package does. Goes reasonably well with a flex/fuzzy completion style. You can look at it for an implementation idea. Just be sure to do this flattening at the presentation level (i.e. M-x imenu), not at the internal representation level. It shouldn't be needed here at all, but in case anyone's thinking about it, please avoid messing with imenu's internal representation of hierarchies as that structure is relied upon by many extensions (not just mine, but several others). Even certain things supported by certain imenu-presenting frontends (like "special elements") are not supported by other frontends. It's a bit of a mess. The symbols holding/describing this representation (imenu--index-alist, maybe others) are incorrectly named '--' but they are most definitely externally visible and used customization points. Jo=C3=A3o