Commit 3c4619ed authored by Philip K's avatar Philip K Committed by Dmitry Gutov
Browse files

project--buffer-list: Avoid Tramp buffers when possible

* project.el (project--buffer-list): Add file-remote-p check.
parent 824d1a57
Pipeline #10618 failed with stages
in 12 minutes and 36 seconds
......@@ -1120,11 +1120,14 @@ current project, it will be killed."
(defun project--buffer-list (pr)
"Return the list of all buffers in project PR."
(let (bufs)
(let ((remote-project-p (file-remote-p (project-root pr)))
(dolist (buf (buffer-list))
(when (equal pr
(with-current-buffer buf
(when (and (let ((remote (file-remote-p (buffer-local-value 'default-directory buf))))
(if remote-project-p remote (not remote)))
(equal pr
(with-current-buffer buf
(push buf bufs)))
(nreverse bufs)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment