unofficial mirror of bug-gnu-emacs@gnu.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, waah@yellowfrog.io,
	Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#38992: 27.0.60; when enabled, fido-mode seems to break vc-git-grep
Date: Sun, 19 Jan 2020 13:00:35 +0000	[thread overview]
Message-ID: <CALDnm50Fu0B-geghaHWuJp7_wE=imxhMmmF-XxTNZ=Hkyp1BOA@mail.gmail.com> (raw)
In-Reply-To: <51d12435-274b-be14-95b8-f790804f1a61@yandex.ru>

Hi Dmitry,

The second option looks pretty good, so you can just push that at will,
if no other objections.  Incidentally, I would also think it reasonable to
provide the same help text if there is a single partial match.

The first option I don't understand very well, but that's probably because
I haven't looked very closely at it, so if you can post an implementation of
your idea it would be ideal, because it doesn't sound absurd at all :-)

João


On Sat, Jan 18, 2020 at 1:38 AM Dmitry Gutov <dgutov@yandex.ru> wrote:
>
> On 11.01.2020 21:59, João Távora wrote:
> > rs due to fundamental changes in the problem others due
> > to opinion.  It "feels" nice for me now, but if you can come up with a better
> > binding for RET, shoot it over, I'll tell you what I think about it.  I think
> > you'll find it will have advantages and disadvantages.  But who knows:-)
>
> Without going far into changing its behavior, I think we have two
> options for this now. Since the only occurrence of "Incomplete" of
> minibuffer.el is in minibuffer-force-complete-and-exit, apparently one
> issue is that the glob input doesn't succeed the test-completion test in
> the read-file-name-internal completion table used by grep-read-files.
>
> So the options are:
>
> 1. Make sure that the table says globs are valid input (by adding a
> wrapper, probably). This should make RET silently accept the input in
> this case. This is a good way to proceed if we're reasonably confident
> we can deal with similar issues in the same way, and there won't be too
> many of them.
>
> 2. Make icomplete-force-complete-and-exit show a different message, so
> that the user knows what to do. Instead of just "Incomplete", add
> something like ", press \\[exit-minibuffer\\] to accept".
>
> Maybe do both.
>
> The second option can look like this:
>
> diff --git a/lisp/icomplete.el b/lisp/icomplete.el
> index a1a67e2330..d88ebca15d 100644
> --- a/lisp/icomplete.el
> +++ b/lisp/icomplete.el
> @@ -185,7 +185,15 @@ icomplete-force-complete-and-exit
>          ;; calculated, This causes the first cached completion to
>          ;; be taken (i.e. the one that the user sees highlighted)
>          completion-all-sorted-completions)
> -      (minibuffer-force-complete-and-exit)
> +      (progn
> +        (unless completion-cycling
> +          (minibuffer-force-complete nil nil 'dont-cycle))
> +        (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, press %s to accept"
> +                                   (substitute-command-keys
> "\\[exit-minibuffer]")))))
>       ;; Otherwise take the faster route...
>       (minibuffer-complete-and-exit)))
>
>
> (Or we can put the message into a global var which
> icomplete-force-complete-and-exit would bind to this message string).



--
João Távora





  reply	other threads:[~2020-01-19 13:00 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 [this message]
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
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

  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='CALDnm50Fu0B-geghaHWuJp7_wE=imxhMmmF-XxTNZ=Hkyp1BOA@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 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).