emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Speed up project-kill-buffers


From: Philip Kaludercic
Subject: Re: [PATCH] Speed up project-kill-buffers
Date: Sat, 08 May 2021 12:30:06 +0000

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> I didn't know about that function! Just tried it out and it seems that
>>> the patch below is even faster, as project-current does not have to be
>>> invoked for every buffer, remote or not.
>>
>> I think it might misbehave if you have projects nested in the directory
>> of other projects, tho.
>
> There are also projects that do not have a single root; an Emacs elisp
> project (which has load-path as roots), any project with dependent
> external libraries.
>
> You can check (member file (project-files prj)), but that's about the
> same as your first patch.

So maybe something like 

    (let ((root (project-root proj))
          (extr (project-external-roots proj)))
      (member file (project-files proj (cons root extr))))

?

-- 
        Philip K.



reply via email to

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