GNU bug report logs - #62776
30.0.50; 'project-find-file' ignoring 'file-name-history'

Previous Next

Package: emacs;

Reported by: Rudolf Adamkovič <salutis <at> me.com>

Date: Tue, 11 Apr 2023 15:22:01 UTC

Severity: normal

Found in version 30.0.50

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 62776 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Rudolf Adamkovič <salutis <at> me.com>,
 62776 <at> debbugs.gnu.org, Daniel Mendler <mail <at> daniel-mendler.de>
Subject: Re: bug#62776: 30.0.50; 'project-find-file' ignoring
 'file-name-history'
Date: Wed, 19 Apr 2023 04:54:28 +0300
On 19/04/2023 00:38, Rudolf Adamkovič wrote:
> Dmitry Gutov<dmitry <at> gutov.dev>  writes:
> 
>> I also tried replacing the latter with 'M-x vertico-mode' just now, and
>> 'M-n' seemed to work fine there, suggesting the files visited previously
>> with the same command. Tested in both Emacs 29 and 30.
> To avoid miscommunication, I shall provide a precise recipe.
> 
> (And, I apologize for not providing a recipe sooner.)
> 
> REPRODUCTION STEPS:
> 
>    1. mv ~/.emacs.d ~/.emacs.d.OLD
>    2. navigate to some Git repository
>    3. emacs -Q
>    4. M-x package-refresh-contents RET
>    5. M-x package-install RET
>    6. M-x vertico RET
>    7. M-x vertico-mode RET
>    8. C-x p f <SOME-FILE-NAME> RET
>    9. C-x p f
> 
> EXPECTED RESULT:
> 
>    Vertico pops up, showing 10 candidates.  The first candidate is
>    <SOME-FILE-NAME>, the file that was opened most recently.
> 
> ACTUAL RESULTS:
> 
>    Vertico pops up, but the first candidate is not <SOME-FILE-NAME>.
> 
> NOTES:
> 
>    If I type M-x instead of C-x p f, Vertico pops up 10 most recently
>    used commands, such as 'package-refresh-contents' or 'package-install'
>    in this case.  All the other commands that have histories work the
>    same way, only C-x p f does not work that way (anymore, but it used
>    to).

Thanks!

If after step 9 I press M-p (previous-history-element), <SOME-FILE-NAME> 
relative to the repository root is inserted no problem. So it seems like 
the history var is used at least in some form.

But you're saying it is not used during sorting? And that used to happen?

It's possible that vertico--history-hash is confused by our manipulation 
of the history entries -- like how they are stored as absolute file 
names now (bug#58447).

Ideally this will require just some tiny tweak in vertico. I wonder what 
Daniel thinks.




This bug report was last modified 2 years and 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.