bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62776: 30.0.50; 'project-find-file' ignoring 'file-name-history'


From: Dmitry Gutov
Subject: bug#62776: 30.0.50; 'project-find-file' ignoring 'file-name-history'
Date: Wed, 19 Apr 2023 13:47:23 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 19/04/2023 08:54, Daniel Mendler wrote:
On 4/19/23 03:54, Dmitry Gutov wrote:
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).
Yes, that's right. A tweak to the hash manipulation would be needed. On
the other hand we cannot handle all special cases in
vertico--history-hash. For such cases one can set the
vertico-sort-function or vertico-sort-override-function variables per
command.

Right. I wasn't sure what the special-ness of this case is, though.

At first I figured it might be because of the local binding for the history variable (this is something we changed recently, after all).

But now it just looks like if the variable is 'file-name-history', the hash only takes the first segment of file names from it. E.g., when history looked like this at the beginning:

  ("lisp/progmodes/ruby-mode.el")

the hash at the end is:

#s(hash-table size 1 test equal rehash-size 1.5 rehash-threshold 0.8125 data ("lisp/" 0))

I'm guessing this change is responsible for that: https://github.com/minad/vertico/commit/0bc58baba1904cefefccc1cd5510d2e942c181f1

Perhaps there is some straightforward way to determine whether the current completion table stops at separators or not, to be used here.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]