GNU logs - #70835, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#70835: eglot-managed-mode-hook doesn't run when minor mode is turned off
Resent-From: =?UTF-8?Q?Jo=C3=A3o?= Pedro <jpedrodeamorim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 08 May 2024 19:51:02 +0000
Resent-Message-ID: <handler.70835.B.17151978559191 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 70835
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 70835 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.17151978559191
          (code B ref -1); Wed, 08 May 2024 19:51:02 +0000
Received: (at submit) by debbugs.gnu.org; 8 May 2024 19:50:55 +0000
Received: from localhost ([127.0.0.1]:50549 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s4nJX-0002O9-9H
	for submit <at> debbugs.gnu.org; Wed, 08 May 2024 15:50:55 -0400
Received: from lists.gnu.org ([2001:470:142::17]:34818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jpedrodeamorim@HIDDEN>) id 1s4nJS-0002O1-5u
 for submit <at> debbugs.gnu.org; Wed, 08 May 2024 15:50:54 -0400
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 <jpedrodeamorim@HIDDEN>)
 id 1s4nIw-0000SY-VE
 for bug-gnu-emacs@HIDDEN; Wed, 08 May 2024 15:50:18 -0400
Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <jpedrodeamorim@HIDDEN>)
 id 1s4nIv-0006wd-Cv
 for bug-gnu-emacs@HIDDEN; Wed, 08 May 2024 15:50:18 -0400
Received: by mail-pj1-x102a.google.com with SMTP id
 98e67ed59e1d1-2a2da57ab3aso134580a91.3
 for <bug-gnu-emacs@HIDDEN>; Wed, 08 May 2024 12:50:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1715197815; x=1715802615; darn=gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:subject:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=MJmOnWyyZWDTiMFw2G58zmHPmK7GMfKGfoFLiVbH01M=;
 b=DHhNu6N+OavTFXlNd/580mH6r9TrXWKiYFias53Jd6RmemmbHeftY3VfOWlG4idi8U
 YTLftpWa828NYPb+ceBL/6Y/1KNyoFC2lO9EH3st/jcsPTu5CrFg+whr1e+f1HdpQdOE
 MDwQ5XWm4oqsm3Qkte5BGkYovLujwlPRcJt2FtPlBsQuk/kE7SIxskeGUV5fWE3YhfBc
 5CGuSYAZn4iyQyYanY5lipN9SjHvN0Ab54Z746Edm+ZaBz51YjgVyZ1pu5RhFh5UE0Jv
 WRy+QDuTzN3kUtt+HszgEqoKMt5s6VWgeunsh9dTXt2rI2nb3TvAV6YD7Fln4+uC7Sxw
 DluQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1715197815; x=1715802615;
 h=content-transfer-encoding:mime-version:message-id:date:subject:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=MJmOnWyyZWDTiMFw2G58zmHPmK7GMfKGfoFLiVbH01M=;
 b=rXlVNf9AQWLYLf/mw9SPE85scI8Qmi/cve/VN0JwHw7Yq1saPg9uzOBsqRzpwjsJqC
 s1s7k+S61aqOnEvTXb+PYQbE5xOFAiXViCacDJddTxN/gHVZGwz4eu76sWSL8AC/Dqit
 F16S75oDsL3Eap25B6pxi3DphMhEo6cZd1ubh1Vj8gqrVwMSjEdBsSbvKwyOslkN/t3j
 XhlD1KEf/TSnmy6xu+iID5LXpHXeswEmb+JNiXHO2Xo5BO//yAavp5sDf/CSJahlRVPs
 UgAMs+VYEHgyjKmlLpwPlyEIMuL1Dr6bW20/RV+WYLRQ04tXf3wD3WUtufJs8wrlSTZY
 G1rQ==
X-Gm-Message-State: AOJu0YyNsGIrBNxn03wxZE++gk7L94LBnFUYlqFTIJCZs5HC8UthF8DK
 vsTHMVryYSpfvF4BM9m49WmaX869zS5RXk3CPQ0gcASgp2XNlOmnH2cRQA==
X-Google-Smtp-Source: AGHT+IGW6Fzo7UBZgy+Y2mGKgKvI3MhsaDPXgQWac+xXtk9JaTf9542l74Z1JO5Lhxl07Fd0ia/kgg==
X-Received: by 2002:a17:90a:cc15:b0:2a6:43c:44c6 with SMTP id
 98e67ed59e1d1-2b6166c35fcmr3601514a91.29.1715197814865; 
 Wed, 08 May 2024 12:50:14 -0700 (PDT)
Received: from localhost ([187.61.201.31]) by smtp.gmail.com with ESMTPSA id
 r2-20020a17090b050200b002b143417622sm1842312pjz.12.2024.05.08.12.50.13
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 08 May 2024 12:50:14 -0700 (PDT)
From: =?UTF-8?Q?Jo=C3=A3o?= Pedro <jpedrodeamorim@HIDDEN>
Date: Wed, 08 May 2024 16:50:11 -0300
Message-ID: <87r0ec13t8.fsf@ergo>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
Received-SPF: pass client-ip=2607:f8b0:4864:20::102a;
 envelope-from=jpedrodeamorim@HIDDEN; helo=mail-pj1-x102a.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,
 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-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

QXMgdGhlIHRpdGxlIHNheXMsIHRoZSBwdWJsaWMgZmFjaW5nIGBlZ2xvdC1tYW5hZ2VkLW1vZGUt
aG9vaycgZG9lc24ndA0KcnVuIHdoZW4gYGVnbG90LS1tYW5hZ2VkLW1vZGUnIGlzIHR1cm5lZCBv
ZmYuIFRoYXQgY2FuIGJlIHRlc3RlZCB3aXRoDQoNCiAgICAoYWRkLWhvb2sgJ2VnbG90LW1hbmFn
ZWQtbW9kZS1ob29rDQogICAgICAgICAgICAgIChsYW1iZGEgKCkNCiAgICAgICAgICAgICAgICAo
bWVzc2FnZSAicmFuIGVnbG90LW1hbmFnZWQtbW9kZS1ob29rIHdpdGggZWdsb3QtLW1hbmFnZWQt
bW9kZSAnJXMnIg0KICAgICAgICAgICAgICAgICAgICAgICAgIChpZiBlZ2xvdC0tbWFuYWdlZC1t
b2RlICJvbiIgIm9mZiIpKSkpDQoNCiAgICAoYWRkLWhvb2sgJ2VnbG90LS1tYW5hZ2VkLW1vZGUt
aG9vaw0KICAgICAgICAgICAgICAobGFtYmRhICgpDQogICAgICAgICAgICAgICAgKG1lc3NhZ2Ug
InJhbiBlZ2xvdC0tbWFuYWdlZC1tb2RlLWhvb2sgd2l0aCBlZ2xvdC0tbWFuYWdlZC1tb2RlICcl
cyciDQogICAgICAgICAgICAgICAgICAgICAgICAgKGlmIGVnbG90LS1tYW5hZ2VkLW1vZGUgIm9u
IiAib2ZmIikpKSkNCg0KSW4gZmFjdCwgYXMgb2YgRWdsb3QgdmVyc2lvbiAxLjE3LCB0aGF0IGlz
IGNhdXNlZCBieSB0aGUgZm9sbG93aW5nDQoNCiAgICAoZGVmdW4gZWdsb3QtLW1heWJlLWFjdGl2
YXRlLWVkaXRpbmctbW9kZSAoKQ0KICAgICAgIk1heWJlIGFjdGl2YXRlIGBlZ2xvdC0tbWFuYWdl
ZC1tb2RlJy4NCg0KICAgIElmIGl0IGlzIGFjdGl2YXRlZCwgYWxzbyBzaWduYWwgdGV4dERvY3Vt
ZW50L2RpZE9wZW4uIg0KICAgICAgKHVubGVzcyBlZ2xvdC0tbWFuYWdlZC1tb2RlDQogICAgICBe
Xl5eXl5eXl5eXl5eXl5eXl5eXl5eXl5eXl4NCiAgICAgICAgOzsgQ2FsbGVkIHdoZW4gYHJldmVy
dC1idWZmZXItaW4tcHJvZ3Jlc3MtcCcgaXMgdCBidXQNCiAgICAgICAgOzsgYHJldmVydC1idWZm
ZXItcHJlc2VydmUtbW9kZXMnIGlzIG5pbC4NCiAgICAgICAgKHdoZW4gKGFuZCBidWZmZXItZmls
ZS1uYW1lIChlZ2xvdC1jdXJyZW50LXNlcnZlcikpDQogICAgICAgICAgKHNldHEgZWdsb3QtLWRp
YWdub3N0aWNzIG5pbCkNCiAgICAgICAgICAoZWdsb3QtLW1hbmFnZWQtbW9kZSkNCiAgICAgICAg
ICAoZWdsb3QtLXNpZ25hbC10ZXh0RG9jdW1lbnQvZGlkT3BlbikNCiAgICAgICAgICA7OyBSdW4g
dXNlciBob29rIGFmdGVyICd0ZXh0RG9jdW1lbnQvZGlkT3Blbicgc28gc2VydmVyIGtub3dzDQog
ICAgICAgICAgOzsgYWJvdXQgdGhlIGJ1ZmZlci4NCiAgICAgICAgICAoZWdsb3QtaW5sYXktaGlu
dHMtbW9kZSAxKQ0KICAgICAgICAgIChydW4taG9va3MgJ2VnbG90LW1hbmFnZWQtbW9kZS1ob29r
KSkpKQ0KDQpDYWxsaW5nIHJ1bi1ob29rcyBpbnNpZGUgdGhlIGRlZmluaXRpb24gb2YgZWdsb3Qt
LW1hbmFnZWQtbW9kZSwgYnV0IEknbQ0Kbm90IHN1cmUuDQoNCkJlc3QsDQoNCi0tIA0KSm/Do28g
UGVkcm8gZGUgQS4gUGF1bGENCklUIGJhY2hlbG9ycyBhdCBVbml2ZXJzaWRhZGUgRmVkZXJhbCBk
byBSaW8gR3JhbmRlIGRvIE5vcnRlIChVRlJOKQ0K




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: =?UTF-8?Q?Jo=C3=A3o?= Pedro <jpedrodeamorim@HIDDEN>
Subject: bug#70835: Acknowledgement (eglot-managed-mode-hook doesn't run
 when minor mode is turned off)
Message-ID: <handler.70835.B.17151978559191.ack <at> debbugs.gnu.org>
References: <87r0ec13t8.fsf@ergo>
X-Gnu-PR-Message: ack 70835
X-Gnu-PR-Package: emacs
Reply-To: 70835 <at> debbugs.gnu.org
Date: Wed, 08 May 2024 19:51:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 70835 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
70835: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D70835
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 27 May 2024 15:46:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 27 11:46:31 2024
Received: from localhost ([127.0.0.1]:45082 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sBcYQ-0002SI-O9
	for submit <at> debbugs.gnu.org; Mon, 27 May 2024 11:46:31 -0400
Received: from mail-lf1-f53.google.com ([209.85.167.53]:51296)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>)
 id 1sBcYO-0002Rv-DZ; Mon, 27 May 2024 11:46:29 -0400
Received: by mail-lf1-f53.google.com with SMTP id
 2adb3069b0e04-529661f2552so3236157e87.2; 
 Mon, 27 May 2024 08:46:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1716824713; x=1717429513; darn=debbugs.gnu.org;
 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=8r1lueHInvT70nhh4nDRsPMyl4wbuu2uE0BgEac+v1U=;
 b=LmuW46ivKSMnOunGAFaxIG4V4ZadX2y2aOhqVMBP2XEgtmUqT8g+koZQ87Jxo4Y4so
 GOR3NT9eTVxqpZsFfo91LruomiWLcahvUvt73juY2CTk9K71jDOnSLLnKmO+MJS6lUYP
 JiCG8JYT+gKyRQdwqNERrzds/JVpVj8Mib7rCBT+V6uugAjHDVISBEi839p+hat5vgbg
 K4khJ4gFbLtXYVDOxZ5fjzAK9MKOiqQQDy6Ia12MDWNfgeL6GgS9sKYuKPcIrAZNTGTp
 /NkcMHctqkVrsHf2mz9ZNlhGzF4EGjLTvjLqzl23jhKurXxw7LHD7yJora9i9PJXJWH0
 JyfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1716824713; x=1717429513;
 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=8r1lueHInvT70nhh4nDRsPMyl4wbuu2uE0BgEac+v1U=;
 b=nKaH1Jb0QtWR3H526c0d1Q/KfzthSrxnGouMeWtYE5wRdiY5bwVL9QfYSUXOOTLOdP
 64cFRaNVwSWeI3EeaxZTqUNLbXhNQSwgCg1IFUJ5x2/RwtMQDH9ec6c1zeW3CO9E4xzV
 GVm0GoUFPKhN2PBBCcllAcOB9kryyzf8eCPPoOIbiDMyONSkQhuEC9jGjtWF1ik7oUxw
 4+PXOxiakTCboI35cznIhDNptTEjalqQYAcdjUn36yZwTJA8raVUFLRTV1dZ+zQeW+UO
 b63Kn7XfI7bq/VVXWeYgxr25Lt6hIqACZ7e7B85hiyFXbt9IYXhkH7Gk4+LKFvIGtleI
 sE2A==
X-Forwarded-Encrypted: i=1;
 AJvYcCXczykO6gjeZ9Yy3qC5BfH3eUbB/pLLbuWnQ3YrZZ1MBoAQ2bzOyrj2PY3J0SMWguMeckPt4g0SJ9v/5ZUwc0xCMaslRw4yJqjdqLQvX50+wWv0mSEHLWOx/+gOZF6G
X-Gm-Message-State: AOJu0YyX5QmjnYdPIaxReBJe9vpAltXJ69+60yfiQCdla8B4UIgs00bH
 p5DFjmr98iiq0VfDaTxHCm+HHa/TH4KtavOmUbWqQKzXnqbaDbdQsnMQ8mQnMGX+sNTcxou1zKk
 4whn/8TgBISI9hmW2CPs/A8uG5rI=
X-Google-Smtp-Source: AGHT+IEEIkfmPvi5wMLrm2mR5DhMq0kU77a8RmtHvcS9ymiDeihDOCJJuyvF6oP4G4mlqA+pa/JmNbF2ox6uwpsOuA8=
X-Received: by 2002:a05:6512:1112:b0:520:98ff:5554 with SMTP id
 2adb3069b0e04-5296547aa0amr8107946e87.30.1716824713249; Mon, 27 May 2024
 08:45:13 -0700 (PDT)
MIME-Version: 1.0
References: <CABvCZ43amZyUFGW-q3kU1+XGA0CV5xkvUYrGKrhGKxS6OWQ+kw@HIDDEN>
 <86y17yz5sr.fsf@HIDDEN>
 <CALDnm52bQJGKe-Bv8DzJTqpjf5LxVOPSmQzGRqc_Gx2kU1g0QQ@HIDDEN>
 <CABvCZ43GkHMi8kWAy5qRdnF=YdH3V-iDiwVXnLT3_ex8iCcRMg@HIDDEN>
 <CALDnm53H+vqVwNttxTV2fKe_A3vrxTJ9ZmRpK3q1UyPvKn=2Mw@HIDDEN>
 <CABvCZ41ZOPW4nHHjHnv6uBGOdq_4+pGcXrVNbRvF0ifRQDfJtQ@HIDDEN>
 <CALDnm50u2r5y_k3j8i-cmEJT=BHJ8-33sUuiKh2-WCmr6Or6ug@HIDDEN>
 <CABvCZ43N7s-Kka2Z7i6X+bySy-XuxAir7cVn8vXURUhVMS9brg@HIDDEN>
In-Reply-To: <CABvCZ43N7s-Kka2Z7i6X+bySy-XuxAir7cVn8vXURUhVMS9brg@HIDDEN>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Mon, 27 May 2024 16:45:01 +0100
Message-ID: <CALDnm53f1nxwBum+EcTxJQC+Qd27OYV1iZCVwnchSuvjj6jQEg@HIDDEN>
Subject: Re: bug#70958: 30.0.50;
 eglot-managed-mode hooks not called on shutdown
To: Troy Brown <brownts@HIDDEN>, 
 GNU bug tracker automated control server <control <at> debbugs.gnu.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: control
Cc: 70958 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Felician Nemeth <felician.nemeth@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

merge 70958 70835
thanks

On Mon, May 27, 2024 at 3:32=E2=80=AFPM Troy Brown <brownts@HIDDEN> =
wrote:
>
> On Mon, May 27, 2024 at 10:09=E2=80=AFAM Jo=C3=A3o T=C3=A1vora <joaotavor=
a@HIDDEN> wrote:
> >
> > Bugs are only "legitimate" when they are harming someone somewhere.
> > This hook has been there for a number of years, and noone has complaine=
d
> > that I can remember. If you have a use for the on-shutdown, then it's
> > a bug.  It'd help to know about this use case. If you don't have a use,
> > it's just a doc bug, and patches welcome.

Actually I was wrong.  I have been recently warned of this exact
same issue.  I thought you and that person were the same.
bug#70835, which this bug is a duplicate of (so I've merged them,
hopefully)

> The use case is that I was experimenting with updating the
> buffer-local indent-region-function (and indirectly
> indent-line-function) to be based on eglot-format when the buffer was
> connected to the language server.  I was attempting to use the
> eglot-managed-mode-hook so I could update these variables when the
> Eglot buffer management changed.  Since the hook wasn't being called
> on shutdown it would still attempt to call eglot-format when it was no
> longer managing the buffer.  The workaround was to use a mode-specific
> function for indent-region-function and then having that call
> eglot-managed-p to determine if it should call eglot-format or
> something else (e.g., indent-relative).

Anyway, to your use case.  The "off" hook would solve your problem,
but not as well as your solution.  When setting variables, there's
no clean solution to the "undo problem", unless the variable in
question is a hook.  Think:

 var is originally X
 activate minor mode foo, saves var value of X, sets to Y,
 activate minor mode bar, that also sets var, saves Y, sets to Z
 deactivate foo, sets var to X
 deactivate bar, sets var to Y
 now both modes are inactive, variable is set to Y, in error

When the variable being affected is a hook with certain rules, this
problem doesn't exist.

Anyway, it's not a problem for Eglot to solve.  So given there is
also bug#70835 requesting the same, I think we can risk just running
eglot-managed-mode-hook like so let's try this patch:

diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 6896baf30ce..2fab9e7f38b 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -2059,6 +2059,7 @@ eglot--managed-mode
     (when eglot--current-flymake-report-fn
       (eglot--report-to-flymake nil)
       (setq eglot--current-flymake-report-fn nil))
+    (run-hooks 'eglot-managed-mode-hook)
     (let ((server eglot--cached-server))
       (setq eglot--cached-server nil)
       (when server

There will possibly be people complaining we broke their configs,
so this might not be the end of the story. But it's reasonable to try it
since this is how  the documentation says it _should_ work and is
consistent with the normal minor-mode hooks.

Jo=C3=A3o





Last modified: Mon, 27 May 2024 16:00:03 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.