From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#74617: 30.0.92; ffap-menu always displays the *Completions* buffer Date: Sat, 30 Nov 2024 20:58:04 +0200 Organization: LINKOV.NET Message-ID: <878qt08s77.fsf@mail.linkov.net> References: <87r06turur.fsf@daniel-mendler.de> <86ser99lrd.fsf@gnu.org> <875xo5unlo.fsf@daniel-mendler.de> <86frn99iky.fsf@gnu.org> <8734j9ukju.fsf@daniel-mendler.de> <87h67obon5.fsf@mail.linkov.net> <87r06sin20.fsf@daniel-mendler.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30850"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , 74617@debbugs.gnu.org, monnier@iro.umontreal.ca To: Daniel Mendler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 30 20:00:32 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 1tHShi-0007se-OU for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Nov 2024 20:00:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHShK-0000k4-GH; Sat, 30 Nov 2024 14:00:06 -0500 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 1tHShI-0000iM-Ax for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 14:00:04 -0500 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 1tHShG-0001Ki-Rb for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 14:00:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=kQ5MdE148kHtJtiR2nrijQnCs4ieavvACRkbVTiuQ6s=; b=P4cbjljubVU7vKoxWOCI/TfZINfHVVaykCrjkFPB3RjmosnyWxE9TX8+UfzmfBkRbrVL9AGcnex3d2MdLVOkj9fYtTJWzfNh+Wnk2wj0+SQWgfujYxppR45Qmua1GNQCPvOxYF8+YXLNJGhI26R5SIS2kGZebVUDbrZ7dZuNzMH/qGBAg9eOwG2K4jnkkZe7fN/X5C+p0LXUG9N+0idR7t58wCI1TIJFv3zW10oMsDEPubzyr9ZQzamfYKBPledMyYJTPpSFtJtmgopsRN7B16XvFZb4Qhp7LBs3eRHJThhyjdsv3HgWI1rdSGB2sfRLCY94x4E6K1ffr3nOyGC9IQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHShG-0002gH-2h for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 14:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Nov 2024 19:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74617 X-GNU-PR-Package: emacs Original-Received: via spool by 74617-submit@debbugs.gnu.org id=B74617.173299317410220 (code B ref 74617); Sat, 30 Nov 2024 19:00:02 +0000 Original-Received: (at 74617) by debbugs.gnu.org; 30 Nov 2024 18:59:34 +0000 Original-Received: from localhost ([127.0.0.1]:49066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHSgo-0002em-C9 for submit@debbugs.gnu.org; Sat, 30 Nov 2024 13:59:34 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:55527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHSgn-0002eM-48 for 74617@debbugs.gnu.org; Sat, 30 Nov 2024 13:59:33 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id A79B2240003; Sat, 30 Nov 2024 18:59:05 +0000 (UTC) In-Reply-To: <87r06sin20.fsf@daniel-mendler.de> (Daniel Mendler's message of "Sat, 30 Nov 2024 19:39:03 +0100") X-GND-Sasl: juri@linkov.net 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:296198 Archived-At: >> And imenu.el calls minibuffer-completion-help conditionally >> unless imenu-eager-completion-buffer is not nil. > > Thanks, I wasn't aware of this option. It seems the behavior is > inverted? The completion buffer pops up if imenu-eager-completion-buffer > is nil. Unfortunately, it is inverted indeed. And there is even bug#52389 about this, but it can't be changed for backward-compatibility reasons. > It is likely that there are more such uses in the Emacs code and other > packages. One possible solution would be a display-eager metadata: > > (completing-read "Test: " > (lambda (string pred action) > (if (eq action 'metadata) > '(metadata (display-eager . t)) > (complete-with-action action #'read-file-name-internal string pred)))) > > This pushes the responsibility of displaying the candidates to > `completing-read'. In `completing-read-default' the following code > would have to be added to the `minibuffer-with-setup-hook': > > (when (completion-metadata-get > (completion-metadata "" minibuffer-completion-table nil) > 'display-eager) > (minibuffer-completion-help)) Adding a new metadata item looks like the right thing to do. Then it will be possible to configure it via completion-category-overrides.