[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#73117: 30.0.90; Imenu missing entries when flattening by group
From: |
Juri Linkov |
Subject: |
bug#73117: 30.0.90; Imenu missing entries when flattening by group |
Date: |
Fri, 20 Sep 2024 09:58:24 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) |
> The following example configures `imenu-flatten" to "group" and then
> shows the menu, first with `completions-format` set to "horizontal"
> and then "vertical".
>
> ```elisp
> (progn
> (setopt completions-group t)
> (setopt imenu-eager-completion-buffer nil)
> (setopt minibuffer-visible-completions t)
> (setopt imenu-flatten 'group)
>
> (require 'imenu)
>
> (dolist (format '(horizontal vertical))
> (setopt completions-format format)
Any fixes for completion--insert-horizontal should be pushed
only to master, not to the release branch.
But for the release branch we should push the documentation fixes
that will mention all prerequisites for this feature to work
correctly:
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 8f1b1f22a67..13440cfb626 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -158,9 +158,18 @@ imenu-flatten
with a suffix that is the section name to which it belongs.
If the value is `group', split completion candidates into groups
according to the sections.
+
Since the values `annotation' and `group' rely on text properties,
you can use them only by selecting candidates from the completions
-buffer, not by typing in the minibuffer.
+buffer, not by typing in the minibuffer. This also means that
+if you use `minibuffer-next-completion' (`M-<down>') to select
+a completion while point stays in the minibuffer, you need
+to customize `minibuffer-completion-auto-choose' to nil that
+doesn't insert completion candidates to the minibuffer.
+Also note that for using the value `group' you need to customize
+`completions-group' to the value t, and `completions-format'
+to the value `vertical'.
+
Any other value is treated as `prefix'.
The value of `imenu-level-separator', a string, is used to separate