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#58839: [Patch] Re: bug#58839: 29.0.50; project-kill-buffer fails when Eglot is running Date: Sat, 29 Oct 2022 12:05:07 +0100 Message-ID: <87mt9ex53w.fsf@gmail.com> References: <87sfj8umwb.fsf@posteo.net> <87edur3lil.fsf@posteo.net> <87a65f3j40.fsf@posteo.net> <213f3549-de4e-25a7-5e27-d13893e557bc@yandex.ru> <87zgdfwkle.fsf@gmail.com> <8e31a89d-e35e-6dd0-a8e3-f0b9684c8bfa@yandex.ru> <87czab16em.fsf@posteo.net> 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="12709"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 58839@debbugs.gnu.org, Manuel Uberti , Dmitry Gutov To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 29 13:05:13 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 1oojeL-00034q-5g for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Oct 2022 13:05:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oojeC-0001iC-5s; Sat, 29 Oct 2022 07:05:04 -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 1oojeA-0001hd-PQ for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 07:05:02 -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 1oojeA-0002ad-DA for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 07:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oojeA-0003RC-6U for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2022 07:05:02 -0400 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: Sat, 29 Oct 2022 11:05:02 +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.166704144513143 (code B ref 58839); Sat, 29 Oct 2022 11:05:02 +0000 Original-Received: (at 58839) by debbugs.gnu.org; 29 Oct 2022 11:04:05 +0000 Original-Received: from localhost ([127.0.0.1]:35033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oojdF-0003Pv-7F for submit@debbugs.gnu.org; Sat, 29 Oct 2022 07:04:05 -0400 Original-Received: from mail-wm1-f54.google.com ([209.85.128.54]:56182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oojdD-0003PP-Fr for 58839@debbugs.gnu.org; Sat, 29 Oct 2022 07:04:04 -0400 Original-Received: by mail-wm1-f54.google.com with SMTP id t4so4535999wmj.5 for <58839@debbugs.gnu.org>; Sat, 29 Oct 2022 04:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KAp6Kqn3wzzCzGQdD8fPEm3LloIRZyT69+14aav0k9w=; b=pZIpEaWRotFS3Nk4MF/sBdRvc+3QII/qPtiGS1MObGfISP/xs1y52mK+3Wb9fy1Vvf KsiiiweOdhc8BRa1w7HhSdEFby//9ZeD5owCwdiA3Fcm2NxdX2Cyd1EBlpuao6n73OSO pw0EfiqBKmAwtJebYlUPVKymdYFyQlD2Q0ydfp155cN0oBtknXesB19rZBVnTLEyggfL KWJWw1azUGTJB3/fUfc584LGc2Lj3+Ds8EHY8NVJooqIWVa3swAQk3AJLtMslJs3hYD7 PkerCVwuqEn6OEj0w57oBchDP/0Zd7jA/u5+YdPwMCJ1S1lX8xWBAevJQ/HDzHTwXA+M qXCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=KAp6Kqn3wzzCzGQdD8fPEm3LloIRZyT69+14aav0k9w=; b=Aq6tVxi96tpi73/tTvLTACyLHSxqYkiH++bUfBusdOuyGpcp/V7UGf7ysXK+vuOTXv KEq906wAcm3361vsRow7pR0XkzKc5IQXOziFATU52RmBgDxpvfEaSb88lBFKoWhci+VC 3UOcgYxRTlv2tiwZqZTKh7QnWvr4ZO71h0hWpdlwWLDawfTFLwKzoBKCYmFfBerNx8So QyUXn1DRWJ0tswI6Xs2V0hqxHOaLb+EbHL4iCoaHjGafonaVG02ctUo9MJh89ED9SFxj P/mqkuUwq8alMYPUj0OnISvS4lzd9x9G4y12F0cVgjTCNcuXZcKXGaR+BHR9AtPjVvsS JQuA== X-Gm-Message-State: ACrzQf0AywuZ/CnmnGE55UsiAmHP5San5qQBFE/rcPrMYYDMiAir8JPZ 5mDQUpj+CFEyn74L2G6XzvU= X-Google-Smtp-Source: AMsMyM5aqXr6GxRthvrdaP+WX22GE+f5e6VSOAXpQmDpgY19XI+48j3WNDdUCOCb3jzBL8f4FsiHUg== X-Received: by 2002:a1c:f70f:0:b0:3cf:620f:fc4c with SMTP id v15-20020a1cf70f000000b003cf620ffc4cmr2155891wmh.168.1667041437637; Sat, 29 Oct 2022 04:03:57 -0700 (PDT) Original-Received: from krug (87-196-74-89.net.novis.pt. [87.196.74.89]) by smtp.gmail.com with ESMTPSA id m17-20020a5d56d1000000b0022cc6b8df5esm1266704wrw.7.2022.10.29.04.03.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Oct 2022 04:03:57 -0700 (PDT) In-Reply-To: <87czab16em.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 29 Oct 2022 06:38:09 +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:246512 Archived-At: Philip Kaludercic writes: > This is my perspective too. I am under the impression that Jo=C3=A3o or > looking at this from a too technical perspective, and is missing the way > users perceive the situation. You're not reading what I am writing. Here's a summary again: 1. buffer is implementation detail. Users don't see it any more than they see values of internal global variables. In fact I think lsp-mode, perfectly legitimately, uses (or used to use) a process, but doesn't make use of its buffer at all. It uses a special filter that processes and stores strings in global variables. These variables also "service a project" and occupy resources but I doubt project.el has a claim to their ownership. jsonrpc.el use buffers internally, just because that was deemed more convenient and efficient for parsing. 2. Users like you who are interested in controlling the RAM and CPU resources taken by the running a LSP server, even when Emacs is not visiting any files in a project should use the variable eglot-autoshutdown. This variable is exactly what you want. There is no other "user perception" here that I have been made aware of. 3. Even if we were to neglect point 1, as you seem to be, fixing things with kill-buffer-query-functions duplicates programming logic, which is very bad. And most important of all, there's no place to put the reference to kill-buffer-query-functions short of many lines completely throwing away encapsulation and unique resource ownership. If this is too technical, then I'm sorry: this is a technical mailing list. Jo=C3=A3o