all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 38992@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
	waah@yellowfrog.io
Subject: bug#38992: 27.0.60; when enabled, fido-mode seems to break vc-git-grep
Date: Tue, 21 Jan 2020 08:12:08 +0000	[thread overview]
Message-ID: <CALDnm514Ko-gX=fJZCy1__1dysTxJYFPVuU-O6bUATxyOE4t4g@mail.gmail.com> (raw)
In-Reply-To: <f5ac5ad7-3447-8cd1-9545-ce05fd2dbc5b@yandex.ru>

[-- Attachment #1: Type: text/plain, Size: 2940 bytes --]

On Mon, Jan 20, 2020, 23:56 Dmitry Gutov <dgutov@yandex.ru> wrote:

> On 21.01.2020 2:04, Stefan Monnier wrote,:
> > The `minibuffer-force-complete` call is the one which actually selects
> > the "first candidate" from the list of completions, so I do think it's
> necessary.
>
> Oh. Right. Somehow I hadn't tested a scenario where this would matter.
>

Phew! :)


> > IIUC the bug under discussion is related to the `required` argument of
> > `completing-read` (and to `minibuffer-completion-confirm`).
>
> Right.
>
> > If `required` was nil (as is the case in `grep-read-files` which
> > I believe is the relevant function here), then when `test-completion`
> > fails, we should probably just call `exit-minibuffer` (rather than tell
> > the user that they should do that).
>
> Ido added an extra prompt in situations like this, I think. What you're
> saying was my first suggestion, but it would require a more invasive
> change.
>

As I said, you can try it out, maybe with a new binding for RET. Please
don't add an extra prompt.

And icomplete-force-complete-and-exit, as implemented, calls
> minibuffer-force-complete-and-exit which doesn't seem to care (or know?)
> that REQUIRED was nil. If you have a particular change in mind, I'd
> happily try a patch.
>
> BTW, I now see that my patch changes a function belonging to icomplete,
> whileas the intention was only to fix fido-mode's behavior. Do you think
> the change fits icomplete-mode as well?
>
> > The problem here is probably caused by the fact that fido-mode arranges
> > for `minibuffer-force-complete` to choose the *default* rather than to
> > choose a candidate from the completion table.  It's rare for
> > a completion table to return candidates that don't pass
> > `test-completion` (tho it's by not impossible nor incorrect), but it's
> > much less rare for the default not to pass `test-completion`.
>
> Um, not sure I understand. The problem here is that typing 'all' (unless
> it matches some of the local files names) or '*.el' and typing RET
> doesn't work. minibuffer-force-complete tries to choose a completion
> from the table, and when it can't, we get the "Incomplete" message.
> Though if it can (there's a matching filename), it ends up worse for the
> user, in this particular situation.
>

Dmitry, I wrestled a lot with the the "default" case among others. I wish I
had written tests for it but it is quite hard. When experimenting with this
at least try:

- pressing ret quickly before the first completions appear, with a default,
like in c-h f. There should be no wait.
- same but slowly, the default should be on top.
- m-x man on an word that doesn't perfectly match the candidates, like
"read" (I think).

Observe differences before and after. Also sorting matters, obviously. Fido
mode does some sorting itself to move the default to the top position, I
think.

João

>

[-- Attachment #2: Type: text/html, Size: 4332 bytes --]

  reply	other threads:[~2020-01-21  8:12 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 17:09 bug#38992: 27.0.60; when enabled, fido-mode seems to break vc-git-grep waah
2020-01-09  3:25 ` Dmitry Gutov
2020-01-09  7:42   ` João Távora
2020-01-09  7:49     ` waah
2020-01-09  9:54       ` João Távora
2020-01-09 10:10         ` João Távora
     [not found]           ` <944631362.128066.1578605073103@office.mailbox.org>
2020-01-09 22:27             ` Dmitry Gutov
2020-01-10 10:10               ` João Távora
2020-01-10 11:22                 ` waah
     [not found]                 ` <fd9ede8f-50dc-3bb4-d3b7-850e38a146ec@yandex.ru>
2020-01-11 18:59                   ` João Távora
2020-01-18  1:38                     ` Dmitry Gutov
2020-01-19 13:00                       ` João Távora
2020-01-20 14:54                         ` Dmitry Gutov
2020-01-20 14:58                           ` João Távora
2020-01-20 21:42                             ` Dmitry Gutov
2020-01-20 23:04                             ` Stefan Monnier
2020-01-20 23:56                               ` Dmitry Gutov
2020-01-21  8:12                                 ` João Távora [this message]
2020-01-23 22:22                                   ` Dmitry Gutov
2020-01-24 14:35                                     ` João Távora
2020-01-21 16:32                                 ` Stefan Monnier
2020-01-21 16:41                                   ` João Távora
2020-01-21 17:02                                     ` waah
2020-01-21 17:24                                       ` João Távora
2020-01-21 18:54                                     ` Stefan Monnier
2020-01-21 22:58                                       ` Dmitry Gutov
2020-01-22  0:29                                         ` João Távora
2020-01-22  0:32                                           ` Stefan Monnier
2020-01-22 12:34                                   ` Dmitry Gutov
2020-01-23 16:28                                     ` Stefan Monnier
2020-01-23 16:51                                       ` João Távora
2020-01-23 22:07                                       ` Dmitry Gutov
2020-01-24 14:11                                         ` Stefan Monnier
2020-01-24 14:31                                           ` Dmitry Gutov
2020-01-29 21:23                                             ` Stefan Monnier
2020-01-31  1:48                                               ` Dmitry Gutov
2020-01-31 13:17                                                 ` Stefan Monnier
2020-01-31 23:18                                           ` Dmitry Gutov
2020-02-01  8:07                                             ` Eli Zaretskii
2020-02-04 23:57                                               ` Dmitry Gutov
2020-02-05 14:20                                                 ` Eli Zaretskii
2020-02-05 14:27                                                   ` João Távora
2020-02-05 17:55                                                     ` Dmitry Gutov
2020-02-05 18:12                                                       ` João Távora
2020-03-04 22:07                                                         ` Dmitry Gutov
2020-03-04 22:44                                                           ` João Távora
2020-03-05  0:01                                                             ` Dmitry Gutov
2020-03-05  8:01                                                               ` João Távora
2020-03-05  8:36                                                                 ` Dmitry Gutov
2020-03-05  8:46                                                                   ` João Távora
2020-03-05  9:59                                                                     ` Dmitry Gutov
2020-03-05 11:51                                                                       ` João Távora
2020-03-05 12:14                                                                         ` Dmitry Gutov
2020-03-05 12:30                                                                           ` João Távora
2020-03-05 13:40                                                                             ` Dmitry Gutov
2020-03-05 13:54                                                                               ` João Távora
2020-03-05 14:03                                                                                 ` Dmitry Gutov
     [not found]                                                                                   ` <CALDnm52HzQym7RosF3AdTNwprqXs7Kk4GBi+3UGjkJt6ZDUJWQ@mail.gmail.com>
2020-03-05 14:17                                                                                     ` Dmitry Gutov
2020-03-05 14:26                                                                                       ` João Távora
2020-03-05 14:40                                                                                         ` João Távora
2020-03-05 14:53                                                                                         ` Dmitry Gutov
2020-03-05 14:58                                                                                           ` João Távora
2020-03-08 16:22                                                                       ` Stefan Monnier
2020-02-05 14:46                                                   ` Stefan Monnier
2020-03-05  0:15                                                   ` Dmitry Gutov
2020-03-05  6:08                                                     ` Eli Zaretskii
2020-03-07 14:10                                                       ` João Távora
2020-03-07 14:46                                                         ` Eli Zaretskii
2020-03-07 16:42                                                           ` João Távora
2020-03-07 16:47                                                             ` Drew Adams
2020-03-07 17:42                                                             ` Eli Zaretskii
2020-03-07 19:28                                                               ` João Távora
2020-03-08 16:28                                                       ` Stefan Monnier
2020-03-08 16:59                                                         ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to='CALDnm514Ko-gX=fJZCy1__1dysTxJYFPVuU-O6bUATxyOE4t4g@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=38992@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=monnier@iro.umontreal.ca \
    --cc=waah@yellowfrog.io \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.