From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#38992: 27.0.60; when enabled, fido-mode seems to break vc-git-grep Date: Sat, 18 Jan 2020 04:38:07 +0300 Message-ID: <51d12435-274b-be14-95b8-f790804f1a61@yandex.ru> References: <288610218.111246.1578330546916@office.mailbox.org> <7293f6ca-b11d-3d2a-ad71-831135434e75@yandex.ru> <780526337.114357.1578556168662@office.mailbox.org> <944631362.128066.1578605073103@office.mailbox.org> <98df50d8-44fb-448e-e893-f20601f1ca54@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="511"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: 38992@debbugs.gnu.org, waah@yellowfrog.io, Stefan Monnier To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 18 02:39:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1isd51-000Y59-9J for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Jan 2020 02:39:15 +0100 Original-Received: from localhost ([::1]:36184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isd4z-0005cR-4W for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Jan 2020 20:39:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42973) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isd4q-0005cH-FL for bug-gnu-emacs@gnu.org; Fri, 17 Jan 2020 20:39:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isd4o-0004GM-Q8 for bug-gnu-emacs@gnu.org; Fri, 17 Jan 2020 20:39:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34377) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1isd4o-0004G3-Ke for bug-gnu-emacs@gnu.org; Fri, 17 Jan 2020 20:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1isd4o-0004t8-He for bug-gnu-emacs@gnu.org; Fri, 17 Jan 2020 20:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jan 2020 01:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38992 X-GNU-PR-Package: emacs Original-Received: via spool by 38992-submit@debbugs.gnu.org id=B38992.157931150018739 (code B ref 38992); Sat, 18 Jan 2020 01:39:02 +0000 Original-Received: (at 38992) by debbugs.gnu.org; 18 Jan 2020 01:38:20 +0000 Original-Received: from localhost ([127.0.0.1]:40350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isd47-0004sB-PV for submit@debbugs.gnu.org; Fri, 17 Jan 2020 20:38:20 -0500 Original-Received: from mail-lf1-f48.google.com ([209.85.167.48]:43079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1isd45-0004rx-Sv for 38992@debbugs.gnu.org; Fri, 17 Jan 2020 20:38:18 -0500 Original-Received: by mail-lf1-f48.google.com with SMTP id 9so19766117lfq.10 for <38992@debbugs.gnu.org>; Fri, 17 Jan 2020 17:38:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UAiCW8rNWZR9YJkqcb355Wsi+W89tklqYVJdB/Z3nTw=; b=DxMkFtvUG2uGF2SIxNIkSv6/limM7bstNA8Ws/MRmL0PwdYrbiSLZYQaugtfsFjN1A APcxDLHX4IgY4M1bWF7CsKyPvWaFYoGgdg6bDXhXNd/D2h7c4H71jF/JOAwgO0Dpbblf 8ZdR2R/gPLi3tNjNPdBkhTBEDoZzqyCFSWWKRiZLO/Vt2sdp/trcgGTK7EMkD731o8+J XLYDqkr2J+4WSiGo1K6GlYtalbNqA2ofpiIrIXDKdQFQ2J6O0FZP3zePIc4dq2xCOO9M SRC4mrEx1XVYRhjQ1rU2PGX8YOWC0UIwgZFtPgymlg1/bcZtd08fhIt5Bs9iE7u8eaF9 THxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UAiCW8rNWZR9YJkqcb355Wsi+W89tklqYVJdB/Z3nTw=; b=aCT2uYuJbKzrNG3fxX5uhH+ndThuNBV35f6mM9xW+kcmGETPm4ik6IIe42bK9awe8s M1mNYcgb6JqCccEsWv5EVHSN+iKzowhHx5cWr+A3nlXh00GGXj2VK9jNvCtsxYEGl4r4 q2fTPs8zYXbHLyu9/RxzMDAzdLlOrIPV9UGa3ZwlJCTqPTWC3o05W+D3cfWvjiviC0BJ uZiJD2IPFfvSYl5qaqHoIEq3OqGKnUMrpxn779OSjO541HhR3182NvXWrVWM0mIcN4Qm ZCgT9NSkv+75NH2eWikKjskYMYeg1p3SyEnPPTp9msjBhM35jnILGwOZx7b/RzOb+EG3 lhMA== X-Gm-Message-State: APjAAAXd9LtUupoVZbEvhpiC9dfNu4eC0Nw34dxYjRjJdn8apo84wG5J Rehn5fJ3+7Gt9VBL9UHuyIA= X-Google-Smtp-Source: APXvYqzbSJvl7lQjFL985Zs68vnSqmIx6gaiYZUoSACOJQu1/4fI5H8QE7Wcy3QkX4awKoU8xyoygQ== X-Received: by 2002:ac2:53bb:: with SMTP id j27mr6648802lfh.39.1579311491850; Fri, 17 Jan 2020 17:38:11 -0800 (PST) Original-Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id l22sm13169721ljj.44.2020.01.17.17.38.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jan 2020 17:38:10 -0800 (PST) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:174784 Archived-At: 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).