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 15:58:25 +0200 Message-ID: <5aec9d1b-f005-3870-f436-ecc01fc27027@gutov.dev> References: 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="36389"; 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 To: Spencer Baugh , 66993@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 08 14:59:41 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 1r0j5k-00099X-2W for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Nov 2023 14:59:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0j5a-0004Ic-Qq; Wed, 08 Nov 2023 08:59:26 -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 1r0j5Y-0004GZ-R8 for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 08:59:24 -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 1r0j5Y-0007a5-BT for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 08:59:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0j6A-0007Ha-S7 for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 09:00: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 14:00:02 +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.169945195427907 (code B ref 66993); Wed, 08 Nov 2023 14:00:02 +0000 Original-Received: (at 66993) by debbugs.gnu.org; 8 Nov 2023 13:59:14 +0000 Original-Received: from localhost ([127.0.0.1]:44240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0j5O-0007G3-7b for submit@debbugs.gnu.org; Wed, 08 Nov 2023 08:59:14 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:41839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0j5L-0007Fo-PD for 66993@debbugs.gnu.org; Wed, 08 Nov 2023 08:59:12 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 126BF5C00E1; Wed, 8 Nov 2023 08:58:28 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 08 Nov 2023 08:58:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=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= 1699451908; x=1699538308; bh=83SMuVvnPsRD8boJjudEiHG0t8IUAmHApU3 8X30VmZM=; b=U41wmWu1pLhAtrWEPt9TZ9Pfqb5QtPX+DcONVuy+FUvK13o4vm3 9xahSQorQ+7wuqumASjkHPTVXz6AQrJT1AzGISJvaxVcS8ljJHuzaQf2fE8UBRY8 478LpfeB0bt5k0PQ6FwoaN9xvlzv+PK3t/5sHwuuRucw+Uvkg9ockXVh7Kg8WioO D1QwyFHlVCvQkonyfO+Y/z3xLXkp2A70i4jzbEANprm7bxrbfbCq+WAUaH09QfHT 1RdgnaDgB5GHB0u41TvZWjWXNofy6TlAoyVyXpU5qojBC/nhY0GpSfdOLnz21pcX R8gIADS81WhUpvfcNwbA+xtTyCpLSO8ePdg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1699451908; x= 1699538308; bh=83SMuVvnPsRD8boJjudEiHG0t8IUAmHApU38X30VmZM=; b=X KtC9IBk0+aYUNr89AZpo/LUCCF7YMNQylG6FBULGaQMxkjIsqKmVMuDAVb1tllje K1mF6YJhjE+nIJ0xdpU5P5NfBrXTaRvIS9A9GjbLjCYu+/yvpB68W92fjEWclcr4 3uXBrm3WEtHYybGit0P5soXikWcX1rLaydsk77JpXAs14wsYxLB7/1hVmyUjg2x+ vXoQQddKC/ZrudsM7neXZID7JeXTMm2i+F6cntL0eSTq7o+qHAwEihX1PBRPpRo5 I40QWJsQgnmoZHemQDJYaje3wEXQk0XdYs4ItE9NhRruJUu34GVjNy3cq+JNSA3Y mn4MDU+dCePSlOKpYCJYg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudduledgheejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeghedthedujeeiteeutddtjeekheejteeukeehffdutdejuedvfeevueeviedu udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Nov 2023 08:58:27 -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:273989 Archived-At: On 07/11/2023 23:28, Spencer Baugh wrote: > - project-mode-line will call this on mode-line update > > - My own private project-watch will call this based on file-notify > events. > > If a user has multiple Emacs instances open using one or more of these > features, it's fairly easy for both of the Emacs instances to see a > new project at the same time. In that case, they'll both call > project--write-project-list at the same time, which will clash and run > ask-user-about-lock. This will happen frequently if the user is often > looking at new projects. Hmmm. What happens if we just show two buffers from different projects in the same Emacs instance? Do the mode-line refreshes trigger the changes in the list of remembered projects and subsequent writes to disk (e.g. alternating the "current" project between these two, potentially many times a second)? If so, we'll need a way to inhibit these updates, at least from the mode-line formatter.