GNU bug report logs -
#72300
project.el: detect newly created project contained within another
Previous Next
Full log
View this message in rfc822 format
Hi!
On 05/08/2024 20:18, Ship Mints wrote:
> (vc-file-setprop dir 'project-vc project) in project-try-vc. There is no
> facility, public API or private, to clear the cache en-masse. One could
> reset the cache via clearing the vector vc-file-prop-obarray
> (setq vc-file-prop-obarray (make-vector 17 0)) in the absence of an API.
> You can observe what's in your vc-file-prop-obarray for yourself before
> taking this action.
That's right. One step toward that goal would be moving the cache to
some other data structure - possibly a tree-like one, to also be able to
short-circuit the upward directory searches.
Cache invalidation is a sore point, though: the directory tree can
change behind the scenes outside Emacs, so unless the caching is
disabled the other complete solutions would rely on something like
filenotify.
OT2H if we're okay with supporting only manual clears e.g. using 'M-x
project-forget-project' or 'M-x project-forget-projects-under', that
could be implemented easily enough. The current vc-file-prop-obarray
structure could be refreshed with a full scan.
This bug report was last modified 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.