From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#58839: [Patch] Re: bug#58839: 29.0.50; project-kill-buffer fails when Eglot is running Date: Wed, 02 Nov 2022 19:32:02 +0200 Organization: LINKOV.NET Message-ID: <86mt991dst.fsf@mail.linkov.net> References: <87sfj8umwb.fsf@posteo.net> <87ilk2x1si.fsf@gmail.com> <871qqq7l9p.fsf@posteo.net> <87eduqwekz.fsf@gmail.com> <87wn8invbx.fsf@posteo.net> <877d0iw8iq.fsf@gmail.com> <837d0hhlke.fsf@gnu.org> <46ff0065-5645-ef1e-2621-242fb6a73f98@yandex.ru> <87v8o0uxn5.fsf@gmail.com> <787a4362-7ff5-7dbb-9118-16e4bee5f328@yandex.ru> <87edunvhf2.fsf@gmail.com> <6d4d9e72-1bae-4d64-b7c1-c2b9c11e396f@yandex.ru> <6c9811d7-ad05-2d2d-0c34-9b4c1fa09305@yandex.ru> <87a659u7vo.fsf@gmail.com> <8735b1bvnz.fsf@posteo.net> <87mt99spsk.fsf@gmail.com> <87r0ylafdl.fsf@posteo.net> <87cza5sbfx.fsf@gmail.com> <87r0ylh0y4.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32230"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , 58839@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , Dmitry Gutov To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 02 18:52:30 2022 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 1oqHud-00087D-NJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Nov 2022 18:52:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqHuH-00049w-0U; Wed, 02 Nov 2022 13:52:05 -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 1oqHuF-00049S-Ni for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 13:52:03 -0400 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 1oqHuF-0002MV-Gv for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 13:52:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqHuF-0005HN-7k for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 13:52:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Nov 2022 17:52:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58839 X-GNU-PR-Package: emacs Original-Received: via spool by 58839-submit@debbugs.gnu.org id=B58839.166741151120247 (code B ref 58839); Wed, 02 Nov 2022 17:52:03 +0000 Original-Received: (at 58839) by debbugs.gnu.org; 2 Nov 2022 17:51:51 +0000 Original-Received: from localhost ([127.0.0.1]:47134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqHu3-0005GV-DM for submit@debbugs.gnu.org; Wed, 02 Nov 2022 13:51:51 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:50025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqHu1-0005G6-D0 for 58839@debbugs.gnu.org; Wed, 02 Nov 2022 13:51:49 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id A40EE40003; Wed, 2 Nov 2022 17:51:41 +0000 (UTC) In-Reply-To: <87r0ylh0y4.fsf@posteo.net> (Philip Kaludercic's message of "Wed, 02 Nov 2022 14:42:59 +0000") 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246883 Archived-At: >> OK, one last time. First, the above principle of encapsulation has >> nothing to do with LSP or Eglot or Jsonrpc. > > Again, it is not given that this applies to buffers. Robust code should > be able to handle a missing resource or prevent the resource from being > revoked. This is not possible with buffers, so this is a design fault > with Eglot or Jsonprc. * While the default value of project-kill-buffer-conditions really looks too wide (especially covering fundamental-mode and special-mode), OTOH I completely support the request to make Eglot more resilient to unforeseeable situations. Currently it's so brittle, so I get a lot of such errors all the time: Debugger entered--Lisp error: (wrong-type-argument arrayp nil) file-truename(nil) eglot--path-to-uri(nil) eglot--TextDocumentIdentifier() eglot--signal-textDocument/didClose() kill-buffer(#) xref--convert-hits(...) xref-matches-in-files("word" ...) project--find-regexp-in-files("word" ...) apply(project--find-regexp-in-files ("word" ...)) xref--show-xref-buffer(...) xref--show-xrefs(...) xref-show-xrefs(...) project-find-regexp("word") funcall-interactively(project-find-regexp "word") command-execute(project-find-regexp)