From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron Newsgroups: gmane.emacs.devel Subject: Re: master 431f8ff1e38: * lisp/imenu.el: Support more values for imenu-flatten (bug#70846) Date: Sun, 14 Jul 2024 08:28:36 +0200 Message-ID: References: <171558357066.26019.9766615061719600757@vcs2.savannah.gnu.org> <20240513065931.0D83AC12C31@vcs2.savannah.gnu.org> <86v83hwxjs.fsf@mail.linkov.net> <86ikzhq6ja.fsf@mail.linkov.net> <86o798x5hz.fsf@gnu.org> <86bk572e6a.fsf@mail.linkov.net> <861q62pb8y.fsf@mail.linkov.net> <864jayjd8u.fsf@gnu.org> <86le49ymsl.fsf@mail.linkov.net> <86msoo4cf3.fsf@mail.linkov.net> <865xv9ugjx.fsf@mail.linkov.net> <867cffdsp8.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20008"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Stefan Monnier , Eli Zaretskii , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 14 08:29:13 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sSsjR-0004ws-D3 for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Jul 2024 08:29:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSsiz-0003JZ-Em; Sun, 14 Jul 2024 02:28:45 -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 1sSsix-0003J4-LP for emacs-devel@gnu.org; Sun, 14 Jul 2024 02:28:43 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSsiu-0006Nm-7h; Sun, 14 Jul 2024 02:28:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1720938518; bh=2668lnU2YzmLFK1SVo4uTBGzJ933+5qSqEyyMy0jy7M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=tabatsIGLgdRm9j4ph8HaO9UZ5FK9OvnS/Gskrua88nvp0Epo6/yzUlZfAhq372R5 pixaySOh3U8fZAH5j0nbsa/2VRiEaQzoykXWMY9f0pBKjtkKZrMvX9hJgbfqxPdXPL KBf7IxmHDBWZP4il8KKpXo+K0sFHFwGUAjxK9is9EWi0LhWsf9Usxquv/CBrYSvhlX CMvWSKmP9oecLFJgwXPDK5rHXSXjtozwf9cUGd3Ybshblu0vCDWDw7chcGpShvkiqg 3W2emdQoamlF2N1NUbEVQ1jceYtLFOZldBEkMsdZuTNwNhsTJxhzSrrRQMtMvN/mqW mZAUK1SvEmgYg== In-Reply-To: <867cffdsp8.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 27 May 2024 21:18:27 +0300") Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321628 Archived-At: Hi Juri, Juri Linkov writes: >> Ok, then here is a complete patch with documentation updates >> where many documentation changes are fixing the documentation >> to describe the current behavior existed even before applying >> these code changes. > > So this patch is pushed now. I'm afraid imenu-flatten=annotation has one more hurdle to overcome. Consider: 1. emacs -Q 2. (setq imenu-flatten 'annotation) 2. C-x C-f .../lisp/imenu.el 3. M-g i 4. M- M- M- M- ... 5. Now the selected candidate in *Completions* is e.g. imenu--cleanup, this is also the minibuffer contents, so far so good. 6. Type M-RET to jump to this candidate. 7. Land on imenu instead of imenu--cleanup. No matter how far down you go with M-, if you go through the entry for imenu, that's where you'll land when you hit M-RET. This is because imenu-flatten=annotation tries to identify candidates by their text properties, but completion--replace retains common parts while replacing minibuffer text, along with the text properties of these common parts. This affects imenu-flatten=group too. It might be possible to resolve this by setting a different completion-list-insert-choice-function that circumvents replaces the whole minibuffer contents, unlike completion--replace, which tries hard to preserve markers etc. Best, Eshel