emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Morgan Smith <morgan.j.smith@outlook.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] lisp/org-compat.el: Allow using imenu to visit non-leaf headlines
Date: Fri, 14 Jun 2024 14:38:33 -0400	[thread overview]
Message-ID: <CH3PR84MB34241FF78D2A1D8653FE6056C5C22@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <87y177ikw2.fsf@localhost> (Ihor Radchenko's message of "Fri, 14 Jun 2024 15:50:21 +0000")

Ihor Radchenko <yantar92@posteo.net> writes:

> Morgan Smith <Morgan.J.Smith@outlook.com> writes:
>
>> Quirks:
>>
>> With the default `imenu-flatten' value of nil, it is still impossible
>> to visit non-leaf headlines and no change is perceived.
>
> But no regressions, right? Especially in older Emacs versions with
> `imenu-flatten' not yet available.
>

No regressions that I can tell from my testing.  Both emacs 29.3 (before
imenu-flatten) and emacs-master show no change whatsoever (from what I
can tell) when imenu-flatten is nil.

>> Setting `imenu-flatten' to 'group works as expected with the quirk
>> that top level headlines don't end up in the group.
>
> We may add a top-level group, can't we?
>

This does not seem to be a feature.  You can confirm this yourself by
reading the comment in `imenu--flatten-index-alist' that says "PREFIX is
for internal use only".

> We may also consider changing the default value of `imenu-flatten' in
> Org buffers to non-nil.

In my opinion this is not a good idea.  While the UI of imenu is better
when `imenu-flatten' is set, that's not a decision we should make for
users.

The inability for imenu to visit non-leaf nodes with the default UI is
probably something that should be fixed in emacs core.

> But what would be the best default?

IMO that would be 'prefix.  Which is equivalent to setting it to `t'.


  reply	other threads:[~2024-06-14 18:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 14:14 [PATCH] lisp/org-compat.el: Allow using imenu to visit non-leaf headlines Morgan Smith
2024-06-14 15:50 ` Ihor Radchenko
2024-06-14 18:38   ` Morgan Smith [this message]
2024-06-17 13:24     ` Ihor Radchenko

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CH3PR84MB34241FF78D2A1D8653FE6056C5C22@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM \
    --to=morgan.j.smith@outlook.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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/org-mode.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).