unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 34116@debbugs.gnu.org
Subject: bug#34116: 27.0.50; minibuffer-force-complete-and-exit mostly broken
Date: Thu, 17 Jan 2019 15:03:43 +0000	[thread overview]
Message-ID: <CALDnm50mXTeYtmCR4BJv0uL8pB5dK=b2yyd68QckbHMh1yo8zA@mail.gmail.com> (raw)
In-Reply-To: <jwvbm4fpcza.fsf-monnier+emacsbugs@gnu.org>

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	other threads:[~2019-01-17 15:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 13:56 bug#34116: 27.0.50; minibuffer-force-complete-and-exit mostly broken João Távora
2019-01-17 14:57 ` Stefan Monnier
2019-01-17 15:03   ` João Távora [this message]
2019-01-18 12:13     ` João Távora
2019-01-18 13:09       ` Stefan Monnier
2019-01-18 13:28         ` João Távora
2019-01-18 18:00           ` Stefan Monnier
2019-01-18 22:18             ` João Távora
2019-01-19  2:31               ` Stefan Monnier
2019-01-23 15:49                 ` João Távora
2019-01-23 16:09                   ` Stefan Monnier
2019-01-23 16:36                     ` bug#34077: " João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDnm50mXTeYtmCR4BJv0uL8pB5dK=b2yyd68QckbHMh1yo8zA@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=34116@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).