From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#55800: using rgrep function interactively with fido-mode or fido-vertical-mode causes errors Date: Sun, 12 Jun 2022 21:24:41 +0300 Organization: LINKOV.NET Message-ID: <86pmjdoi3a.fsf@mail.linkov.net> References: <83wndvack5.fsf@gnu.org> <83pmjna1di.fsf@gnu.org> <83fskj9sax.fsf@gnu.org> <86zginli36.fsf@mail.linkov.net> <86y1y5bvpc.fsf@mail.linkov.net> <86ilp8di8q.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19029"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 55800@debbugs.gnu.org, Eli Zaretskii To: Yilkal Argaw Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 12 20:26:42 2022 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 1o0SIL-0004n4-Q4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Jun 2022 20:26:41 +0200 Original-Received: from localhost ([::1]:54976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0SIK-0004hB-Ro for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Jun 2022 14:26:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0SHk-0003x8-BB for bug-gnu-emacs@gnu.org; Sun, 12 Jun 2022 14:26:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34344) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0SHk-0007Si-3A for bug-gnu-emacs@gnu.org; Sun, 12 Jun 2022 14:26:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o0SHj-0001cX-W4 for bug-gnu-emacs@gnu.org; Sun, 12 Jun 2022 14:26:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Jun 2022 18:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55800 X-GNU-PR-Package: emacs Original-Received: via spool by 55800-submit@debbugs.gnu.org id=B55800.16550583626210 (code B ref 55800); Sun, 12 Jun 2022 18:26:03 +0000 Original-Received: (at 55800) by debbugs.gnu.org; 12 Jun 2022 18:26:02 +0000 Original-Received: from localhost ([127.0.0.1]:56471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0SHi-0001c3-8j for submit@debbugs.gnu.org; Sun, 12 Jun 2022 14:26:02 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:36979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o0SHg-0001bV-D7 for 55800@debbugs.gnu.org; Sun, 12 Jun 2022 14:26:00 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id B0116240002; Sun, 12 Jun 2022 18:25:52 +0000 (UTC) In-Reply-To: <86ilp8di8q.fsf@mail.linkov.net> (Juri Linkov's message of "Fri, 10 Jun 2022 10:58:05 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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:234369 Archived-At: >> If this is an intended behaviour that is considered to be intuitive then >> sorry about the bug report. I was used to how things like the rg package >> worked and that might have been my fault. > > Actually I don't know the intended behaviour of fido-mode, so your > bug report is a valid request to find the source of the problem. > If fido-mode works as intended, then rgrep could be fixed. Indeed, part of the problem was in fido-mode. When the default value is a string, then the default value is bubbled to the top of the completion list: ``` (completing-read (format-prompt "Prompt" "b") '("a1" "b1" "c1") nil nil nil nil "b") ``` in fido-vertical-mode displays: - b1 - a1 - c1 But for a list of default values: ``` (completing-read (format-prompt "Prompt" "b") '("a1" "b1" "c1") nil nil nil nil '("b" "d")) ``` doesn't take into account the first element of the defaults: - a1 - b1 - c1 So now pushed a better fix than was in bug#38992. > So maybe fido-mode could be fixed to always provide the default value > as the first highlighted candidate? Then RET will select it. Another part of the problem is still unsolved and the question still is: shouldn't fido-mode bubble the default value to the top of the list even when the default value doesn't exist in the list of completion candidates? This is the same question as was asked in https://debbugs.gnu.org/38992#76