开发者

Quickly accessing files in a 'project'

开发者 https://www.devze.com 2022-12-28 03:53 出处:网络
I\'m looking for a way to quickly open files in my project\'s source tree. What I\'ve been doing so far is adding files to the file-name-cache like so:开发者_运维百科

I'm looking for a way to quickly open files in my project's source tree. What I've been doing so far is adding files to the file-name-cache like so:

开发者_运维百科
(file-cache-add-directory-recursively (concat project-root "some/sub/folder") ".*\\.\\(py\\)$")

after which I can use anything-for-files to access any file in the source tree with about 4 keystrokes.

Unfortunately, this solution started falling over today. I've added another folder to the cache and emacs has started running out of memory. What's weird is that this folder contains less than 25% of files I'm adding, and yet emacs memory use goes up from 20mb to 400mb on adding just this folder. The total number of files is around 2000, so this memory use seems very high. Presumably I'm abusing the file cache.

Anyway, what do other people do for this? I like this solution for its simplicity and speed; I've looked at some of the many, many project management packages for emacs and none of them really grabbed me...

Thanks in advance!

Simon


Testing here give me no problem with some 50000 file (well, I had to say that I had to wait some time, but Emacs only use 48 mB when it finished), You seem to have been hit by some bug you should probably report.


I'd suggest you take a look at this article. I have to support Trey's comment - I don't think your approach is very good at the moment.

0

精彩评论

暂无评论...
验证码 换一张
取 消