From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#60570: 29.0.60; Eglot+pyright freeze Emacs when edit a single file in Home director Date: Sat, 7 Jan 2023 14:38:54 -0800 Message-ID: <65A12BE9-80A8-48ED-B579-30E9D76A2E9A@gmail.com> References: <4B02B488-70C2-46A5-8817-C6F103EDD6E4@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="17106"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eason Huang , 60570@debbugs.gnu.org, Dmitry Gutov 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 Sat Jan 07 23:40:12 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 1pEHrI-0004Iz-1t for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Jan 2023 23:40:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pEHrA-0006wF-DF; Sat, 07 Jan 2023 17:40:04 -0500 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 1pEHr8-0006vr-Ry for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 17:40:02 -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 1pEHr8-0005pA-JU for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 17:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pEHr8-0004AC-FM for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2023 17:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Jan 2023 22:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60570 X-GNU-PR-Package: emacs Original-Received: via spool by 60570-submit@debbugs.gnu.org id=B60570.167313114515928 (code B ref 60570); Sat, 07 Jan 2023 22:40:02 +0000 Original-Received: (at 60570) by debbugs.gnu.org; 7 Jan 2023 22:39:05 +0000 Original-Received: from localhost ([127.0.0.1]:59130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEHqC-00048p-RT for submit@debbugs.gnu.org; Sat, 07 Jan 2023 17:39:05 -0500 Original-Received: from mail-pl1-f170.google.com ([209.85.214.170]:41824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pEHqB-00048E-8g for 60570@debbugs.gnu.org; Sat, 07 Jan 2023 17:39:03 -0500 Original-Received: by mail-pl1-f170.google.com with SMTP id jl4so5524925plb.8 for <60570@debbugs.gnu.org>; Sat, 07 Jan 2023 14:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=hv1t8Zja6Z9/oOdQmmNQsQfppNV8rKes7xbwQyIMu48=; b=M9hbdwefWAc1EENUGaWIt9fZihMYQ+Gxg23CIlsvrWQKDiaqZ5AncppmFFcbQ2lhVi MvYX5nWuLNm2NLnS0hUQZNGVi6qBBpZhijpmneUkdEHDYsXD6zZUCDXL/hmwFLTpZKyc lLHTZN5kj7ddh8C+mAfk8RD9P8xJBKIBCBM7LmXNGnhMkQ6xU80HEt2w5Uh6tVpJFeRV FSefbSkCwI1G+Z7CNQob/eRohkQbzXvwstTARyJP1POImRAcAU5tf4BdgYxbhqhlwqCa //tad7ZucGu38BuK85l4sVr0xhThMe/Y+kglIP69EZAcJdUug9dk+aSH09TI1htXpy2a qDqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hv1t8Zja6Z9/oOdQmmNQsQfppNV8rKes7xbwQyIMu48=; b=tCn5zn+ytq6wA369ASs2SVG07xJPOUScIWHi9yDos64l1/pgGOLk+gM0l9Alntwsua qb45YaRrRSThmvmQPuBOM9qTOolht8RIp3NFUuVBwMZLXuY+DYs4edS01YN0Rcm1QWa8 iP3jOcPNUO9y6aSCrq0ilS4H7hrzo6Z+QhtyWzifD79ThbWH/yxEY62G5rm3F3nvsO1g /qH6sVdd/QUC89Q5zp67Pfm8rPEd2OzD/Kfj5teNth8nEATPPW7SswbAaB21b3OejZWn 7UWmAWtK7skk+9eEWZovMAYyEfqcN2Ei0xwU4BoA8XNrwuR+dM6Dke57mKJTheaXblZp rGiA== X-Gm-Message-State: AFqh2krGnU/WMWElDDWBLAjtn1KjZMVAXHKsMu835OxJvCZML7U2MP0Y /imTuxwZYFkRC87YIHQpX8k= X-Google-Smtp-Source: AMrXdXseev4t4VIeQ66DQR/YcCM6DpsaJRDmU9hiqQb5cPmV0B0GzEY8FC9JYFpoqEr1EDSlheagQg== X-Received: by 2002:a17:90a:7341:b0:225:f7b3:aebf with SMTP id j1-20020a17090a734100b00225f7b3aebfmr45122480pjs.30.1673131136968; Sat, 07 Jan 2023 14:38:56 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id ha18-20020a17090af3d200b00219eefe47c7sm2826450pjb.47.2023.01.07.14.38.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2023 14:38:56 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) 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:252831 Archived-At: > On Jan 6, 2023, at 2:29 AM, Jo=C3=A3o T=C3=A1vora = wrote: >=20 > On Fri, Jan 6, 2023, 06:17 Yuan Fu wrote: >=20 > > I use a custom function eglot-soft-ensure which only enables eglot = if > > there is already a LSP server running for the current project. This = way > > eglot doesn=E2=80=99t auto-start in which files that I don=E2=80=99t = want it to start. > > > > (defun eglot-soft-ensure () > > "Turn on eglot when there is an exising server for the current = project." > > (require 'eglot) > > (when-let* ((project (project-current)) > > (eglot-server (gethash project = eglot--servers-by-project))) > > (eglot-ensure))) >=20 > Hello Yuan, >=20 > I must me missing something, because I would say you can just=20 > get rid of eglot-soft-ensure. I can't understand what it is adding=20 > on top of the normal Eglot behaviour. =46rom the manual: >=20 > "When you visit a file under the same project, whether an existing or = a=20 > new file, its buffer is automatically added to the set of buffers = managed by > Eglot, and the server which supports the buffer=E2=80=99s major-mode = is notified=20 > about that. Thus, visiting a non-existent file = /home/joe/projects/fooey/lib/y.foo=20 > in the above example will notify the server of the *.foo files=E2=80=99 = language=20 > that a new file was added to the project, even before the file appears=20= > on disk. The special Eglot minor mode is also turned on automatically=20= > in the buffer visiting the file." >=20 > https://joaotavora.github.io/eglot/#Eglot-and-Buffers Oh! I must have done something wrong that prompted me to write = eglot-soft-ensure. But I don=E2=80=99t remember :-) Sorry for the = misinformation! Yuan=