From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74617: 30.0.92; ffap-menu always displays the *Completions* buffer Date: Sat, 30 Nov 2024 18:18:43 +0100 Message-ID: <87ttboiqrw.fsf@daniel-mendler.de> References: <87r06turur.fsf@daniel-mendler.de> <86ser99lrd.fsf@gnu.org> <875xo5unlo.fsf@daniel-mendler.de> <86frn99iky.fsf@gnu.org> <8734j9ukju.fsf@daniel-mendler.de> <86v7w47vkn.fsf@gnu.org> <87zflgit98.fsf@daniel-mendler.de> <86bjxw7j4n.fsf@gnu.org> Reply-To: Daniel Mendler Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28485"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74617@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 30 18:19:16 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 1tHR7j-0007Gf-Bu for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Nov 2024 18:19:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHR7Y-0002rP-TA; Sat, 30 Nov 2024 12:19:05 -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 1tHR7W-0002r5-Ii for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 12:19:02 -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 1tHR7W-0005Tz-AM for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 12:19:02 -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=KTho45xFvVZHxHyR1Sg23xpTkw46nWIBaU82NliYDzA=; b=A957vLnoIu36evy/RxsUbl/2qfpT1a6Wkqv3WpteOjm0lT1NgHSs3D1kQvHEDd3QlpzBQDxidKh8sFgx5mkuFZNARNZSlJawr+n2KMxkRGI+rO59ddxBrpeB1q7ZomS0Y5+BwO8byBj9td53sf+iLLc7VSQJDDW0BDPRtk7nGJMW2A4Stih2pAK6ifn+AMvf7c5PbRT1R1qL38nekgJM6JryOAXFutYGuEoLuVgmTcLAsuYDm0k+e5ynloeVX3YjJ6plHQQ5sgoz1H4g82xHnHpkDbxl/YwCNce44SW1u4Ay59mAbuI1BFADanwWwKsJ45N9h1WOLO67w+Cm8c4BKw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHR7W-0005lW-4V for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 12:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Nov 2024 17:19: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.173298713422141 (code B ref 74617); Sat, 30 Nov 2024 17:19:02 +0000 Original-Received: (at 74617) by debbugs.gnu.org; 30 Nov 2024 17:18:54 +0000 Original-Received: from localhost ([127.0.0.1]:48871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHR7N-0005l3-Og for submit@debbugs.gnu.org; Sat, 30 Nov 2024 12:18:54 -0500 Original-Received: from server.qxqx.de ([49.12.34.165]:49077 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHR7L-0005kk-45 for 74617@debbugs.gnu.org; Sat, 30 Nov 2024 12:18:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KTho45xFvVZHxHyR1Sg23xpTkw46nWIBaU82NliYDzA=; b=bPmtWYFuE3vkhEDZ6NVicplWLk o0djX+N3bAp5BCImEXQibiWAJ9PUoLOoAiyoQQggaVjo/nrgkQ5LbqbjwjnJQLG3hxKNpHlu4YCl6 RWP3GwYqyIkuwuSP/lXJn3a64Fk+h0lubbLZN+2+bflEMJ7pWXNQT746y9vTqBiHWUkM=; In-Reply-To: <86bjxw7j4n.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 30 Nov 2024 18:59:20 +0200") 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:296183 Archived-At: Eli Zaretskii writes: >> From: Daniel Mendler >> Cc: 74617@debbugs.gnu.org, monnier@iro.umontreal.ca >> Date: Sat, 30 Nov 2024 17:25:07 +0100 >> >> Eli Zaretskii writes: >> >> >> I see it differently. The problem is in the tmm and ffap commands which >> >> lead to a mixture of completion UIs. Even if another completion UI is in >> >> effect, the default completion UI is called by tmm and ffap, bypassing >> >> the `completing-read' abstraction. >> > >> > I don't understand: ffap-menu calls completing-read, so what >> > abstraction does it bypass, and how? >> >> It also calls `minibuffer-completion-help' which belongs to the default >> completion UI but not strictly to the abstract `completing-read' API. > > So the problem is this single line? > > (let ((minibuffer-setup-hook 'minibuffer-completion-help)) Yes. But maybe it makes sense to tackle the "immediate candidate display problem" more generally. It would be great to get Stefan's input on this. For example in my osm.el package I have the following code to implement immediate display of candidates. The lambda implements the auto-detection, which I don't find particularly elegant. (minibuffer-with-setup-hook (lambda () (when (and (eq completing-read-function #'completing-read-default) (not (bound-and-true-p vertico-mode)) (not (bound-and-true-p icomplete-mode))) (let ((message-log-max nil) (inhibit-message t)) ;; Show matches immediately for default completion. (minibuffer-completion-help)))) (completing-read ...)) Initially I had forgotten the call to `minibuffer-completion-help' since most of them time I use a completion UI which displays the candidates automatically anyway. Then Richard reported the bug, that `osm-search' doesn't work conveniently in Emacs by default. Furthermore in my jinx.el package I have almost exactly the same code in `jinx--correct-setup', which is used like this: (minibuffer-with-setup-hook #'jinx--correct-setup (completing-read ...)) Daniel