You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 89cd8df
Browse filesBrowse the repository at this point in the historyBrowse files
Make the delete-file advice cheap, and purge the right project
The advice runs for every file Emacs deletes. It looked for the project
of the current buffer, so a file deleted from a buffer in another
project (or in none) stayed in its project's file list, and a file
deleted from inside a project was looked up in that project's list even
when it lived somewhere else entirely. The projects are now found from
the file name, by comparing it against the roots that have a file list
in memory, which also makes a deletion outside every cached project cost
next to nothing.
Each purge also wrote the whole persistent cache out synchronously, so
deleting a few hundred files serialized the list a few hundred times.
The advice now leaves the write to the idle flush that
`projectile-cache-current-file' already uses, and pending flushes are
written when Emacs exits so they are not lost. A flush no longer writes
nil over the cache file of a project whose list has left memory.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@
23
23
24
24
### Changes
25
25
26
+
-[#2206](https://github.com/bbatsov/projectile/pull/2206): Deleting files inside a project with a persistent cache no longer writes the cache file once per deleted file. The write waits until Emacs is idle, and pending cache writes are flushed when Emacs exits.
26
27
-[#2206](https://github.com/bbatsov/projectile/pull/2206): `projectile-find-test-file` is much faster on large projects: the project type and its test conventions are looked up once, not once per file.
27
28
-[#2206](https://github.com/bbatsov/projectile/pull/2206): Listing the known projects is faster with `projectile-ignored-projects` set: its entries are symlink-resolved once per listing, not once per project.
28
29
-[#2206](https://github.com/bbatsov/projectile/pull/2206): The search and replace reviewers scan a large file with many matches much faster: line numbers are counted from the previous match instead of from the top of the file.
@@ -41,6 +42,7 @@
41
42
42
43
### Bugs fixed
43
44
45
+
-[#2206](https://github.com/bbatsov/projectile/pull/2206): Deleting a file removes it from the file cache of the project it belongs to, not from the cache of the project the current buffer happens to be in.
44
46
-[#2206](https://github.com/bbatsov/projectile/pull/2206): The search reviewer now shows what `rg` reported when it fails (a pattern it rejects, an unreadable directory) instead of an empty "No matches" buffer.
45
47
-[#2204](https://github.com/bbatsov/projectile/pull/2204): On an Emacs built without native JSON, `projectile-search-review` and `projectile-todos` fall back to the Emacs Lisp scanner instead of running `rg` and reporting no matches.
46
48
-[#2204](https://github.com/bbatsov/projectile/pull/2204): `projectile-session-switch-to-buffer`, `projectile-find-file-in-projects` and `projectile-find-file-in-directory` advertise the completion category their candidates really are (`buffer` and `file`), so Marginalia and Embark stop treating them as files relative to the project root.
0 commit comments