From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ruijie Yu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62795: 29.0.90; eglot: gdscript default port is 6005 Date: Mon, 17 Apr 2023 15:33:40 +0800 Message-ID: References: <87zg7dido0.fsf@aliyun.com> <83cz45efgq.fsf@gnu.org> <87pm8548pb.fsf@aliyun.com> <87ttxg4hd9.fsf@aliyun.com> <87zg78yth9.fsf@gmail.com> <87h6tg3sne.fsf@aliyun.com> Reply-To: Ruijie Yu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35963"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.22; emacs 30.0.50 Cc: Eli Zaretskii , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , 62795@debbugs.gnu.org To: xiliuya Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 17 09:35:47 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1poJOt-0009BG-Mq for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Apr 2023 09:35:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1poJNc-0004xM-3y; Mon, 17 Apr 2023 03:34:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1poJNI-0004sz-6e for bug-gnu-emacs@gnu.org; Mon, 17 Apr 2023 03:34:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1poJNH-0000aY-QS for bug-gnu-emacs@gnu.org; Mon, 17 Apr 2023 03:34:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1poJNH-0005Hk-MK for bug-gnu-emacs@gnu.org; Mon, 17 Apr 2023 03:34:07 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ruijie Yu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Apr 2023 07:34:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62795 X-GNU-PR-Package: emacs Original-Received: via spool by 62795-submit@debbugs.gnu.org id=B62795.168171682820183 (code B ref 62795); Mon, 17 Apr 2023 07:34:07 +0000 Original-Received: (at 62795) by debbugs.gnu.org; 17 Apr 2023 07:33:48 +0000 Original-Received: from localhost ([127.0.0.1]:53081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poJMy-0005FT-86 for submit@debbugs.gnu.org; Mon, 17 Apr 2023 03:33:48 -0400 Original-Received: from netyu.xyz ([152.44.41.246]:43670 helo=mail.netyu.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poJMw-0005FL-GZ for 62795@debbugs.gnu.org; Mon, 17 Apr 2023 03:33:46 -0400 Original-Received: from fw.net.yu.netyu.xyz ( [14.26.19.253]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 65d3f012 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 17 Apr 2023 07:33:45 +0000 (UTC) In-reply-to: <87h6tg3sne.fsf@aliyun.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260175 Archived-At: xiliuya via "Bug reports for GNU Emacs, the Swiss army knife of text editor= s" writes: > I have modified it according to your suggestion, is that OK? > I tested it locally and it works. > > ```emacs-lisp > (defun gdscript-eglot-contact (&optional _interactive) > "Produce a suitable value for LSP contact in `eglot-server-programs'." > (list "localhost" > (string-to-number > (with-temp-buffer > (insert-file-contents > (expand-file-name "~/.config/godot/editor_settings-4.tres")) > (goto-char (point-min)) > (goto-char (+ 39 (string-match > "network/language_server/remote_port" > (buffer-string)))) > (buffer-substring > (point) > (line-end-position)))))) > ``` > >> If the function is made simple enough and portable across operating >> systems where the Godot engine runs, then a lambda version of it can be >> added to eglot.el IMO. But it's really better to add it to >> gdscript-mode.el, wherever it is maintained. >> >> Jo=C3=A3o > > I submitted this question to the gdscript-mode codebase, but haven't > heard back yet. > [issues/121](https://github.com/godotengine/emacs-gdscript-mode/issues/12= 1) I'll try to file a PR in that repo for this function within a few hours, will send an update to this thread when done. --=20 Best, RY