GNU bug report logs - #74616
30.0.92; tmm always displays the *Completions* buffer

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Sat, 30 Nov 2024 06:43:02 UTC

Severity: normal

Found in version 30.0.92

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 74616 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#74616: 30.0.92; tmm always displays the *Completions* buffer
Date: Sun, 08 Dec 2024 08:49:02 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Daniel Mendler <mail <at> daniel-mendler.de>
>> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,  74616 <at> debbugs.gnu.org
>> Date: Sat, 07 Dec 2024 15:38:14 +0100
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> >> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
>> >> Cc: Daniel Mendler <mail <at> daniel-mendler.de>,  74616 <at> 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




This bug report was last modified 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.