summaryrefslogtreecommitdiff
path: root/lisp/textmodes/reftex-vars.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2022-12-22 11:29:49 +0000
committerJoão Távora <joaotavora@gmail.com>2022-12-22 11:30:19 +0000
commitbbe35c280c2bf9fb2fd9b6e33b2950b8fae67e2c (patch)
tree0ec21ea308e79ede56484d8fc713b5d6f750b981 /lisp/textmodes/reftex-vars.el
parent9bf13a3fb9e197dfa741625fb7089ee7924cc581 (diff)
downloademacs-bbe35c280c2bf9fb2fd9b6e33b2950b8fae67e2c.tar.gz
emacs-bbe35c280c2bf9fb2fd9b6e33b2950b8fae67e2c.tar.bz2
emacs-bbe35c280c2bf9fb2fd9b6e33b2950b8fae67e2c.zip
Prevent stale servers when using eglot-extend-to-xref
A weak-valued hash-table is not enough to guarantee that a reference to a zombie server in eglot--servers-by-xrefed-file variable won't survive long enough to confuse the next call to eglot--current-server in some buffers. So, before this fix it was common to get "Process EGLOT ... not running" errors if some xref-extended buffers (like system libraries) were open and M-x eglot-reconnect was issued. This should be prevented now. Note however, that even after this the eglot-extend-to-xref logic is still flawed. For example, if a buffer for the xref-extended buffer happens to be already visited by the time M-. is issued to navigate to it, Eglot won't be activated. A half-decent workaround is to kill the buffer and re-visit it. * lisp/progmodes/eglot.el (eglot--servers-by-xrefed-file): Move up. (eglot--on-shutdown): Make sure to cleanup eglot--servers-by-xrefed-file.
Diffstat (limited to 'lisp/textmodes/reftex-vars.el')
0 files changed, 0 insertions, 0 deletions