GNU bug report logs - #73472
[PATCH] Substitute quotation marks in Eglot messages

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73472 in the body.
You can then email your comments to 73472 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Wed, 25 Sep 2024 14:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Thomas Voss" <mail <at> thomasvoss.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 25 Sep 2024 14:05:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Thomas Voss" <mail <at> thomasvoss.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: [PATCH] Substitute quotation marks in Eglot messages
Date: Wed, 25 Sep 2024 16:03:32 +0200
[Message part 1 (text/plain, inline)]
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
[0001-Substitute-quotation-marks-in-Eglot-messages.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Wed, 25 Sep 2024 16:03:01 GMT) Full text and rfc822 format available.

Message #8 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Thomas Voss" <mail <at> thomasvoss.com>, João Távora
 <joaotavora <at> gmail.com>
Cc: 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Wed, 25 Sep 2024 19:01:32 +0300
> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Wed, 25 Sep 2024 18:05:01 GMT) Full text and rfc822 format available.

Message #11 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: "Thomas Voss" <mail <at> thomasvoss.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>, João Távora
 <joaotavora <at> gmail.com>
Cc: 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Wed, 25 Sep 2024 20:03:20 +0200
Hi Eli,

On Wed Sep 25, 2024 at 6:01 PM CEST, Eli Zaretskii wrote:
> > --- 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?

You’re right that it may be risky; I iterated through the usages of these
functions and nothing stood out to me as a potential location where some
unexpected behaviour might occur, although it is true that there is the
possibility.

Not sure why I didn’t think of this when creating the patch, but it’s
probably a much better idea to change this:

    (substitute-quotes (apply #'format format args))

to this:

    (apply #'format (substitute-quotes format) args)

This limits the scope of the substitution to just the format strings,
where we know no funny business is going on.  Unless you have any other
reservations I could submit a v2 of the patch to do that.

-- 
— Thomas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Thu, 26 Sep 2024 05:55:01 GMT) Full text and rfc822 format available.

Message #14 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Thomas Voss" <mail <at> thomasvoss.com>
Cc: 73472 <at> debbugs.gnu.org, joaotavora <at> gmail.com
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Thu, 26 Sep 2024 08:52:06 +0300
> Date: Wed, 25 Sep 2024 20:03:20 +0200
> From: "Thomas Voss" <mail <at> thomasvoss.com>
> Cc: <73472 <at> debbugs.gnu.org>
> 
> Not sure why I didn’t think of this when creating the patch, but it’s
> probably a much better idea to change this:
> 
>     (substitute-quotes (apply #'format format args))
> 
> to this:
> 
>     (apply #'format (substitute-quotes format) args)
> 
> This limits the scope of the substitution to just the format strings,
> where we know no funny business is going on.

That is of course better, but do we indeed know that format will never
use quote characters for something that is not quoting?

I think the caller should itself use substitute-quotes where
appropriate.

And I'd like to hear João's opinion as well.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Thu, 26 Sep 2024 06:13:01 GMT) Full text and rfc822 format available.

Message #17 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Thomas Voss <mail <at> thomasvoss.com>, 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Thu, 26 Sep 2024 07:11:05 +0100
[Message part 1 (text/plain, inline)]
On Thu, Sep 26, 2024, 06:52 Eli Zaretskii <eliz <at> gnu.org> wrote:

I think the caller should itself use substitute-quotes where
> appropriate.
>
> And I'd like to hear João's opinion as well.
>

I think I think so too. What Eglot format strings are affected by this
quote substitution? I.e. what problem is being solved here?

João

>
[Message part 2 (text/html, inline)]

Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 30 Sep 2024 01:37:29 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Sat, 05 Oct 2024 10:15:01 GMT) Full text and rfc822 format available.

Message #22 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: mail <at> thomasvoss.com, João Távora
 <joaotavora <at> gmail.com>
Cc: 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Sat, 05 Oct 2024 13:14:40 +0300
> From: João Távora <joaotavora <at> gmail.com>
> Date: Thu, 26 Sep 2024 07:11:05 +0100
> Cc: Thomas Voss <mail <at> thomasvoss.com>, 73472 <at> debbugs.gnu.org
> 
> On Thu, Sep 26, 2024, 06:52 Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>  I think the caller should itself use substitute-quotes where
>  appropriate.
> 
>  And I'd like to hear João's opinion as well.
> 
> I think I think so too. What Eglot format strings are affected by this quote substitution? I.e. what problem is
> being solved here? 

Ping!  Thomas, could you please answer João's questions?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Sat, 05 Oct 2024 12:49:02 GMT) Full text and rfc822 format available.

Message #25 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mail <at> thomasvoss.com, 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Sat, 5 Oct 2024 13:48:57 +0100
Thomas already answered, but only to me, I see:

> There are a number of them.  For example by simply enabling eglot-mode
> you’ll see a message in your minibuffer using `these quotes' which looks
> very out-of-place when the rest of the system is using ‘these quotes’.

So, if you can enumerate them, what about using quote substitution for
only those?

João




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Mon, 07 Oct 2024 08:13:01 GMT) Full text and rfc822 format available.

Message #28 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: "Thomas Voss" <mail <at> thomasvoss.com>
To: João Távora <joaotavora <at> gmail.com>, "Eli
 Zaretskii" <eliz <at> gnu.org>
Cc: 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Mon, 07 Oct 2024 10:12:00 +0200
Hi,

> > There are a number of them.  For example by simply enabling eglot-mode
> > you’ll see a message in your minibuffer using `these quotes' which looks
> > very out-of-place when the rest of the system is using ‘these quotes’.
>
> So, if you can enumerate them, what about using quote substitution for
> only those?

I can do that.  I refrained from it at first because my original patch
seemed like a much simpler solution, but I do agree that this is probably
a better approach.  When I have the time I can send through a patch for
that.
-- 
— Thomas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Mon, 07 Oct 2024 11:33:01 GMT) Full text and rfc822 format available.

Message #31 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Thomas Voss" <mail <at> thomasvoss.com>
Cc: 73472 <at> debbugs.gnu.org, joaotavora <at> gmail.com
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Mon, 07 Oct 2024 14:32:11 +0300
> Date: Mon, 07 Oct 2024 10:12:00 +0200
> Cc: <73472 <at> debbugs.gnu.org>
> From: "Thomas Voss" <mail <at> thomasvoss.com>
> 
> > > There are a number of them.  For example by simply enabling eglot-mode
> > > you’ll see a message in your minibuffer using `these quotes' which looks
> > > very out-of-place when the rest of the system is using ‘these quotes’.
> >
> > So, if you can enumerate them, what about using quote substitution for
> > only those?
> 
> I can do that.  I refrained from it at first because my original patch
> seemed like a much simpler solution, but I do agree that this is probably
> a better approach.  When I have the time I can send through a patch for
> that.

Thanks, please do.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Sat, 19 Oct 2024 07:09:01 GMT) Full text and rfc822 format available.

Message #34 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: mail <at> thomasvoss.com
Cc: 73472 <at> debbugs.gnu.org, joaotavora <at> gmail.com
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Sat, 19 Oct 2024 10:07:41 +0300
> Cc: 73472 <at> debbugs.gnu.org, joaotavora <at> gmail.com
> Date: Mon, 07 Oct 2024 14:32:11 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Date: Mon, 07 Oct 2024 10:12:00 +0200
> > Cc: <73472 <at> debbugs.gnu.org>
> > From: "Thomas Voss" <mail <at> thomasvoss.com>
> > 
> > > > There are a number of them.  For example by simply enabling eglot-mode
> > > > you’ll see a message in your minibuffer using `these quotes' which looks
> > > > very out-of-place when the rest of the system is using ‘these quotes’.
> > >
> > > So, if you can enumerate them, what about using quote substitution for
> > > only those?
> > 
> > I can do that.  I refrained from it at first because my original patch
> > seemed like a much simpler solution, but I do agree that this is probably
> > a better approach.  When I have the time I can send through a patch for
> > that.
> 
> Thanks, please do.

Ping!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Sat, 19 Oct 2024 08:35:02 GMT) Full text and rfc822 format available.

Message #37 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: "Thomas Voss" <mail <at> thomasvoss.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 73472 <at> debbugs.gnu.org, joaotavora <at> gmail.com
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Sat, 19 Oct 2024 10:33:14 +0200
> > > I can do that.  I refrained from it at first because my original patch
> > > seemed like a much simpler solution, but I do agree that this is probably
> > > a better approach.  When I have the time I can send through a patch for
> > > that.
> > 
> > Thanks, please do.
>
> Ping!

I’ll see if I can send through a patch this weekend.  I’ve been a bit
busy with life things (I moved countries recently) but I’ve got most of
everything sorted now.

-- 
— Thomas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Mon, 21 Oct 2024 22:00:02 GMT) Full text and rfc822 format available.

Message #40 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: "Thomas Voss" <mail <at> thomasvoss.com>
To: "Thomas Voss" <mail <at> thomasvoss.com>, "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 73472 <at> debbugs.gnu.org, joaotavora <at> gmail.com
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Mon, 21 Oct 2024 23:58:42 +0200
[Message part 1 (text/plain, inline)]
On Sat Oct 19, 2024 at 10:33 AM CEST, Thomas Voss wrote:
> > > > I can do that.  I refrained from it at first because my original patch
> > > > seemed like a much simpler solution, but I do agree that this is probably
> > > > a better approach.  When I have the time I can send through a patch for
> > > > that.
> > > 
> > > Thanks, please do.
> >
> > Ping!
>
> I’ll see if I can send through a patch this weekend.  I’ve been a bit
> busy with life things (I moved countries recently) but I’ve got most of
> everything sorted now.

Hi,

I had some time today to quickly put together a patch.  You can find it
attachted to this email.

-- 
— Thomas
[v2-0001-Substitute-quotation-marks-in-Eglot-messages.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Sat, 09 Nov 2024 09:10:02 GMT) Full text and rfc822 format available.

Message #43 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Thomas Voss" <mail <at> thomasvoss.com>, joaotavora <at> gmail.com
Cc: mail <at> thomasvoss.com, 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Sat, 09 Nov 2024 11:09:33 +0200
> Date: Mon, 21 Oct 2024 23:58:42 +0200
> Cc: <73472 <at> debbugs.gnu.org>, <joaotavora <at> gmail.com>
> From: "Thomas Voss" <mail <at> thomasvoss.com>
> 
> On Sat Oct 19, 2024 at 10:33 AM CEST, Thomas Voss wrote:
> > > > > I can do that.  I refrained from it at first because my original patch
> > > > > seemed like a much simpler solution, but I do agree that this is probably
> > > > > a better approach.  When I have the time I can send through a patch for
> > > > > that.
> > > > 
> > > > Thanks, please do.
> > >
> > > Ping!
> >
> > I’ll see if I can send through a patch this weekend.  I’ve been a bit
> > busy with life things (I moved countries recently) but I’ve got most of
> > everything sorted now.
> 
> Hi,
> 
> I had some time today to quickly put together a patch.  You can find it
> attachted to this email.

Thanks.  João, any comments?

My only comment is that the log message says "format-prompt", but the
code actually uses substitute-quotes.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Sat, 09 Nov 2024 09:22:02 GMT) Full text and rfc822 format available.

Message #46 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: "Thomas Voss" <mail <at> thomasvoss.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>, <joaotavora <at> gmail.com>
Cc: 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Sat, 09 Nov 2024 10:20:43 +0100
> My only comment is that the log message says "format-prompt", but the
> code actually uses substitute-quotes.
Ah my bad there.  The Emacs-style of commit messages is still strange to
me so I just copy+pasted my prior commit message to make sure I got it
right.  I guess I forgot to update the text with the correct function
name.

— Thomas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Sat, 23 Nov 2024 12:12:02 GMT) Full text and rfc822 format available.

Message #49 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: joaotavora <at> gmail.com
Cc: mail <at> thomasvoss.com, 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Sat, 23 Nov 2024 14:11:38 +0200
Ping!

> Cc: mail <at> thomasvoss.com, 73472 <at> debbugs.gnu.org
> Date: Sat, 09 Nov 2024 11:09:33 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Date: Mon, 21 Oct 2024 23:58:42 +0200
> > Cc: <73472 <at> debbugs.gnu.org>, <joaotavora <at> gmail.com>
> > From: "Thomas Voss" <mail <at> thomasvoss.com>
> > 
> > On Sat Oct 19, 2024 at 10:33 AM CEST, Thomas Voss wrote:
> > > > > > I can do that.  I refrained from it at first because my original patch
> > > > > > seemed like a much simpler solution, but I do agree that this is probably
> > > > > > a better approach.  When I have the time I can send through a patch for
> > > > > > that.
> > > > > 
> > > > > Thanks, please do.
> > > >
> > > > Ping!
> > >
> > > I’ll see if I can send through a patch this weekend.  I’ve been a bit
> > > busy with life things (I moved countries recently) but I’ve got most of
> > > everything sorted now.
> > 
> > Hi,
> > 
> > I had some time today to quickly put together a patch.  You can find it
> > attachted to this email.
> 
> Thanks.  João, any comments?
> 
> My only comment is that the log message says "format-prompt", but the
> code actually uses substitute-quotes.
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Fri, 29 Nov 2024 08:28:02 GMT) Full text and rfc822 format available.

Message #52 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: "Thomas Voss" <mail <at> thomasvoss.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>, <joaotavora <at> gmail.com>
Cc: 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Fri, 29 Nov 2024 09:27:44 +0100
Hi, sorry for the delay.  I’m a bit busy at the moment but I’ll get to
this soon.

— Thomas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Thu, 12 Dec 2024 10:51:02 GMT) Full text and rfc822 format available.

Message #55 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Thomas Voss" <mail <at> thomasvoss.com>
Cc: 73472 <at> debbugs.gnu.org, joaotavora <at> gmail.com
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Thu, 12 Dec 2024 12:49:59 +0200
> Date: Mon, 09 Dec 2024 19:01:28 +0100
> From: "Thomas Voss" <mail <at> thomasvoss.com>
> 
> Apologies for the long delay; I have been super busy recently.
> 
> > Ping!
> >
> > > Thanks.  João, any comments?
> > > 
> > > My only comment is that the log message says "format-prompt", but the
> > > code actually uses substitute-quotes.
> 
> Uh… are we looking at the same patch?  The log message in the patch I
> last sent does say ‘substitute-quotes’ for all the places where I used
> that function, and only says ‘format-prompt’ for the place where I used
> that function (‘eglot-rename’).
> 
> Just in case, I attached the patch again to this email.

Thanks.

João, are you okay with me installing this?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Thu, 12 Dec 2024 11:00:02 GMT) Full text and rfc822 format available.

Message #58 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Thomas Voss <mail <at> thomasvoss.com>, 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Thu, 12 Dec 2024 10:57:48 +0000
On Thu, Dec 12, 2024 at 10:50 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > Date: Mon, 09 Dec 2024 19:01:28 +0100
> > From: "Thomas Voss" <mail <at> thomasvoss.com>
> >
> > Apologies for the long delay; I have been super busy recently.
> >
> > > Ping!
> > >
> > > > Thanks.  João, any comments?
> > > >
> > > > My only comment is that the log message says "format-prompt", but the
> > > > code actually uses substitute-quotes.
> >
> > Uh… are we looking at the same patch?  The log message in the patch I
> > last sent does say ‘substitute-quotes’ for all the places where I used
> > that function, and only says ‘format-prompt’ for the place where I used
> > that function (‘eglot-rename’).
> >
> > Just in case, I attached the patch again to this email.
>
> Thanks.
>
> João, are you okay with me installing this?

Just had a look. The patch won't break anything, but it has some problems
around the part where substitute quotes isn't around a literal, but wraps
a bigger block.  I'll try to fix it.  It would also be great to have some file
local symbol-shortening mechanism to avoid that long name, but I'm
not going to worry about that.

João




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Sat, 28 Dec 2024 11:01:02 GMT) Full text and rfc822 format available.

Message #61 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: mail <at> thomasvoss.com, 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Sat, 28 Dec 2024 13:00:19 +0200
> From: João Távora <joaotavora <at> gmail.com>
> Date: Thu, 12 Dec 2024 10:57:48 +0000
> Cc: Thomas Voss <mail <at> thomasvoss.com>, 73472 <at> debbugs.gnu.org
> 
> On Thu, Dec 12, 2024 at 10:50 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > > Date: Mon, 09 Dec 2024 19:01:28 +0100
> > > From: "Thomas Voss" <mail <at> thomasvoss.com>
> > >
> > > Apologies for the long delay; I have been super busy recently.
> > >
> > > > Ping!
> > > >
> > > > > Thanks.  João, any comments?
> > > > >
> > > > > My only comment is that the log message says "format-prompt", but the
> > > > > code actually uses substitute-quotes.
> > >
> > > Uh… are we looking at the same patch?  The log message in the patch I
> > > last sent does say ‘substitute-quotes’ for all the places where I used
> > > that function, and only says ‘format-prompt’ for the place where I used
> > > that function (‘eglot-rename’).
> > >
> > > Just in case, I attached the patch again to this email.
> >
> > Thanks.
> >
> > João, are you okay with me installing this?
> 
> Just had a look. The patch won't break anything, but it has some problems
> around the part where substitute quotes isn't around a literal, but wraps
> a bigger block.  I'll try to fix it.  It would also be great to have some file
> local symbol-shortening mechanism to avoid that long name, but I'm
> not going to worry about that.

Ping!  Did you have time to look into this?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Sat, 28 Dec 2024 13:32:01 GMT) Full text and rfc822 format available.

Message #64 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Thomas Voss <mail <at> thomasvoss.com>, 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Sat, 28 Dec 2024 13:29:44 +0000
[Message part 1 (text/plain, inline)]
On Sat, Dec 28, 2024, 11:00 Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: João Távora <joaotavora <at> gmail.com>
> > Date: Thu, 12 Dec 2024 10:57:48 +0000
> > Cc: Thomas Voss <mail <at> thomasvoss.com>, 73472 <at> debbugs.gnu.org
> >
> > On Thu, Dec 12, 2024 at 10:50 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > >
> > > > Date: Mon, 09 Dec 2024 19:01:28 +0100
> > > > From: "Thomas Voss" <mail <at> thomasvoss.com>
> > > >
> > > > Apologies for the long delay; I have been super busy recently.
> > > >
> > > > > Ping!
> > > > >
> > > > > > Thanks.  João, any comments?
> > > > > >
> > > > > > My only comment is that the log message says "format-prompt",
> but the
> > > > > > code actually uses substitute-quotes.
> > > >
> > > > Uh… are we looking at the same patch?  The log message in the patch I
> > > > last sent does say ‘substitute-quotes’ for all the places where I
> used
> > > > that function, and only says ‘format-prompt’ for the place where I
> used
> > > > that function (‘eglot-rename’).
> > > >
> > > > Just in case, I attached the patch again to this email.
> > >
> > > Thanks.
> > >
> > > João, are you okay with me installing this?
> >
> > Just had a look. The patch won't break anything, but it has some problems
> > around the part where substitute quotes isn't around a literal, but wraps
> > a bigger block.  I'll try to fix it.  It would also be great to have
> some file
> > local symbol-shortening mechanism to avoid that long name, but I'm
> > not going to worry about that.
>
> Ping!  Did you have time to look into this?
>

No sorry. Fixed a much more serious but though. Early 2025 I will fix this
patch, it's easy.

João
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73472; Package emacs. (Sat, 28 Dec 2024 15:54:02 GMT) Full text and rfc822 format available.

Message #67 received at 73472 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Thomas Voss <mail <at> thomasvoss.com>, 73472 <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Sat, 28 Dec 2024 15:52:04 +0000
[Message part 1 (text/plain, inline)]
Sorry, I meant to write "fixed a much more serious one". João


On Sat, Dec 28, 2024, 13:29 João Távora <joaotavora <at> gmail.com> wrote:

>
>
> On Sat, Dec 28, 2024, 11:00 Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > From: João Távora <joaotavora <at> gmail.com>
>> > Date: Thu, 12 Dec 2024 10:57:48 +0000
>> > Cc: Thomas Voss <mail <at> thomasvoss.com>, 73472 <at> debbugs.gnu.org
>> >
>> > On Thu, Dec 12, 2024 at 10:50 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>> > >
>> > > > Date: Mon, 09 Dec 2024 19:01:28 +0100
>> > > > From: "Thomas Voss" <mail <at> thomasvoss.com>
>> > > >
>> > > > Apologies for the long delay; I have been super busy recently.
>> > > >
>> > > > > Ping!
>> > > > >
>> > > > > > Thanks.  João, any comments?
>> > > > > >
>> > > > > > My only comment is that the log message says "format-prompt",
>> but the
>> > > > > > code actually uses substitute-quotes.
>> > > >
>> > > > Uh… are we looking at the same patch?  The log message in the patch
>> I
>> > > > last sent does say ‘substitute-quotes’ for all the places where I
>> used
>> > > > that function, and only says ‘format-prompt’ for the place where I
>> used
>> > > > that function (‘eglot-rename’).
>> > > >
>> > > > Just in case, I attached the patch again to this email.
>> > >
>> > > Thanks.
>> > >
>> > > João, are you okay with me installing this?
>> >
>> > Just had a look. The patch won't break anything, but it has some
>> problems
>> > around the part where substitute quotes isn't around a literal, but
>> wraps
>> > a bigger block.  I'll try to fix it.  It would also be great to have
>> some file
>> > local symbol-shortening mechanism to avoid that long name, but I'm
>> > not going to worry about that.
>>
>> Ping!  Did you have time to look into this?
>>
>
> No sorry. Fixed a much more serious but though. Early 2025 I will fix this
> patch, it's easy.
>
> João
>
[Message part 2 (text/html, inline)]

Reply sent to João Távora <joaotavora <at> gmail.com>:
You have taken responsibility. (Mon, 06 Jan 2025 10:54:02 GMT) Full text and rfc822 format available.

Notification sent to "Thomas Voss" <mail <at> thomasvoss.com>:
bug acknowledged by developer. (Mon, 06 Jan 2025 10:54:02 GMT) Full text and rfc822 format available.

Message #72 received at 73472-done <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mail <at> thomasvoss.com, 73472-done <at> debbugs.gnu.org
Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages
Date: Mon, 06 Jan 2025 10:53:47 +0000
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: João Távora <joaotavora <at> gmail.com>
>> Date: Thu, 12 Dec 2024 10:57:48 +0000
>> Cc: Thomas Voss <mail <at> thomasvoss.com>, 73472 <at> debbugs.gnu.org
>> 
>> On Thu, Dec 12, 2024 at 10:50 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>> >
>> > > Date: Mon, 09 Dec 2024 19:01:28 +0100
>> > > From: "Thomas Voss" <mail <at> thomasvoss.com>
>> > >
>> > > Apologies for the long delay; I have been super busy recently.
>> > >
>> > > > Ping!
>> > > >
>> > > > > Thanks.  João, any comments?
>> > > > >
>> > > > > My only comment is that the log message says "format-prompt", but the
>> > > > > code actually uses substitute-quotes.
>> > >
>> > > Uh… are we looking at the same patch?  The log message in the patch I
>> > > last sent does say ‘substitute-quotes’ for all the places where I used
>> > > that function, and only says ‘format-prompt’ for the place where I used
>> > > that function (‘eglot-rename’).
>> > >
>> > > Just in case, I attached the patch again to this email.
>> >
>> > Thanks.
>> >
>> > João, are you okay with me installing this?
>> 
>> Just had a look. The patch won't break anything, but it has some problems
>> around the part where substitute quotes isn't around a literal, but wraps
>> a bigger block.  I'll try to fix it.  It would also be great to have some file
>> local symbol-shortening mechanism to avoid that long name, but I'm
>> not going to worry about that.
>
> Ping!  Did you have time to look into this?

Alright.  I finally looked into Thomas' patch properly, and fixed the
problems it had.

I can produce that patch if anyone's interested.  But looking at it,
it's just way too verbose: the long 'substitute-quotes' sprinkled
everywhere is hideos, shame we can't use shorthands or have a reader
macro for that.

So I opted to bring `substitute-quotes` into a new `eglot--format`
helper and use it in eglot--error, eglot--warn, etc.  Which is ugly in
itself (I don't like my helpers to do this kind of stuff), but given the
situation and my want to kill this bug, it'll do.  Closing the bug.

João




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 03 Feb 2025 12:24:13 GMT) Full text and rfc822 format available.

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.