[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 0c85b8f 05/62: Tests only kill server-related buf
From: |
Stefan Monnier |
Subject: |
[elpa] externals/eglot 0c85b8f 05/62: Tests only kill server-related buffers when successfull |
Date: |
Sat, 29 Sep 2018 17:13:28 -0400 (EDT) |
branch: externals/eglot
commit 0c85b8f962725dc0d8b3f2cea732ff58fb7ab92e
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Tests only kill server-related buffers when successfull
* eglot-tests.el (eglot--call-with-dirs-and-files): Only kill
server-related buffers when succcessful.
---
eglot-tests.el | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/eglot-tests.el b/eglot-tests.el
index 68f7632..3932769 100644
--- a/eglot-tests.el
+++ b/eglot-tests.el
@@ -52,7 +52,8 @@
(defun eglot--call-with-dirs-and-files (dirs fn)
(let* ((fixture-directory (make-temp-file "eglot--fixture" t))
(default-directory fixture-directory)
- new-buffers new-servers)
+ new-buffers new-servers
+ cleanup-events-et-cetera-p)
(unwind-protect
(let ((find-file-hook
(cons (lambda () (push (current-buffer) new-buffers))
@@ -60,16 +61,24 @@
(eglot-connect-hook
(lambda (server) (push server new-servers))))
(mapc #'eglot--make-file-or-dirs dirs)
- (funcall fn))
- (eglot--message "Killing buffers %s, deleting %s, killing %s"
- (mapconcat #'buffer-name new-buffers ", ")
- default-directory
- (mapcar #'jsonrpc-name new-servers))
+ (funcall fn)
+ (setq cleanup-events-et-cetera-p t))
(unwind-protect
(let ((eglot-autoreconnect nil))
(mapc #'eglot-shutdown
(cl-remove-if-not #'jsonrpc-running-p new-servers)))
- (mapc #'kill-buffer (mapcar #'jsonrpc--events-buffer new-servers))
+ (when cleanup-events-et-cetera-p
+ (cl-loop for serv in new-servers
+ do
+ (kill-buffer (process-get (jsonrpc--process serv)
+ 'jsonrpc-stderr))
+ (kill-buffer (jsonrpc--events-buffer serv))
+ (kill-buffer (process-buffer (jsonrpc--process serv)))))
+ (eglot--message
+ "Killing project buffers %s, deleting %s, killing server %s"
+ (mapconcat #'buffer-name new-buffers ", ")
+ default-directory
+ (mapcar #'jsonrpc-name new-servers))
(dolist (buf new-buffers) ;; have to save otherwise will get prompted
(with-current-buffer buf (save-buffer) (kill-buffer)))
(delete-directory fixture-directory 'recursive)))))
- [elpa] externals/eglot updated (07b235f -> 821b498), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot ad98247 02/62: jsonrpc must be available when compiling, too, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot d936fbd 01/62: Install jsonrpc package when running tests, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 0c85b8f 05/62: Tests only kill server-related buffers when successfull,
Stefan Monnier <=
- [elpa] externals/eglot 400623f 03/62: Test with Emacs 26.1, not the 26 pre-release, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 5d88eed 06/62: Close #39: Handle experimental/unknown server methods gracefully, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 3ac4b64 04/62: * Makefile (JSONRPC): Call package-refresh-contents, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 8d61eca 09/62: Close #44: Don't turn on flymake-mode any more than is needed, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot a57d5d8 07/62: Close #29: Implement workspace/didChangeConfiguration (#40), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 616ad53 13/62: Close #48: be less verbose when using eglot-ensure, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot eeb34c6 21/62: Default eglot-handle-notifictiona|request must &allow-other-keys, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 04f7db7 10/62: Per #48: Fix messages of eglot-ensure, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 5808c0d 11/62: Add entry for haskell-ide-engine in eglot-server-programs (#49), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot ec02ffa 14/62: Work around Emacs bugs 32237, 32278 (#53), Stefan Monnier, 2018/09/29