Subject: Re: bug#55800: using rgrep function interactively with fido-mode or fido-vertical-mode causes errors

From: Juri Linkov <[email-masked]>
Date: Thu, 09 Jun 2022 20:09:59 +0300

>> 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.