From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Minor bug in eglot; managed-major-mode must be a list Date: Tue, 25 Oct 2022 09:35:36 +0100 Message-ID: References: <86lep6juga.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000081aaec05ebd7cb3d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6519"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 25 10:54:31 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 1onFhe-0001So-Lw for ged-emacs-devel@m.gmane-mx.org; Tue, 25 Oct 2022 10:54:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onFfq-0003eV-Af; Tue, 25 Oct 2022 04:52:38 -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 1onFPe-0001Lh-QT for emacs-devel@gnu.org; Tue, 25 Oct 2022 04:36:00 -0400 Original-Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onFPb-00059U-4D for emacs-devel@gnu.org; Tue, 25 Oct 2022 04:35:54 -0400 Original-Received: by mail-ot1-x332.google.com with SMTP id z11-20020a05683020cb00b00661a95cf920so7275530otq.5 for ; Tue, 25 Oct 2022 01:35:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SdjjWk0iNUdnaqhj0Fg77m33pDr1brCS9Nx6X1xuAjw=; b=HnPSbIdkzzZJXG+pzkhTiepWbBVjwat1MeB7wK+ZquYlkgKOwMRsx36SkSB4aaCyJw LQQUttV+4MKYhRSItO90UMyi6yyBMeUa6xU49cxU0MM3wwgTgGTvdeu1w9gCrnPXpPFW wyudjLCDGoF2IiE0xYG0/58pmqYKdo/Su10wGvJh2u7P2rgV0KA7hDcQbdyLfVWtEmr5 rQSi3jHOa8J4XzCodeoRN5YG1OSyiGSxT/uRjLdvWejhbKFj+n/VC1oKiug6azxx8S2Z FtaYPTkOfPgeYiARpTqljOEHmyTJVMPttps68AJ/gSgnu01gMQFclJFi0COJri4Iqlqo yqgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SdjjWk0iNUdnaqhj0Fg77m33pDr1brCS9Nx6X1xuAjw=; b=Z1Jb4M/pvTarMvksLi8GduMBlChMv/LuAL7rl5AaupAa4AJpyH2I437TOX9q7RGNQ4 atgci6eypT43j5wtcQUPd0IfOaUo2Pjjf82QlNJQBrujQJX6pYYdtde2aPT71oXmbjI6 9xMOSGd0QLOoYKUa6izo+XiuUw7uTNQLsIwVUPp7nB5COdHAN6m2cCBx978o5xNLQRpW 02bFmoMUscbR6/QqORACsV61KJx43U9ZRFT7ywcbx+s1TSHtArPRS0Hz/JukobydO+H0 Usz++pYQ+uPT507E9XjJ3rF+v2068wocEaCiaLVVh/4vjjKzJG2LH5/nr/iwuJaxuXE7 AKAA== X-Gm-Message-State: ACrzQf0vlEAQecj9Fi1+XlziId1B9M8a8yKYg9/MSJa2O/Rx2WFZjN60 P1fx3Mh18WCJJ/Zi1n8BpPnfZafsLzVDz6FGAWRGhHH0 X-Google-Smtp-Source: AMsMyM4Ec8i4Ru1Xt+PGnQTM5Zw/C509AeOkRH9pZyO1jeWZ8uNQ9xfm6W+qZevc6OGW++e3xhYqQ9JN9rgEeTTitcI= X-Received: by 2002:a9d:117:0:b0:666:e09d:577e with SMTP id 23-20020a9d0117000000b00666e09d577emr339010otu.93.1666686948320; Tue, 25 Oct 2022 01:35:48 -0700 (PDT) In-Reply-To: <86lep6juga.fsf@stephe-leake.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::332; envelope-from=joaotavora@gmail.com; helo=mail-ot1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:298440 Archived-At: --00000000000081aaec05ebd7cb3d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Oct 24, 2022, 05:38 Stephen Leake wrote: > 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 > > 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? > Yes (but please CC me next time to grab my attention). Also see other's comments about ensure-list. Also eglot, the function, does not have any non-interactive use i know of. Jo=C3=A3o > --00000000000081aaec05ebd7cb3d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable





--00000000000081aaec05ebd7cb3d--