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#66993: [PATCH] project.el: avoid asking user about project-list-file lock Date: Wed, 8 Nov 2023 23:14:36 +0200 Message-ID: <4a7ef18e-f559-8835-22f4-3bb987e5e752@gutov.dev> References: <5aec9d1b-f005-3870-f436-ecc01fc27027@gutov.dev> 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="33728"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: 66993@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 08 22:15:48 2023 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 1r0ptr-0008UF-KK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Nov 2023 22:15:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0ptX-00043I-EV; Wed, 08 Nov 2023 16:15:27 -0500 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 1r0ptW-000432-BF for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 16:15:26 -0500 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 1r0ptT-0001Pz-9i for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 16:15:26 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0pu6-0005U5-08 for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 16:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Nov 2023 21:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66993 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66993-submit@debbugs.gnu.org id=B66993.169947812921030 (code B ref 66993); Wed, 08 Nov 2023 21:16:01 +0000 Original-Received: (at 66993) by debbugs.gnu.org; 8 Nov 2023 21:15:29 +0000 Original-Received: from localhost ([127.0.0.1]:46398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0ptY-0005T7-VT for submit@debbugs.gnu.org; Wed, 08 Nov 2023 16:15:29 -0500 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:33281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0ptU-0005Sr-Qk for 66993@debbugs.gnu.org; Wed, 08 Nov 2023 16:15:27 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id BA47E32008FA; Wed, 8 Nov 2023 16:14:39 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 08 Nov 2023 16:14:39 -0500 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:sender:subject:subject:to:to; s=fm2; t= 1699478078; x=1699564478; bh=s/yzTYLZsOiycd2HlzzkcYnCPrkcBgrTOy7 H64dqCuM=; b=lCC8R+ZW+wH7+lNlEOlfDdBTYqqKcHiKpkzysQttNaBxWUp0TIV U+IpG8zJ9mGRcFykbCFywOUFZOsiCbb9PYXSxEr63ergljQjZrfBdHlAgNj5Xj3D Pa1fqUNMXEZNepL+xWJrV0en+GodFL+PLB6ymV4+JU2yvdi8OTaus8prdt+Ttyxe Ug/x5jk/bcExQUFG2lqvQnxrEGZ61LczsT/loYWo35bIaqmAb7Hg79SBBGuzN3Yf 2EiXXUCzKRhO4NIkawHQbgr618ZhSoaNqL//c2yrwCuNmA+jcQlmQ/vvMsF2VvZa O1wUlruvLffWWWTuwk/BPKi031/aVDqVNEA== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1699478078; x=1699564478; bh=s/yzTYLZsOiycd2HlzzkcYnCPrkcBgrTOy7 H64dqCuM=; b=TNfcBidJyBSkufKHXa1UPp7tGTyO01ucbxaGnpY9+qvQdkqOC3D QLvGhnc7sl974kv8ZoWmWQyZOvGFzoyJWYBW32e+q4WuE/s1rb0VEVyJW2bY0Gfg hXFNLWbDfN0vEdCokTC4bAFW2VT0LqnEhi+U8Ail6yLpHMHpHhfvUbZuI4Wt2Jyw ZkF+uG2Pd3GYT62HdwZg/4zQxL1tQvTucaP1A2YDOTRViKTDDufeb85YfqWElXPr C4fGa788ZSo9VAuiqRKtc2NcMFZQ0qbR1Wm0eROPq0flAAb4y6WgEu/HwrbvL/Hr ZcmysZMg0eELZgVvrNem78ICl4wSJDMjhaw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudduledgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Nov 2023 16:14:37 -0500 (EST) Content-Language: en-US In-Reply-To: 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:274019 Archived-At: On 08/11/2023 17:25, Spencer Baugh wrote: > - Concurrent calls to regular project commands > (e.g. project-async-shell-command or project-compile) from two > Emacsen, > since those set MAYBE-PROMPT=t Since they are usually triggered manually, the user will have to try hard to launch them at the same time. > - Concurrent calls to project-remember-project/project-forget-project > and similar functions. (This is what my project-watch does, since it > calls project-remember-project when a new project shows up in a > directory, and if I'm unlucky that will be at the same time as another > Emacs instance.) Note that if your code triggers the rewrites of the project-list file frequently enough so that the conflicts happen, doing more work during that time (e.g. reading, re-serializing, and then writing the file) might actually cause some disk/CPU usage increase. (Although if the conflicts happen due to synchronous firing of inotify watches in parallel Emacs instances, then probably not.) BTW, the merging algorithm to use it is not very obvious (especially if we're going to do that in kill-emacs-hook). E.g. if one instance removed a project from history and another did not, we probably want to have it removed in the "merged" version. > I guess that makes it less of a critical issue, but it still seems to me > that this is worth fixing. I'm glad to hear that the current design is working fine for the expected usage scenarios, but indeed, why not make it more resilient. If we don't sacrifice too much of something else.