|
From: | Dmitry Gutov |
Subject: | Re: master 1e3b0f2: Improve doc strings of project.el |
Date: | Sat, 20 Jun 2020 14:35:24 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 20.06.2020 13:07, Eli Zaretskii wrote:
In any case, my proposal was not about the API itself, it was more about the implementation of the API. For example, we could have an implementation of the generic project-files API that consulted some list instead of asking the VCS or the filesystem to provide the files.
You can of course do this already, in 10 lines or so.But imagine you did add such a backend where project-files returns an arbitrary list of files. And you use it.
How would project-switch-to-buffer consult it? Will it have to call project-files now, as opposed to just using project-root as the basis for comparison? And then compare buffer-file-name of all file-visiting buffers against that list?
That would work for smaller projects, but in large ones project-files is not instantaneous, so they will be penalized in performance by such an approach. And project-switch-to-buffer should work with all kinds of projects.
That also wouldn't solve the problem of non-file-visiting buffers like Grep from your example.
[Prev in Thread] | Current Thread | [Next in Thread] |