Subject: Re: bug#73472: [PATCH] Substitute quotation marks in Eglot messages

From: João Távora <[email-masked]>
Date: Mon, 06 Jan 2025 10:53:47 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: João Távora <[email-masked]>
>> Date: Thu, 12 Dec 2024 10:57:48 +0000
>> Cc: Thomas Voss <[email-masked]>, [email-masked]
>> 
>> On Thu, Dec 12, 2024 at 10:50 AM Eli Zaretskii <[email-masked]> wrote:
>> >
>> > > Date: Mon, 09 Dec 2024 19:01:28 +0100
>> > > From: "Thomas Voss" <[email-masked]>
>> > >
>> > > 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