GNU bug report logs - #73117
30.0.90; Imenu missing entries when flattening by group

Previous Next

Package: emacs;

Reported by: Troy Brown <brownts <at> troybrown.dev>

Date: Sun, 8 Sep 2024 01:43:01 UTC

Severity: normal

Found in version 30.0.90

Full log


Message #35 received at 73117 <at> debbugs.gnu.org (full text, mbox):

From: Troy Brown <brownts <at> troybrown.dev>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73117 <at> debbugs.gnu.org, mail <at> daniel-mendler.de,
 Juri Linkov <juri <at> linkov.net>
Subject: Re: bug#73117: 30.0.90; Imenu missing entries when flattening by group
Date: Sun, 5 Jan 2025 19:15:47 -0500
On Sat, Sep 28, 2024 at 5:20 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > Cc: 73117 <at> debbugs.gnu.org, Daniel Mendler <mail <at> daniel-mendler.de>
> > From: Juri Linkov <juri <at> linkov.net>
> > Date: Fri, 20 Sep 2024 09:58:24 +0300
> >
> > > 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:
>
> Feel free to install on the release branch, and thanks.

While discussing a similar issue for Vertico here
(https://github.com/minad/vertico/discussions/553), Daniel discovered
that icomplete-mode also won't display all of the grouped candidates.
The following is a reproducer which can be used to demonstrate this
issue.  In the reproducer, the first time through the loop,
icomplete-mode is not enabled and the completion buffer shows all four
possible candidates along with their corresponding groups, however the
next time through the loop, icomplete-vertical-mode is enabled and
only 3 of the 4 candidates are displayed.  See his comments in the
provided link for his take on the issue as well as his discovery of
yet more places that groups don't seem to work correctly (e.g.,
completion--insert-column).

```elisp
(progn
  (setopt completions-group t)
  (setopt completions-format 'vertical)
  (setopt imenu-flatten 'group)
  (setopt icomplete-show-matches-on-no-input t)

  (require 'imenu)

  (dolist (arg '(-1 +1))
    (icomplete-mode arg)
    (icomplete-vertical-mode arg)
    (setopt imenu-eager-completion-buffer icomplete-vertical-mode)
    (imenu-choose-buffer-index (format "(icomplete-vertical-mode = %s)
Index item: " icomplete-vertical-mode)
                               `(("XYZ" . (("123" . ,(point-min-marker))))
                                 ("ABC" . (("124" . ,(point-min-marker))))
                                 ("Bar" . (("Foo" . ,(point-min-marker))))
                                 ("Baz" . (("Foo" . ,(point-max-marker))))))))
```




This bug report was last modified 256 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.