all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#73472: [PATCH] Substitute quotation marks in Eglot messages
@ 2024-09-25 14:03 Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-09-25 16:01 ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-09-25 14:03 UTC (permalink / raw)
  To: 73472


[-- Attachment #1.1: Type: text/plain, Size: 251 bytes --]

Hi all,

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’.

-- 
— Thomas

[-- Attachment #2: 0001-Substitute-quotation-marks-in-Eglot-messages.patch --]
[-- Type: text/x-patch, Size: 1788 bytes --]

From 2038b983a751a2e26c2e8a0b8d55ade29fb394fd Mon Sep 17 00:00:00 2001
From: Thomas Voss <mail@thomasvoss.com>
Date: Wed, 25 Sep 2024 15:51:36 +0200
Subject: [PATCH] Substitute quotation marks in Eglot messages

* lisp/progmodes/eglot.el (eglot--error) (eglot--message): Wrap the
message in `substitute-quotes'.
* lisp/progmodes/eglot.el (eglot-rename): Format the prompt using
`format-prompt' as opposed to `format'.

Copyright-paperwork-exempt: yes
---
 lisp/progmodes/eglot.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index a358b82..ee52767 100644
--- 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)
-- 
2.46.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-12-12 10:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-25 14:03 bug#73472: [PATCH] Substitute quotation marks in Eglot messages Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-25 16:01 ` Eli Zaretskii
2024-09-25 18:03   ` Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-09-26  5:52     ` Eli Zaretskii
2024-09-26  6:11       ` João Távora
2024-10-05 10:14         ` Eli Zaretskii
2024-10-05 12:48           ` João Távora
2024-10-07  8:12             ` Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-07 11:32               ` Eli Zaretskii
2024-10-19  7:07                 ` Eli Zaretskii
2024-10-19  8:33                   ` Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-21 21:58                     ` Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-09  9:09                       ` Eli Zaretskii
2024-11-09  9:20                         ` Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-23 12:11                         ` Eli Zaretskii
2024-11-29  8:27                           ` Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                           ` <D67D7KRE11VT.2VSGQYKYR6Q6F@thomasvoss.com>
2024-12-12 10:49                             ` Eli Zaretskii
2024-12-12 10:57                               ` João Távora

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.