bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34116: 27.0.50; minibuffer-force-complete-and-exit mostly broken


From: João Távora
Subject: bug#34116: 27.0.50; minibuffer-force-complete-and-exit mostly broken
Date: Thu, 17 Jan 2019 15:03:43 +0000

On Thu, Jan 17, 2019 at 2:57 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
> > @@ -1257,29 +1257,32 @@ completion-all-sorted-completions
> >  (defun minibuffer-force-complete-and-exit ()
> >    "Complete the minibuffer with first of the matches and exit."
> >    (interactive)
> > -  (minibuffer-force-complete)
> > +  (minibuffer-force-complete nil nil t)
> >    (completion--complete-and-exit
> >     (minibuffer-prompt-end) (point-max) #'exit-minibuffer
> >     ;; If the previous completion completed to an element which fails
> >     ;; test-completion, then we shouldn't exit, but that should be rare.
> >     (lambda () (minibuffer-message "Incomplete"))))
>
> Wouldn't it be simpler to change minibuffer-force-complete-and-exit so
> it checks test-completion before calling minibuffer-force-complete?

Makes sense.  As I explained elsewhere, I am a total completion API
newbie.  I'm always unsure what to pass to these functions and the
dark logic they engage in.  On the contrary, my change is based on
cons cells, which I still understand :-)

But your suggestion makes perfect sense and I'd be very
thankful if you could do it yourself (if it is as trivial as it sounds).

João Távora





reply via email to

[Prev in Thread] Current Thread [Next in Thread]