From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Troy Brown Newsgroups: gmane.emacs.bugs Subject: bug#73117: 30.0.90; Imenu missing entries when flattening by group Date: Sun, 8 Sep 2024 13:31:36 -0400 Message-ID: References: <86v7z6skkj.fsf@mail.linkov.net> <86y142p0hu.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="12554"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73117@debbugs.gnu.org, Daniel Mendler To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 08 19:32:10 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1snLli-00036S-1H for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Sep 2024 19:32:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snLlZ-00038r-UR; Sun, 08 Sep 2024 13:32:02 -0400 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 1snLlY-00038e-FZ for bug-gnu-emacs@gnu.org; Sun, 08 Sep 2024 13:32:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snLlY-0005v2-6e for bug-gnu-emacs@gnu.org; Sun, 08 Sep 2024 13:32:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=bBKxQvgx+Aab1ecFibid8UQev6VGNy5ejcKSTmJlsPk=; b=Y56QOKUs21ip5myRXaOmWFzGs5bDgfXTHyWxHJ6X/eIEbiub5VhSGO6qg8hp3vz/7UC4M8ZQaZcH6Sz2T/SU0rjF8MkQ1Eew4LE/7RdNBFZ1vbPSYHabo2ETadpjE5Q8AE1BXpLuTmKQ6AtNzC3Eq43xPHA2k5F+9NWa1AnnvQ2O9jeg5jW/asRCgkyL3Qlerb9Avn7p7ysgmFKwTT8V9TfLBBdO1eqMRQDfTLnrb+BMuJl2w7eTdLyHUE7f0cWfDf8OCQbx1QbeK73ellnnjJzazKE06ZKodrw+Q3oFOjfk/+aw+3QXYmI80vwA7vGx3yYnQc9Hx5M6K8dgwrMgrw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1snLla-0000xy-I6 for bug-gnu-emacs@gnu.org; Sun, 08 Sep 2024 13:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Troy Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Sep 2024 17:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73117 X-GNU-PR-Package: emacs Original-Received: via spool by 73117-submit@debbugs.gnu.org id=B73117.17258167213707 (code B ref 73117); Sun, 08 Sep 2024 17:32:02 +0000 Original-Received: (at 73117) by debbugs.gnu.org; 8 Sep 2024 17:32:01 +0000 Original-Received: from localhost ([127.0.0.1]:59999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snLlY-0000xj-V8 for submit@debbugs.gnu.org; Sun, 08 Sep 2024 13:32:01 -0400 Original-Received: from mail-lj1-f175.google.com ([209.85.208.175]:55613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snLlW-0000xR-S1 for 73117@debbugs.gnu.org; Sun, 08 Sep 2024 13:31:59 -0400 Original-Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2f752d9ab62so28437091fa.3 for <73117@debbugs.gnu.org>; Sun, 08 Sep 2024 10:31:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725816710; x=1726421510; 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=bBKxQvgx+Aab1ecFibid8UQev6VGNy5ejcKSTmJlsPk=; b=CJC/e1QO0IRoQvBQi02TKsftYfN8eYvyJ0ZVmiN1Qc2e/rhRbKJCa2PXskzRrPRO6D vvjAKPpXFzLHZRNLKv+pqqfPJnSmPNT+Wu4OrJzmJddqSj9GSArN1BmYJZipTKoW7HOh vA3qSVnfd2VoVNy9TB2vm2SpUotsJDUoFla76bZ8VJdqu3XQNvlEEJuV3QijAENTou2B g+/8ngsJxwMMM5xOkDa6hqZlRbPQHumbjMh2nskUz29D02juOqB3BHsw4uQbkkfFmNCX ooPjHRt53VNGcTjgUsXX1q/JwGoekt/gTPer2RM6zMoImdLryVSslnBsjUwIMbR24QqY v91A== X-Forwarded-Encrypted: i=1; AJvYcCUBzjzi6Nzm5YEH9KtatGj2zPnSAxQgx+DJi8OzUxSceW0aiCTN9YzoqmimRPKHBM+ZevUZwg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyTpLR0Alhn4oWdf3rErVFzcUE4HaU5ACdhrZ6ZpnJlq7X83ytc pqjgOMOJMa7yvhSzNH8E7nBrT9BrjdL/0+OwkcLeCpMuxmHo+pfGomT+JfI6Y78= X-Google-Smtp-Source: AGHT+IFUrBYB6s2ifbUxFYztKxH241uP2Uk0N4/U3jJjyT+IG2nl9i+SqEOxV2bU0VkxJ8svmHtlcw== X-Received: by 2002:a2e:87d9:0:b0:2f6:5df8:bfcb with SMTP id 38308e7fff4ca-2f75b93077amr27707841fa.38.1725816708977; Sun, 08 Sep 2024 10:31:48 -0700 (PDT) Original-Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com. [209.85.208.47]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c3ebd46934sm2156143a12.35.2024.09.08.10.31.48 for <73117@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Sep 2024 10:31:48 -0700 (PDT) Original-Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5c27067b81aso3553309a12.0 for <73117@debbugs.gnu.org>; Sun, 08 Sep 2024 10:31:48 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWp2xZ7AwVLOe1n6L3mIeDTFLi/fun6Xfyj/ecnwJ2KdRxvrjVFWUZEhgxH7zdE9s85Db5VOg==@debbugs.gnu.org X-Received: by 2002:a05:6402:1d53:b0:5c2:5141:84b0 with SMTP id 4fb4d7f45d1cf-5c3eac27a4bmr2819664a12.35.1725816708528; Sun, 08 Sep 2024 10:31:48 -0700 (PDT) In-Reply-To: <86y142p0hu.fsf@mail.linkov.net> X-Gmail-Original-Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291473 Archived-At: On Sun, Sep 8, 2024 at 12:42=E2=80=AFPM Juri Linkov wrote= : > > > Maybe using `(setopt completion-auto-help t)` > > and hitting TAB is a better method. > > Or just using `(setopt imenu-eager-completion-buffer nil)` > because otherwise with its default value you need to hit > '?' (minibuffer-completion-help) instead of TAB > to show the completions buffer with two identical > completions in different groups. > Ah, thanks! Yes, I'm used to using Vertico so I'm not very familiar with the default settings/bindings. In fact that's how I first ran into this issue using Vertico and Imenu with `imenu-flatten` set to "group". > I'm so sorry, I forgot to check with `emacs -Q`, and there is > an additional important setting that affects the groups: > > ``` > (setopt completions-group t) > (setopt completions-format 'vertical) > ``` > > The default value of 'completions-format' is 'horizontal' > that doesn't support groups, and I don't know why. > > Maybe Daniel (Cc:ed) could help us understand > why 'completion--insert-horizontal' doesn't display groups. No worries, at least I know I'm not going crazy, lol. Indeed, when I set `completions-format` to "vertical" it does show all entries. I then expanded this example to see what happens with 3 entries with both "horizontal" and "vertical" values for `completions-format`. With a three section menu (see example below), and format set to "horizontal", it does show multiple groups vertically. However, even under this condition, the groups which had identical entries only show up once (which seems like a bug). 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) (imenu-choose-buffer-index (format "(%s) Index item: " format) `(("XYZ" . (("123" . ,(point-min-marker)))) ("Bar" . (("Foo" . ,(point-min-marker)))) ("Baz" . (("Foo" . ,(point-max-marker)))))= ))) ``` --8<---------------cut here---------------start------------->8--- Click or type RET on a completion to select it. Type , , , to move point between completions. 3 possible completions: XYZ 123 Bar Foo --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- Click or type RET on a completion to select it. Type , , , to move point between completions. 3 possible completions: XYZ 123 Bar Foo Baz Foo --8<---------------cut here---------------end--------------->8---