unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: 67682@debbugs.gnu.org
Subject: bug#67682: 30.0.50; M-u M-x eglot localhost:4567 doesn't connect
Date: Fri, 8 Dec 2023 11:19:48 +0000	[thread overview]
Message-ID: <CALDnm53c9g_i6iJLJ0pTSj2E7_4fh7rv1zk4-Xn=KZZSPX+=gg@mail.gmail.com> (raw)
In-Reply-To: <m2plzi8isd.fsf@gmail.com>

On Thu, Dec 7, 2023 at 9:28 AM Helmut Eller <eller.helmut@gmail.com> wrote:
>
> When I try:
>
>   M-u M-x eglot localhost:4567
>
> then I get:
>
>   No such file or directory, localhost:4567
>
> ISTR, that this worked in the past.

Confirm.  Broken in

commit 523547321e4caca6fc966bd71ecd7b60a6e98f73
Author: João Távora <joaotavora@gmail.com>
Date:   Sat Sep 17 21:40:34 2022 +0100

    Allow :initializationoptions in eglot-server-programs

...for more than one year, probably means very few people
are using this.  May I ask what your LS is? .  Please try
the untested patch after my sig.

João

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index d410367f902..248199641e3 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -1280,14 +1280,21 @@ eglot--guess-contact
                          (concat "`%s' not found in PATH, but can't form"
                                  " an interactive prompt for to fix %s!")
                          program guess))))))
+         (user-input (and prompt
+                          (read-shell-command
+                           prompt
+                           full-program-invocation
+                           'eglot-command-history)))
          (contact
-          (or (and prompt
-                   (split-string-and-unquote
-                    (read-shell-command
-                     prompt
-                     full-program-invocation
-                     'eglot-command-history)))
-              guess)))
+          (cond ((and user-input
+                      (string-match
"^[\s\t]*\\(.*\\):\\([[:digit:]]+\\)[\s\t]*$"
+                                    user-input))
+                 (list (match-string 1 user-input)
+                       (string-to-number (match-string 2 user-input))))
+                (user-input
+                 (split-string-and-unquote user-input))
+                (t
+                 guess))))
     (list managed-modes (eglot--current-project) class contact language-ids)))

 (defvar eglot-lsp-context)





  reply	other threads:[~2023-12-08 11:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07  9:26 bug#67682: 30.0.50; M-u M-x eglot localhost:4567 doesn't connect Helmut Eller
2023-12-08 11:19 ` João Távora [this message]
2023-12-08 13:31   ` Helmut Eller
2023-12-08 19:17     ` João Távora
2023-12-09 11:09       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDnm53c9g_i6iJLJ0pTSj2E7_4fh7rv1zk4-Xn=KZZSPX+=gg@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=67682@debbugs.gnu.org \
    --cc=eller.helmut@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).