From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#61679: 29.0.60; Eglot: staying out of trouble Date: Tue, 21 Feb 2023 15:00:47 +0000 Message-ID: References: <87mt57f5tw.fsf@gmail.com> 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="5573"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61679@debbugs.gnu.org To: Augusto Stoffel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 21 16:03:01 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 1pUUAX-00018D-S8 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Feb 2023 16:03:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUUAD-0001K7-0z; Tue, 21 Feb 2023 10:02:41 -0500 Original-Received: from [2001:470:142:3::10] (helo=eggs.gnu.org) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUU9j-0001Ir-AE for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 10:02:16 -0500 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 1pUU9a-0002bj-M5 for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 10:02:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pUU9a-0002Ru-HC for bug-gnu-emacs@gnu.org; Tue, 21 Feb 2023 10:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Feb 2023 15:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61679 X-GNU-PR-Package: emacs Original-Received: via spool by 61679-submit@debbugs.gnu.org id=B61679.16769916679350 (code B ref 61679); Tue, 21 Feb 2023 15:02:02 +0000 Original-Received: (at 61679) by debbugs.gnu.org; 21 Feb 2023 15:01:07 +0000 Original-Received: from localhost ([127.0.0.1]:57004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUU8g-0002Qj-Lw for submit@debbugs.gnu.org; Tue, 21 Feb 2023 10:01:06 -0500 Original-Received: from mail-oi1-f170.google.com ([209.85.167.170]:39566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUU8d-0002Px-LI for 61679@debbugs.gnu.org; Tue, 21 Feb 2023 10:01:06 -0500 Original-Received: by mail-oi1-f170.google.com with SMTP id y8so4719343oiy.6 for <61679@debbugs.gnu.org>; Tue, 21 Feb 2023 07:01:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bODIkMjue1gqDhs3OutHBDexR2LvWY0lqMTfh3TKMWU=; b=cdWDI5e8FfucwIzCHlUgmFlC575qPnPviZoqWU2fb+kNsBQVOo+TMcjz/cQaw9ptEE B0K4/81H17BXo+DKF1A8et9JYpvVMGDzyB9cQCO+duUOiM4pjyuh7GCLKtKkoxLqG18p mZYD7zu4nE4lKOFvpUyoYH9jicvPDxiikFMKt/HGCOKkQ1ZOhTcuB8RnW3s+LCAYWWlV gwE3m7qpQFDOdAMcFuK9EO0LQ5oGDO4ipccZTROi2IqrRhXorLwdL+IZ0QDzVuwpTLHN 3Onu5Ze0BMapgbmn0exOj6xpgqEi3+HxQLR65X2HMn7LAgKg5aw6vmwwrnHDBCwK2y7d AAag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=bODIkMjue1gqDhs3OutHBDexR2LvWY0lqMTfh3TKMWU=; b=kk0Ei5qrw4rUDU3M7cNiTcCfJ+mFSEAmyrnuUOWUXlfn2aqeWtXhgtJF6sqbC2jUY4 p73dmvg9vhpZwVVstoWq6J1aLht37S7kQBztn90s/Q6jAJAOTON02N11lMEvW7dpr+SX W9zUPGaxGXwgNCf4GHohMZ/g/28n+p4g7poYPsszzqRC0R23sRvVIr6Ln/mggimKFGBa 7hxSnpyVXXawlE3H5GNHTviPSz4as4JNg+RKCsyD7QpGXyAP1tCtSDP8p91SEt59BC7H +bzNdRP+bSNjIK4ZDwDJOeBzACfQa3PYl39EbVys7SNIN5TYBlOSj5IAkhK3BxOnop76 K6pA== X-Gm-Message-State: AO0yUKVrzUoihlYI0b6QfmAz87LJLX6db/TTdXqTADt3D07lI16znRuN vJlTP681E1E+8yn81eM+YRPqEOJFPHzG1qLAKm1NPW6sbzk= X-Google-Smtp-Source: AK7set/gzTZ5WOeOzQolSHt8RwmnUzbq57yrjh2wQuq1yQW7AASl6Db26bM/t+6fJdvROO1FX/xabmgafS39e1jdD40= X-Received: by 2002:a05:6808:128b:b0:37b:9a3:136f with SMTP id a11-20020a056808128b00b0037b09a3136fmr700983oiw.6.1676991657874; Tue, 21 Feb 2023 07:00:57 -0800 (PST) In-Reply-To: <87mt57f5tw.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:256279 Archived-At: On Tue, Feb 21, 2023 at 2:32 PM Augusto Stoffel wrote= : > > Eglot modifies several Emacs features, and it seems to do so > independently of the server capabilities. For instance, it registers a > capf and Eldoc functions even if the server does't provide completions > respectively "hover"/signature help. > > In some cases (capf, xref) this seems innocuous, in others (eldoc) Eglot > is really overwriting a possibly useful function with a possibly useless > one. In the Eldoc case, as of yesterday, this no longer happens. Look at commit e83c78b8c7784254c2c6f043530ab325c2fa7f16 Author: Jo=C3=A3o T=C3=A1vora Date: Mon Feb 20 22:43:50 2023 +0000 Eglot: respect user's Eldoc configuration by default > I would suggest that Elgot initially should keep > flymake-diagnostic-functions unchanged, and only overwrite it when the > first diagnostic comes from the server. This seems way too complicated for a problem that hasn't even been demonstrated. The reason there's no capability announcement for diagnostics is likely because it's such a basic capability that virtually every server supports it, unless you go out of your way to find or craft one that doesn't. When activating Eglot, you're saying "let this here LSP server manage my buffer by connecting it with these Emacs infrastructures" You're letting go of some of your major-mode's configuration and user configuration for what is in 99% of the cases a much more integrated and hassle-free IDE experience. Even so, Eglot only temporarily overrides your configuration and will not do so gratuitously, as the commit above illustrates. In Flymake's case, it is really important to override the value by default or else super-popular languages like Python handled by python mode start showing confusing duplicate diagnostics to newbie users, and we don't want that. If you really like your pre-Eglot configuration, you can combine it with Eglot's by leveraging eglot-managed-mode-hook and eglot-stay-out-of. This was Eglot's philosophy from the start and I don't intend to change it. Jo=C3=A3o