From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yilkal Argaw Newsgroups: gmane.emacs.bugs Subject: bug#55800: using rgrep function interactively with fido-mode or fido-vertical-mode causes errors Date: Fri, 10 Jun 2022 06:34:35 +0300 Message-ID: References: <83wndvack5.fsf@gnu.org> <83pmjna1di.fsf@gnu.org> <83fskj9sax.fsf@gnu.org> <86zginli36.fsf@mail.linkov.net> <86y1y5bvpc.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21884"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55800@debbugs.gnu.org, Eli Zaretskii To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 10 05:35:18 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 1nzVQb-0005Vu-Tu for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 05:35:18 +0200 Original-Received: from localhost ([::1]:43936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzVQZ-0000wu-72 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 23:35:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzVQM-0000wm-2Z for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 23:35:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzVQL-00023n-Qf for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 23:35:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzVQL-0001Xl-LR for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 23:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yilkal Argaw Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jun 2022 03:35:01 +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.16548320985921 (code B ref 55800); Fri, 10 Jun 2022 03:35:01 +0000 Original-Received: (at 55800) by debbugs.gnu.org; 10 Jun 2022 03:34:58 +0000 Original-Received: from localhost ([127.0.0.1]:48365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzVQI-0001XR-2k for submit@debbugs.gnu.org; Thu, 09 Jun 2022 23:34:58 -0400 Original-Received: from mail-yb1-f171.google.com ([209.85.219.171]:35642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzVQD-0001XA-0K for 55800@debbugs.gnu.org; Thu, 09 Jun 2022 23:34:56 -0400 Original-Received: by mail-yb1-f171.google.com with SMTP id m14so1444684ybm.2 for <55800@debbugs.gnu.org>; Thu, 09 Jun 2022 20:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VJNIYLCZGHpoHDfAi4PYUuadDLde3dTulxOHPcFa1Pg=; b=hjqN5AbS9HGRhmfQ5mWgNfw6rtUtNDlaIBsXtjZiNa3qQajHZONV0sMYqPm2WvYOWt cl5zSsALyTMJy+aQ7KumdRT57l1atpHCt4y5mDZy2J6tlwzootpsscJ3C12U9+jWs/G5 Tm1WFKP2rLfoWbPnMNdqBquCGfr9f16B+BkLD8ziXZAmA2Mt+wpT8iYHP3jy9Mj/FNMS ewRRhHodblBkAJUm3MTc4FMaEkqt2bTJ8C02es/H/1+U27nbWIOFiNr1A5NLPAfVJv6w eiAxpU8vz67sPYDOODddfGbcsquigLMFk6XmBiJs9ppjiQCUTrYln7g87leXSTHthXMa UT9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VJNIYLCZGHpoHDfAi4PYUuadDLde3dTulxOHPcFa1Pg=; b=7G3lVArxP/mPb0IyDUk/4nLQT2teS4ibTrwO+6HcF210x4Rd7q4i0YcdcFdV3FUFP8 FQK/RD5UVuBGbtRxriVEpP8wJCjAlN+uVwijgpfT9TLLvDfz0ggjPeezbfuog2kzoeua 47Ac84fvH3oYvtrjmJ6Z9OMMBfD2xpS5GXUBCn6s6O3H+kzttlffqkk8U8YeBWtzuf/E GA8xFBBuW9CksKgUapamtGQP6c/v+RVDbKOSxEoE7ZmAjM7OjLC0OZew2sHN1nV/LXsr 94o18lTFsAZI1RZ/GbxBDAj/ASbCKrc0pYITpZ90/QlZNx3BPXxVrKBXkL2/EIdjwEMd FIOQ== X-Gm-Message-State: AOAM532Cw3PxyTKFifCrPg0b6yKOGtKzErHJqheyIVy537mjJu38yV08 eoGceK8EAinvOpnTPQLeE33S05D97C1ZOrJuxM8= X-Google-Smtp-Source: ABdhPJyq9CLpAnMoxBMWDY8ygpeIRVmtHxuAAvQj0VU34Yh+u7bJxhXFZv0EEgHD92nX+97unPNV5rk4kzMEv9Vs5m0= X-Received: by 2002:a25:a081:0:b0:664:4823:9408 with SMTP id y1-20020a25a081000000b0066448239408mr4325034ybh.335.1654832087134; Thu, 09 Jun 2022 20:34:47 -0700 (PDT) In-Reply-To: <86y1y5bvpc.fsf@mail.linkov.net> 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:234180 Archived-At: > Strange, it worked when I tried your test case with fido-vertical-mode. Sorry about that, the machine I tried that on had M-j assigned to C-m for some reason using kmonad. I've since removed that config. So that was my bad. > This is what it already does: for example, when the current file > is in Emacs Lisp mode, then the default is: (default *.el) 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. > Surely, rgrep could be changed when necessary. But is this problem > really specific to rgrep? I see exactly the same problem in many > other commands, e.g.: > 0. emacs -Q > 1. M-x fido-vertical-mode RET > 2. move point to any word > 3. M-x man RET RET > > `man' provides the word under the cursor as the default value. > But nonetheless RET selects the highlighted candidate instead > of the default value. Again it might be my fault but I don't get the "man" example. Doing all what you said and using M-x man only presented a single prompt and that prompt had the word under cursor as the default value. If I typed nothing the word under cursor(which is displayed in the prompt) is chosen as the default but if I typed something it searches the man page for that word. I see no highlighting of candidates there. But my general thought on the matter was that the list presented to you on the "files matching wildcard" prompt is a bit confusing whether you use fido or not. Fido just makes that obvious by presenting that list to you with the first option highlighted. And in my opinion users presented with "default=all" in the prompt might not notice the highlighted text just press RET (i.e. when you are using something like rgrep you are probably doing something and unlikely to notice the kinks of the completion list until presented with the error) . So presenting a completion list that better suits the prompt might be a better option. Even having that prompt not give any completion candidates might be better since it will not contain any option that might cause error.But all this is my opinion. And if it is a mistake in my usage and if other users find this the intuitive way to use rgrep then again I'm sorry about the bug report since it might not be a bug. On Thu, Jun 9, 2022 at 8:25 PM Juri Linkov wrote: > > >> Did you know that you can use M-j to accept the default value "all" > >> instead of the highlighted candidate in fido-mode? > > > > M-j did not work. > > Strange, it worked when I tried your test case with fido-vertical-mode. > > > One could even build a better list of file extensions > > because asking for "matching wildcards" and providing files > > instead of file extensions does not quite make sense to a user. > > This is what it already does: for example, when the current file > is in Emacs Lisp mode, then the default is: (default *.el) > > > Also I do not think that that is how that function > > was supposed to behave. Looking into the fille grep.el there is a > > list called "grep-files-aliases" I think that is the list that should be > > fed to the completion instead of whatever is generated by > > read-file-name-internal. > > Surely, rgrep could be changed when necessary. But is this problem > really specific to rgrep? I see exactly the same problem in many > other commands, e.g.: > > 0. emacs -Q > 1. M-x fido-vertical-mode RET > 2. move point to any word > 3. M-x man RET RET > > `man' provides the word under the cursor as the default value. > But nonetheless RET selects the highlighted candidate instead > of the default value.