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#74616: 30.0.92; tmm always displays the *Completions* buffer Date: Sun, 08 Dec 2024 08:49:02 +0100 Message-ID: <878qsqbonl.fsf@daniel-mendler.de> References: <878qt1w7c6.fsf@daniel-mendler.de> <86wmgl9mfz.fsf@gnu.org> <86ldwrirf1.fsf@gnu.org> <87wmgbftih.fsf@daniel-mendler.de> <864j3ehce1.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="33095"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74616@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 Sun Dec 08 08:50:20 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 1tKC3Y-0008TU-Ak for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Dec 2024 08:50:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKC3L-0000Ne-SD; Sun, 08 Dec 2024 02:50:08 -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 1tKC3G-0000LX-E3 for bug-gnu-emacs@gnu.org; Sun, 08 Dec 2024 02:50: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 1tKC3G-00032W-4s for bug-gnu-emacs@gnu.org; Sun, 08 Dec 2024 02:50: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=nXJWMsidyx1Viqw2wAQdSyMRaMyHebe2ZJ5M+MOadDw=; b=rraXADjeMTHSDreQfnx3WxpNzuwZYaD5dUjHcQBsD7GFnBOIniud520cFswN5mr8FrIUkq7/vSevHBkd54/HatOUDAKnCgh/Wjmv5sGaDFjJEHAktpAo6+0xkwHm+Z4zRTzRyMo9SiqSHiEtNLruwIexMi1d4kOxqaLfXaQ61htyBTy6fkWh3E64u+qvBPg+c1j2vboSVi+ZYbCZEWcQ220wMbLwsTEJ0Ie5Doi6adoXOw6TwIuZI8LgvB1TjmYIsiQKmBBIlQSojTqkjFm5x4GcAjGFzQoqukrvJgHe/f3JqGD0kJ1A5FJF6GHzoJ+BVtCEsATdFbxldfyDjHz+KA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tKC3F-0001kw-RG for bug-gnu-emacs@gnu.org; Sun, 08 Dec 2024 02:50:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Dec 2024 07:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74616 X-GNU-PR-Package: emacs Original-Received: via spool by 74616-submit@debbugs.gnu.org id=B74616.17336441546638 (code B ref 74616); Sun, 08 Dec 2024 07:50:01 +0000 Original-Received: (at 74616) by debbugs.gnu.org; 8 Dec 2024 07:49:14 +0000 Original-Received: from localhost ([127.0.0.1]:49538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKC2T-0001j0-RT for submit@debbugs.gnu.org; Sun, 08 Dec 2024 02:49:14 -0500 Original-Received: from server.qxqx.de ([49.12.34.165]:54337 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tKC2R-0001iT-7N for 74616@debbugs.gnu.org; Sun, 08 Dec 2024 02:49:12 -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=nXJWMsidyx1Viqw2wAQdSyMRaMyHebe2ZJ5M+MOadDw=; b=DljBFDtazdYGz7i8vuEtLfoynj 5hi84OvsDZxL7OEBe1X2X9EFTlzzGfcKWuNBvPTDjOcDE5/CZqQvW9jEHuuj4boUM1bmN76+YsOij 9FrRifrLLNQcpfKUo0g4kLDhysweVH+qQaz3173AhByo2n9FXXtknAN15oYkwu8G9PoE=; In-Reply-To: <864j3ehce1.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 08 Dec 2024 09:17:26 +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:296621 Archived-At: Eli Zaretskii writes: >> From: Daniel Mendler >> Cc: Stefan Monnier , 74616@debbugs.gnu.org >> Date: Sat, 07 Dec 2024 15:38:14 +0100 >> >> Eli Zaretskii writes: >> >> >> From: Stefan Monnier >> >> Cc: Daniel Mendler , 74616@debbugs.gnu.org >> >> Date: Sat, 30 Nov 2024 13:55:02 -0500 >> >> >> >> > I think the automatic detection is a better default behavior, but >> >> > maybe we could have a variable (not necessarily a defcustom) for users >> >> > who would like to have the old behavior. >> >> > Stefan, WDYT? >> >> >> >> I often use the standard UI and I generally don't like this eagerness to >> >> display *Completions*, so I'd either change the code not to auto-display >> >> the buffer (what I have done locally) or at least offer a variable >> >> for that. >> >> >> >> So it seems like the var should have 3 settings: always show, never >> >> show, and "guess" (tho maybe we can skip the "guess" option and let the >> >> other completion UIs set the var to nil). >> > >> > Daniel, would you like to submit the patch with these changes? >> >> So is the plan to add a completion metadata `eager-display' such that >> completion tables can request immediate display? This completion >> metadata can then be overridden by the user via >> `completion-category-overrides'. The patch would include changes to tmm, >> ffap-menu and imenu (obsoleting `imenu-eager-completion-buffer'). > > AFAIU, both Stefan and myself only commented on the more specific > change you suggested originally, not the more general one you > described in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74616#11 Okay, I see. Is there interest in a general solution for all the scenarios, instead of replicating customization variables multiple times? Then users like Stefan who don't like the eager display, or completion UIs would only have to customize a single variable once. If a customization variable is preferred over the completion metadata, one could add a `minibuffer-eager-completion-help-function function to minibuffer.el (please make suggestions for a better name): (defcustom minibuffer-eager-completion-help-function #'minibuffer-completion-help "Can be set to `minibuffer-completion-help' to show the eager display, to `ignore' to disable the eager display, or to a custom function which performs auto detection." ...) It would be used like this at the call sites (imenu, ffap, tmm): (minibuffer-with-setup-hook minibuffer-eager-completion-help-function (completing-read ...)) Daniel