GNU bug report logs -
#73472
[PATCH] Substitute quotation marks in Eglot messages
Previous Next
Reported by: "Thomas Voss" <mail <at> thomasvoss.com>
Date: Wed, 25 Sep 2024 14:05:02 UTC
Severity: wishlist
Tags: patch
Done: João Távora <joaotavora <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Wed, 25 Sep 2024 16:03:32 +0200
> From: "Thomas Voss" via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Another quick patch from myself. This patch makes it so that the
> diagnostics and interactive prompts from Eglot (such as the prompt you
> iteract with when renaming a symbol) properly respect
> ‘text-quoting-style’.
Thanks.
> --- a/lisp/progmodes/eglot.el
> +++ b/lisp/progmodes/eglot.el
> @@ -1698,11 +1698,11 @@ eglot--connect
> ;;;
> (defun eglot--error (format &rest args)
> "Error out with FORMAT with ARGS."
> - (error "[eglot] %s" (apply #'format format args)))
> + (error "[eglot] %s" (substitute-quotes (apply #'format format args))))
>
> (defun eglot--message (format &rest args)
> "Message out with FORMAT with ARGS."
> - (message "[eglot] %s" (apply #'format format args)))
> + (message "[eglot] %s" (substitute-quotes (apply #'format format args))))
>
> (defun eglot--warn (format &rest args)
> "Warning message with FORMAT and ARGS."
> @@ -3704,8 +3704,8 @@ eglot-rename
> "Rename the current symbol to NEWNAME."
> (interactive
> (list (read-from-minibuffer
> - (format "Rename `%s' to: " (or (thing-at-point 'symbol t)
> - "unknown symbol"))
> + (format-prompt "Rename `%s' to" nil (or (thing-at-point 'symbol t)
> + "unknown symbol"))
> nil nil nil nil
> (symbol-name (symbol-at-point)))))
> (eglot-server-capable-or-lose :renameProvider)
Hmm... in the first two changes, how do we know that the quote
characters are indeed quoting stuff in the context where we substitute
quotes according to quoting-style? Those functions get strings they
know nothing about, so it looks a bit risky to blindly convert any
quoting characters there. Or what am I missing?
This bug report was last modified 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.