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: Mon, 31 Oct 2022 23:19:24 +0000 Message-ID: <875yfzvawz.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> <87v8o3wgq1.fsf@gmail.com> <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> <87k04ggixk.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="23880"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , manuel.uberti@inventati.org, 58839@debbugs.gnu.org, Dmitry Gutov To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 01 00:19:19 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 1ope3q-00061G-LZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Nov 2022 00:19:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ope3g-0006WH-Si; Mon, 31 Oct 2022 19:19:08 -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 1ope3a-0006W3-UL for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 19:19:07 -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 1ope3a-0004Bg-Mn for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 19:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ope3a-0005i4-Hf for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 19:19: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: Mon, 31 Oct 2022 23:19: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.166725830321900 (code B ref 58839); Mon, 31 Oct 2022 23:19:02 +0000 Original-Received: (at 58839) by debbugs.gnu.org; 31 Oct 2022 23:18:23 +0000 Original-Received: from localhost ([127.0.0.1]:42236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ope2w-0005hA-Qo for submit@debbugs.gnu.org; Mon, 31 Oct 2022 19:18:23 -0400 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:39510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ope2u-0005gv-UV for 58839@debbugs.gnu.org; Mon, 31 Oct 2022 19:18:21 -0400 Original-Received: by mail-wr1-f53.google.com with SMTP id o4so18045510wrq.6 for <58839@debbugs.gnu.org>; Mon, 31 Oct 2022 16:18:20 -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=Ah3ZhypLZ18loyzr9hJvDM6P63xasxK8+Pz9+ZVhwYU=; b=UQKrHiDSAg9LYyN+icLL+0EGUoI5DcKIhJqmO6FZYfmtxJr72TvVCmdnS5RjADDNXM A+D/yhzVLB6NujbPUlSq80LQ4fHI8g0NNQLS0s8BO6nq2jEVJilczUjV+Larx+F3wxMk T8J9WyJ+NsK2B9/3vixAlRglKCBJIAIDrQtsVJhQQ4Ex2TqaChr8evS4P+wqLJHRYyhP eYuzqH7MrDV5TPR44NF3L70rqFzMtLK+2FhIeTOdO6zJTAnyYIyWx0RmCVdNKYx4mQuc 0afHpO1rD2+HDhPXV6k3YY43hZnPe7wBA7PdoFx6qtnbhJql+jv+QLrdcAf8r+BiyS6H vNug== 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=Ah3ZhypLZ18loyzr9hJvDM6P63xasxK8+Pz9+ZVhwYU=; b=d6RDpe6luWmsWScpgKAX2EVzpln7mj75zRpvYp4a5XY1Wl6/+Pm5rRRZ0P2VaFwCXb j72lAG3QoWag7/vu/Y2U+u3RqA3bY40hMnGCgzCWxAPCULVVq8n8v/Q3/mDbS/x+sPmW p3Vr56FqY4637v5ZPWFDHmFjSEQ/AGERfnkpiDqH2LyTJOlAcd+EA45GEj2dNVH48Y6f xhwTY/Z6yZrkP/k36Id4gb8XoGagki+fgZa86pw6RUuORG3vm8D5imfYY/6mIWFmhTab PlCU/SpQs/odfDvt6vnlED87AnkawV72X2l2suhzAqNiqkn7fEhnRTcNueQHnGelWQNq qFrg== X-Gm-Message-State: ACrzQf0hZLWK/9Ae9gfcbTvnZlSYrZIZ2O2E6gjvyY9v8dcD6dZJOEDH SsOxI6phsD3CGxxnSprsNdE= X-Google-Smtp-Source: AMsMyM41gWNRPSPjm2YzVwUl5d4b0XjZzIMLWIyUiNGmCGUZvfn7rGzCc9OVNnY93Sm7LByuEmy8Ig== X-Received: by 2002:a5d:4351:0:b0:236:c820:97b8 with SMTP id u17-20020a5d4351000000b00236c82097b8mr5665053wrr.699.1667258294884; Mon, 31 Oct 2022 16:18:14 -0700 (PDT) Original-Received: from krug (87-196-74-163.net.novis.pt. [87.196.74.163]) by smtp.gmail.com with ESMTPSA id k5-20020a05600c0b4500b003c6c4639ac6sm8518661wmr.34.2022.10.31.16.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 16:18:14 -0700 (PDT) In-Reply-To: <87k04ggixk.fsf@posteo.net> (Philip Kaludercic's message of "Mon, 31 Oct 2022 14:35:19 +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+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246730 Archived-At: Philip Kaludercic writes: > Jo=C3=A3o T=C3=A1vora writes: > What existing hooks? The major-mode hooks, naturally. Using major-mode hooks and buffer-local variables is the standard Emacs way of attaching characteristics to buffers. The Elisp required is trivial and there are thousands of examples for doing it out there. There's no need to introduce new less powerful and more awkward languages in variables. >> It's quite clear that _some_ non-file-visiting buffers can be considered >> as belonging to a project's working set. But it's very very easy to >> come up with many that cannot be considered so. > > I have to admit that I am more and more inclined to make the list a > opt-in thing, where we explicitly mark those major modes that are tied > to a project. Yes, and we can always later overhaul project-owned to be function for doing more complex calculations based on the name of the buffer, for example. But a simple boolean would probably suffice for vc buffers, and other earmuffed buffers created by packages in Emacs. >> To name one. The above is just the converse of the solution proposed by >> Philip before. > > I would be fine with this in principle, my only worry is backwards > compatibility for those who use project.el from ELPA. We can try to make some backward compatible way, but this seems like the perfect occasion to activate this most reasonable header in project.el: ;; NOTE: The project API is still experimental and can change in major, ;; backward-incompatible ways. Everyone is encouraged to try it, and ;; report to us any problems or use cases we hadn't anticipated, by ;; sending an email to emacs-devel, or `M-x report-emacs-bug'. It sure seems like there were things that project.el's authors didn't anticipate. A mistake is a mistake there should be no shame in rectifying it. In practice, I doubt many people are setting these variables. A GitHub code search, where it is normally easy to find customizations of variables since users version their configurations there, turns up 0 results for customizations of project-ignore-buffer-conditions and not more than a handful for project-kill-buffer-conditions, for example. In contrast you can see hundreds of people setting things like eglot-autoshutdown or ibuffer-filter-groups (and settings of scroll-bar-mode are in the thousands). So I'd say the risk is minimal and the benefit considerable. Jo=C3=A3o