GNU bug report logs - #60557
[PATCH] Fix eglot prompt when connection already exists

Previous Next

Package: emacs;

Reported by: Evgeni Kolev <evgeni.d.kolev <at> gmail.com>

Date: Wed, 4 Jan 2023 15:46:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: João Távora <joaotavora <at> gmail.com>
To: Evgeni Kolev <evgeni.d.kolev <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 60557 <at> debbugs.gnu.org
Subject: Re: bug#60557: [PATCH] Fix eglot prompt when connection already exists
Date: Sat, 14 Jan 2023 17:22:38 +0000
[Message part 1 (text/plain, inline)]
On Sat, Jan 14, 2023 at 6:03 AM Evgeni Kolev <evgeni.d.kolev <at> gmail.com>
wrote:
>
> Hi João, thank you for the detailed reply.
>
> Could you confirm I correctly understand proposal 2.1)? Example
interactions:
>
> - M-x eglot RET ;; eglot guesses correctly the CONTACT
> - live connection exists?
>     - no - new connection
>     - yes - disconnect + new connection

Correct.

> - M-x eglot /some/path RET ;; eglot can't guess so prompts the user
> - live connection exists?
>     - no - new connection
>     - yes - disconnect + new connection

Correct, according to 2.1.

> If I understand correctly, 2.1) always disconnects + reconnects.

Yes, that is correct.

> Regarding 2.2), I don't fully understand it - could you clarify how
> 2.2) is different from the _user's_ perspective?

In 2.2, the user is *first* prompted yes/no to make a new connection.
Only then is the user potentially asked to enter new contact
information.  In 2.1, this order is reversed.

If the user answers "no", the order in 2.1 does not make much
 sense because the work that the user has put in to enter a new
contact is mostly wasted.  This is why 2.2 is preferrable, even if
its implementation is probably slightly more complicated.

> I'm also thinking about option 3) making M-x eglot able to detect a
> change in CONTACT:
>
> - M-x eglot RET
> - live connection exists?
>     - no - new connection
>     - yes - new CONTACT provided?
>         - no - reconnect to old CONTACT
>         - yes - disconnect + new connection to new CONTACT

I think this is too complicated.

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

This bug report was last modified 2 years and 178 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.