From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#72019: [PATCH] Add project argument to project-kill-buffers Date: Thu, 11 Jul 2024 03:18:46 +0300 Message-ID: <5c12905c-370e-419b-8ff1-657341da68cf@gutov.dev> References: <86ed81o5oc.fsf@gnu.org> <8634ohnwpz.fsf@gnu.org> <86zfqpm9ur.fsf@gnu.org> <86v81dm8te.fsf@gnu.org> <86sewhm5ri.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15535"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 72019@debbugs.gnu.org To: Eli Zaretskii , Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 11 02:19:20 2024 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 1sRhWo-0003qZ-EP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Jul 2024 02:19:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRhWb-0003da-Vh; Wed, 10 Jul 2024 20:19:06 -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 1sRhWa-0003dB-BH for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 20:19:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sRhWZ-0002Jt-3A for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 20:19:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sRhWY-0006dg-B5 for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 20:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jul 2024 00:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72019 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72019-submit@debbugs.gnu.org id=B72019.172065713825510 (code B ref 72019); Thu, 11 Jul 2024 00:19:02 +0000 Original-Received: (at 72019) by debbugs.gnu.org; 11 Jul 2024 00:18:58 +0000 Original-Received: from localhost ([127.0.0.1]:50566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRhWU-0006dO-00 for submit@debbugs.gnu.org; Wed, 10 Jul 2024 20:18:58 -0400 Original-Received: from fhigh2-smtp.messagingengine.com ([103.168.172.153]:60039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRhWS-0006d9-B3 for 72019@debbugs.gnu.org; Wed, 10 Jul 2024 20:18:56 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 9B4521140AA4; Wed, 10 Jul 2024 20:18:51 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 10 Jul 2024 20:18:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1720657131; x=1720743531; bh=0GtM6Ogf50st+0BFiDpavtdExsiF0SClfpZAL65uYfM=; b= IpgecCjRHtj6q5G+DtOTuAcnnb0BGfLOQUqDV/Fw2EtYec4U7OABrgo1p/ORGUdr layMfwqYFB8lDdMnPWvtOkq/TzGYYrh1AhGusYAlIc5zBuiAvH7SAnRa/O3g+BwU oTNf1i8jUoXZDEdsu9sV+dSuB1E3aVxUVoaloQTbytht+/cla1C4BZc8yAq+gYeK 1w7hMrEymZcGLG9n35835R5YSe5X3l4mOUmiDaP8bfpTxGfhr//FeP/8u6EG3Vgi sgvxZdSvOOMTpNnS0UVOfMN5/Cim8TrY3I2IjnREF95zXj4l+m2ctsoZhDI2i/mu 1V0HFTNwTVWI/bVv3udEzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1720657131; x= 1720743531; bh=0GtM6Ogf50st+0BFiDpavtdExsiF0SClfpZAL65uYfM=; b=C 0tuvPo0ci9fPP0wqNXI0At0ijHYEqfq2LFn1T+8p5hoqRw8pK/7s10FGPv/7B7/b tZ3JWIGbZRYYhfkOFGFmo5cbkNWSRnxNAekWGnk4lcPztQCcZCug/qgII+KYcD8P OEAdnUxCskVHQexXrWgTg7v9FE/KLwxZG4sS+WJqBXV0k3TPK2IVtPMxmdJtLgWo m0Qsa1/BnuIFbvMIif9HnO8GS1lmcNl3OjgmrOZX1TrsJvv8h+LyI1cRRptNzXd9 cBy8m3uu3oUuZeOv+g4hhPWb6WlaYJJFz3PwsHT/ghsp/JnZjwH+a1f+87S17BaB T9jHr+BfipIyVjuIN4NZg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrfeefgdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Jul 2024 20:18:49 -0400 (EDT) Content-Language: en-US In-Reply-To: <86sewhm5ri.fsf@gnu.org> 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:288704 Archived-At: On 10/07/2024 22:00, Eli Zaretskii wrote: >> Because it is also nicer to explicitly indicate what project the Lisp >> program is operating on. Going through project-current means there are >> a number of possible bugs. Lisp programs should pass in the project >> instance; this is preferred for new project.el-using code. > If this is the current trend in project.el development, then I have no > objections to it. I find it a bit surprising that the original > motivation for this was something completely different, though. I don't know if it's going to be a big direction, but the logic seems sound for a command like this. The original choice was more or less arbitrary. The change in the patch is backward-compatible, so it shouldn't hurt. The particular benefit scenario that I can see is this: * The project directory has been deleted, but a number of its buffers it still around. * So it doesn't seem feasible to compute the project instance automatically (the project markers are gone, etc). * But if something has held onto a project object, its method (project-buffers) might feasibly complete without errors. For project-kill-buffers in particular it seems like a real advantage - getting to clean up buffers belonging to an already deleted project. And if one step 2 or 3 fails with an error, oh well, it doesn't seem like we could have done better.