From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Minor bug in eglot; managed-major-mode must be a list Date: Sun, 23 Oct 2022 10:55:33 -0700 Message-ID: <86lep6juga.fsf@stephe-leake.org> 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="22837"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 24 06:53:18 2022 Return-path: Envelope-to: ged-emacs-devel@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 1ompSg-0005lr-6M for ged-emacs-devel@m.gmane-mx.org; Mon, 24 Oct 2022 06:53:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omnFZ-0003fe-5j; Sun, 23 Oct 2022 22:31:37 -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 1omfCS-0001ab-74 for emacs-devel@gnu.org; Sun, 23 Oct 2022 13:55:59 -0400 Original-Received: from gproxy3-pub.mail.unifiedlayer.com ([69.89.30.42]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omfCN-00088Y-TH for emacs-devel@gnu.org; Sun, 23 Oct 2022 13:55:51 -0400 Original-Received: from cmgw12.mail.unifiedlayer.com (unknown [10.0.90.127]) by progateway5.mail.pro1.eigbox.com (Postfix) with ESMTP id 0857010045636 for ; Sun, 23 Oct 2022 17:55:34 +0000 (UTC) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id mfC9oAbYFQOZjmfC9o3Hii; Sun, 23 Oct 2022 17:55:34 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=CvV6zl0D c=1 sm=1 tr=0 ts=63558016 a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=pcCQt2e231CJi7VR:21 a=IkcTkHD0fZMA:10:nop_charset_1 a=Qawa6l4ZSaYA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=Zp0ytPNP3Gm7dLDXCvkA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=BZMPaYzQhuONG6XVyI7_:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YM6/ADEoaPV1c5COSwi5hZKhMcA2btpY2gU9HK9QyMs=; b=UknHvhXODt4XLTR7XLfTPFovqB RtQqxEVuLHWb9S3A4gX443QA9p6H4gLen18dFC7ZQJNUzhHrgJnhHAla1Pe6ACRojmu/SSJLFIh5D XnVPYuKosE5W3EvcMcdDaV23oh3VsvqT5IC3jAYAUIvGTQL6rA+W4LmbZPUVG7svHskZwKKRYMeNH v7xXnNA3eUcPFq5kRL8Ap6m6Xl/gXIeA7g5xqTDQkXZQYPzWBz6sz1hkpyQA2cEXi7J28VY5h167L XEggBOQZpuw60vPjbQx2kUbAb9dY81kh+/HkRH/ee995WcB8R98PNtRhZXphdj5vOrZV1TMZN119X pwkk2fnA==; Original-Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:50813 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1omfC9-003hS2-LX for emacs-devel@gnu.org; Sun, 23 Oct 2022 11:55:33 -0600 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1omfC9-003hS2-LX X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:50813 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 2 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=69.89.30.42; envelope-from=stephen_leake@stephe-leake.org; helo=gproxy3-pub.mail.unifiedlayer.com X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298317 Archived-At: See bug#58745; there's a patch included. Report duplicated here: I'm calling `eglot' from lisp. The doc string says the first argument `managed-major-mode' is an atom, not a list. But it is passed to eglot--connect as the first argument, which is expected to be a list of major modes. When called interactively, `managed-major-mode' is set by (eglot--guess-contact t), which returns a list. So when not interactive, `eglot' must convert `managed-major-mode' into a list: ------------------- [2. text/x-patch] diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 71001ba680..dee88db022 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1078,6 +1078,8 @@ eglot =20 INTERACTIVE is t if called interactively." (interactive (append (eglot--guess-contact t) '(t))) + (unless (listp managed-major-mode) + (setq managed-major-mode (list managed-major-mode))) (let* ((current-server (eglot-current-server)) (live-p (and current-server (jsonrpc-running-p current-server)))) (if (and live-p ------------------ Jo=C3=A3o T=C3=A1vora; ok to commit this patch? --=20 -- Stephe