Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't close source buffer due to "Process EGLOT ... not running" #137

Closed
WJCFerguson opened this issue Oct 26, 2018 · 3 comments
Closed

Comments

@WJCFerguson
Copy link

WJCFerguson commented Oct 26, 2018

I tried to kill all projectile project buffers, and presumably it kills an EGLOT process buffer before killing the source buffer, but whatever the cause is, I now can't kill the source buffer because eglot--signal-textDocument/didClose fails. I'm guessing some simple checking, or error tolerance, would cover it (?)

Traceback:

  process-send-string(#<process EGLOT (rc-argus-preasyncio/python-mode)> "Content-Length: 154\015\n\015\n{\"jsonrpc\":\"2.0\",\"method\":\"textDocument/didClose\",\"params\":{\"textDocument\":{\"uri\":\"file:///home/james/src/rc-argus-preasyncio/argus/util/arclogging.py\"}}}")
  (let* ((message (cons ':jsonrpc (cons "2.0" args))) (json (jsonrpc--json-encode message)) (headers (list (cons "Content-Length" (format "%d" (string-bytes json)))))) (process-send-string (jsonrpc--process connection) (let* ((--cl-var-- headers) (value nil) (header nil) (header-section "")) (while (consp --cl-var--) (setq value (car --cl-var--) header (car-safe (prog1 value (setq value (cdr value))))) (setq header-section (concat header-section (concat header ": " value "\015\n"))) (setq --cl-var-- (cdr --cl-var--))) (format "%s\015\n%s" header-section json))) (jsonrpc--log-event connection message 'client))
  (progn (let ((--cl-keys-- args)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:id :method :params :result :error :partial :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ':allow-other-keys args))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:id :method :params :result :error :partial)" (car --cl-keys--)))))) (if method (progn (plist-put args :method (cond ((keywordp method) (substring (symbol-name method) 1)) ((and method (symbolp method)) (symbol-name method)))))) (let* ((message (cons ':jsonrpc (cons "2.0" args))) (json (jsonrpc--json-encode message)) (headers (list (cons "Content-Length" (format "%d" (string-bytes json)))))) (process-send-string (jsonrpc--process connection) (let* ((--cl-var-- headers) (value nil) (header nil) (header-section "")) (while (consp --cl-var--) (setq value (car --cl-var--) header (car-safe (prog1 value (setq value (cdr value))))) (setq header-section (concat header-section (concat header ": " value "\015\n"))) (setq --cl-var-- (cdr --cl-var--))) (format "%s\015\n%s" header-section json))) (jsonrpc--log-event connection message 'client)))
  (let* ((_id (car (cdr (plist-member args ':id)))) (method (car (cdr (plist-member args ':method)))) (_params (car (cdr (plist-member args ':params)))) (_result (car (cdr (plist-member args ':result)))) (_error (car (cdr (plist-member args ':error)))) (_partial (car (cdr (plist-member args ':partial))))) (progn (let ((--cl-keys-- args)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:id :method :params :result :error :partial :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ':allow-other-keys args))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:id :method :params :result :error :partial)" (car --cl-keys--)))))) (if method (progn (plist-put args :method (cond ((keywordp method) (substring (symbol-name method) 1)) ((and method (symbolp method)) (symbol-name method)))))) (let* ((message (cons ':jsonrpc (cons "2.0" args))) (json (jsonrpc--json-encode message)) (headers (list (cons "Content-Length" (format "%d" (string-bytes json)))))) (process-send-string (jsonrpc--process connection) (let* ((--cl-var-- headers) (value nil) (header nil) (header-section "")) (while (consp --cl-var--) (setq value (car --cl-var--) header (car-safe (prog1 value (setq value (cdr value))))) (setq header-section (concat header-section (concat header ": " value "\015\n"))) (setq --cl-var-- (cdr --cl-var--))) (format "%s\015\n%s" header-section json))) (jsonrpc--log-event connection message 'client))))
  (progn (let* ((_id (car (cdr (plist-member args ':id)))) (method (car (cdr (plist-member args ':method)))) (_params (car (cdr (plist-member args ':params)))) (_result (car (cdr (plist-member args ':result)))) (_error (car (cdr (plist-member args ':error)))) (_partial (car (cdr (plist-member args ':partial))))) (progn (let ((--cl-keys-- args)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:id :method :params :result :error :partial :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ':allow-other-keys args))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:id :method :params :result :error :partial)" (car --cl-keys--)))))) (if method (progn (plist-put args :method (cond ((keywordp method) (substring (symbol-name method) 1)) ((and method (symbolp method)) (symbol-name method)))))) (let* ((message (cons ':jsonrpc (cons "2.0" args))) (json (jsonrpc--json-encode message)) (headers (list (cons "Content-Length" (format "%d" (string-bytes json)))))) (process-send-string (jsonrpc--process connection) (let* ((--cl-var-- headers) (value nil) (header nil) (header-section "")) (while (consp --cl-var--) (setq value (car --cl-var--) header (car-safe (prog1 value (setq value (cdr value))))) (setq header-section (concat header-section (concat header ": " value "\015\n"))) (setq --cl-var-- (cdr --cl-var--))) (format "%s\015\n%s" header-section json))) (jsonrpc--log-event connection message 'client)))))
  (closure (t) (connection &rest args) "Send MESSAGE, a JSON object, to CONNECTION.\n\n(fn CONNECTION &rest ARGS &key ID METHOD PARAMS RESULT ERROR PARTIAL)" (progn (let* ((_id (car (cdr (plist-member args ':id)))) (method (car (cdr (plist-member args ':method)))) (_params (car (cdr (plist-member args ':params)))) (_result (car (cdr (plist-member args ':result)))) (_error (car (cdr (plist-member args ':error)))) (_partial (car (cdr (plist-member args ':partial))))) (progn (let ((--cl-keys-- args)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:id :method :params :result :error :partial :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ':allow-other-keys args))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:id :method :params :result :error :partial)" (car --cl-keys--)))))) (if method (progn (plist-put args :method (cond ((keywordp method) (substring (symbol-name method) 1)) ((and method (symbolp method)) (symbol-name method)))))) (let* ((message (cons ':jsonrpc (cons "2.0" args))) (json (jsonrpc--json-encode message)) (headers (list (cons "Content-Length" (format "%d" (string-bytes json)))))) (process-send-string (jsonrpc--process connection) (let* ((--cl-var-- headers) (value nil) (header nil) (header-section "")) (while (consp --cl-var--) (setq value (car --cl-var--) header (car-safe (prog1 value (setq value (cdr value))))) (setq header-section (concat header-section (concat header ": " value "\015\n"))) (setq --cl-var-- (cdr --cl-var--))) (format "%s\015\n%s" header-section json))) (jsonrpc--log-event connection message 'client))))))(#<eglot-lsp-server eglot-lsp-server> :method :textDocument/didClose :params (:textDocument (:uri "file:///home/james/src/rc-argus-preasyncio/argus/util/arclogging.py")))
  apply((closure (t) (connection &rest args) "Send MESSAGE, a JSON object, to CONNECTION.\n\n(fn CONNECTION &rest ARGS &key ID METHOD PARAMS RESULT ERROR PARTIAL)" (progn (let* ((_id (car (cdr (plist-member args ':id)))) (method (car (cdr (plist-member args ':method)))) (_params (car (cdr (plist-member args ':params)))) (_result (car (cdr (plist-member args ':result)))) (_error (car (cdr (plist-member args ':error)))) (_partial (car (cdr (plist-member args ':partial))))) (progn (let ((--cl-keys-- args)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:id :method :params :result :error :partial :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ':allow-other-keys args))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:id :method :params :result :error :partial)" (car --cl-keys--)))))) (if method (progn (plist-put args :method (cond ((keywordp method) (substring (symbol-name method) 1)) ((and method (symbolp method)) (symbol-name method)))))) (let* ((message (cons ':jsonrpc (cons "2.0" args))) (json (jsonrpc--json-encode message)) (headers (list (cons "Content-Length" (format "%d" (string-bytes json)))))) (process-send-string (jsonrpc--process connection) (let* ((--cl-var-- headers) (value nil) (header nil) (header-section "")) (while (consp --cl-var--) (setq value (car --cl-var--) header (car-safe (prog1 value (setq value (cdr value))))) (setq header-section (concat header-section (concat header ": " value "\015\n"))) (setq --cl-var-- (cdr --cl-var--))) (format "%s\015\n%s" header-section json))) (jsonrpc--log-event connection message 'client)))))) #<eglot-lsp-server eglot-lsp-server> (:method :textDocument/didClose :params (:textDocument (:uri "file:///home/james/src/rc-argus-preasyncio/argus/util/arclogging.py"))))
  jsonrpc-connection-send(#<eglot-lsp-server eglot-lsp-server> :method :textDocument/didClose :params (:textDocument (:uri "file:///home/james/src/rc-argus-preasyncio/argus/util/arclogging.py")))
  jsonrpc-notify(#<eglot-lsp-server eglot-lsp-server> :textDocument/didClose (:textDocument (:uri "file:///home/james/src/rc-argus-preasyncio/argus/util/arclogging.py")))
  eglot--signal-textDocument/didClose()
  kill-buffer("arclogging.py<rc-argus-preasyncio>")
  funcall-interactively(kill-buffer "arclogging.py<rc-argus-preasyncio>")
  call-interactively(kill-buffer nil nil)
  command-execute(kill-buffer)
@joaotavora
Copy link
Owner

This seems to be a duplicate of #115. I don't understand why the fix there isn't working for you...

@WJCFerguson
Copy link
Author

I don't seem to have that fix - eglot obtained from melpa (probably melpa stable), version 1.1.

@WJCFerguson
Copy link
Author

Yep - looks like I get it from stable.melpa.org, which is on version 1.1. So I should update to the version on melpa 'unstable'...

@mkcms mkcms closed this as completed Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants