From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: xiliuya 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: Sun, 16 Apr 2023 20:29:18 +0800 Message-ID: <87h6tg3sne.fsf@aliyun.com> References: <87zg7dido0.fsf@aliyun.com> <83cz45efgq.fsf@gnu.org> <87pm8548pb.fsf@aliyun.com> <87ttxg4hd9.fsf@aliyun.com> <87zg78yth9.fsf@gmail.com> Reply-To: xiliuya 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="38425"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.3; emacs 29.0.90 Cc: Ruijie Yu , Eli Zaretskii , 62795@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 16 14:43:19 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 1po1iw-0009qe-Kt for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Apr 2023 14:43:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1po1ii-0005In-Bf; Sun, 16 Apr 2023 08:43:04 -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 1po1ig-0005IZ-E1 for bug-gnu-emacs@gnu.org; Sun, 16 Apr 2023 08:43:02 -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 1po1ig-0002LX-4j for bug-gnu-emacs@gnu.org; Sun, 16 Apr 2023 08:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1po1if-0000lu-Qu for bug-gnu-emacs@gnu.org; Sun, 16 Apr 2023 08:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: xiliuya Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Apr 2023 12:43:01 +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.16816489702942 (code B ref 62795); Sun, 16 Apr 2023 12:43:01 +0000 Original-Received: (at 62795) by debbugs.gnu.org; 16 Apr 2023 12:42:50 +0000 Original-Received: from localhost ([127.0.0.1]:50767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1po1iU-0000lO-IA for submit@debbugs.gnu.org; Sun, 16 Apr 2023 08:42:50 -0400 Original-Received: from out30-84.freemail.mail.aliyun.com ([115.124.30.84]:34149) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1po1iR-0000l4-LB for 62795@debbugs.gnu.org; Sun, 16 Apr 2023 08:42:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aliyun.com; s=s1024; t=1681648958; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=znHMlirFeMeEF5Ty0WZPwtF9xeZY5kLIiWojp0wpq1M=; b=LiOKyG+tbbxHj25pyFO1OPgoomUN5phCknoGeYNdUa0VEQpLvqeY5iFuxlkMVSfYlMnI1WUA8WsPzjRAvtPis1ePfXD4+6ORBajiEgjxWzDFqpsPguCOVTWqWjfbdUqoSI4J1TBuM0PmJuVGJK1KMpwiHdEOSh9PNwy+6gLdD2g= X-Alimail-AntiSpam: AC=CONTINUE; BC=0.08152671|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.218397-0.00045355-0.78115; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018045192; MF=xiliuya@aliyun.com; NM=1; PH=DS; RN=4; RT=4; SR=0; TI=SMTPD_---0VgA.jOi_1681648951; Original-Received: from xiliuya-pc(mailfrom:xiliuya@aliyun.com fp:SMTPD_---0VgA.jOi_1681648951) by smtp.aliyun-inc.com; Sun, 16 Apr 2023 20:42:35 +0800 In-reply-to: <87zg78yth9.fsf@gmail.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:260118 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > If it's not clear, let us know. Yes, that's clear. It was my misunderstanding. > Another detail: I think the use of `awk` can probably be be optimized > away Elisp code for processing text. Same for the shell use of $HOME > which is also has an Elisp abstraction (see docstring of > `expand-file-name`). In theory, you don't need shell-command-to-string > at all. 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/121) --=20 xiliuya :)