From: João Távora Date: Sun, 3 May 2020 20:59:29 +0000 (+0100) Subject: Simplify bug-reporting instructions X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~225 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1091226b3a65d9e4a324691a65db46b47e76d9b1;p=emacs.git Simplify bug-reporting instructions We assume the user has a recent enough jsonrpc.el that consolidates events and stderr int the same transcript. * README.md (Reporting bugs): Simplify instructions. * eglot.el (eglot-events-buffer): Can work with no server. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index d172f4c7cc8..03609a128c3 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -808,9 +808,15 @@ INTERACTIVE is t if called interactively." (add-hook 'post-command-hook #'maybe-connect 'append nil))))) (defun eglot-events-buffer (server) - "Display events buffer for SERVER." - (interactive (list (eglot--current-server-or-lose))) - (display-buffer (jsonrpc-events-buffer server))) + "Display events buffer for SERVER. +Use current server's or first available Eglot events buffer." + (interactive (list eglot--cached-server)) + (let ((buffer (if server (jsonrpc-events-buffer server) + (cl-find "\\*EGLOT.*events\\*" + (buffer-list) + :key #'buffer-name :test #'string-match)))) + (if buffer (display-buffer buffer) + (eglot--error "Can't find an Eglot events buffer!")))) (defun eglot-stderr-buffer (server) "Display stderr buffer for SERVER."