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: Stephen Leake
Subject: Re: [PATCH] Speed up project-kill-buffers
Date: Sun, 30 May 2021 10:19:07 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt)

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 20.05.2021 15:16, Stephen Leake wrote:
>> Stephen Leake <stephen_leake@stephe-leake.org> writes:
>> 
>>> Hmm. I just found project-kill-buffer-conditions; maybe I could
>>> customize that; it allows arbitrary predicate functions. It would be
>>> more efficient if the predicate function were also passed the project
>>> object, so it doesn't have to call project-current again (hmm - shades
>>> of project-delete-this-buffer-p :).
>> This works for wisi projects, but not for the elisp project (it
>> signals
>> an error):
>
> I suppose if you set project-find-functions to a local value in
> emacs-lisp-mode buffers (which is IMO unusual), you could also set 
> project-kill-buffer-conditions to a different local value in those
> buffers?

yes, that would work.

>> (defun wisi-prj-kill-buffer-condition (buffer)
>>    "Return non-nil if BUFFER should be killed.
>> For `project-kill-buffer-conditions'."
>>    (let* ((source-path (wisi-prj-source-path (project-current)))
>
> Are those just project sources or dependency dirs as well?

Both; it has never been useful to try to make a distinction.

-- 
-- Stephe



reply via email to

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