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:03:43 +0200 Message-ID: References: <83sf5g1lko.fsf@gnu.org> <9d460f36-6035-da54-3abc-12171ac8977f@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="14553"; 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: Eli Zaretskii , 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:04:37 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 1r0pj0-0003N7-Iw for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Nov 2023 22:04:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0pis-0000Yq-CM; Wed, 08 Nov 2023 16:04: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 1r0pip-0000VL-K4 for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 16:04:23 -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 1r0pip-0007qZ-Bn for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 16:04:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0pjS-0005DG-1e for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 16:05: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:05: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.169947747519998 (code B ref 66993); Wed, 08 Nov 2023 21:05:01 +0000 Original-Received: (at 66993) by debbugs.gnu.org; 8 Nov 2023 21:04:35 +0000 Original-Received: from localhost ([127.0.0.1]:46384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0pj0-0005CU-K1 for submit@debbugs.gnu.org; Wed, 08 Nov 2023 16:04:34 -0500 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:49929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0pix-0005CD-MD for 66993@debbugs.gnu.org; Wed, 08 Nov 2023 16:04:32 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id C052D3200947; Wed, 8 Nov 2023 16:03:46 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 08 Nov 2023 16:03:47 -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= 1699477426; x=1699563826; bh=RjvM8+uC/0yBJIxspxDDSCuQIioqKvbd8KP DBO9Va4Q=; b=d4IpzAZPYiDUD2HXQu2J9h65onv8MnRq7+VkeSEQFiVyj9TmWR4 9W3JoCd/XVxLfv2KT9zxtExFoxIFG9jaBOkytNjvSBAwlUipZxCedpiliiq7ZB8W VzsXpGRKGNg8QwPY9vKj80t2tMtHe5V1li6OzPQ0zUQks9hVHo870DO0sHCCEfje 5D1+lvW78G1dKQEN63QqOe7q8NygkDpTJphRXMt3HpwTs5Ud09WSLuBVVzspAwSc aq74aBULs6gRi4/AcUy6tYJVAwCnfiPZTc0DJyqZcj5RVEk9RvX8u0DQoWUDm7xz CFM4kb5PpXYDrBBT7oTBhm8vfNIlBnG7aig== 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= 1699477426; x=1699563826; bh=RjvM8+uC/0yBJIxspxDDSCuQIioqKvbd8KP DBO9Va4Q=; b=SC3f6agvyufZMZBEwjdpQJ8JyesRAXZpHPPClVHoCxb+H+LLnju nBlJVEIIZ95kCPpfRkJAPTZZ5nDXSmqqd1AD3VCANLnzToisCMDt625dUhKa/dFb NfJ7gWMe0l+CsUEazlj3K5avX2ecjqjP2YdF3R4qbhT6hKX3aO9I6/ULVwRQa2GO V3r+f1u5aH1J63rU+96w3j9jVVjmHuusujynuvnTSUg09txWRx0O6O4t06/XQGTn xflNTVj14K3nx53eYhUJsJP928XmeJ32JCyWCKzC60N1G8nU/I9+Lk33ec9BbsaS +kdjAHY+nYgoWrLISpbAYMqrt/JRE0MgXng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudduledgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpefhhfelieffgfevveduuefgieefueffvefguedtieethfeigfetvdehueev vddvfeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Nov 2023 16:03:44 -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:274016 Archived-At: On 08/11/2023 17:36, Spencer Baugh wrote: > Separately: Currently, even without any locking issues, if there are > multiple Emacsen then project-list-file just contains the project--list > of the last one to write. So they're constantly clobbering each others' > added and removed projects. If we do the writes more rarely, then we > could try to read project-list-file first and add or remove the projects > that were added or removed during the life of this Emacs instance, > instead of just blindly writing out project--list. Then if there are > multiple Emacsen around, their changes to project--list won't clobber > each other, they'll just be cleanly merged. Does that sound reasonable? > > Either way, I can implement this. If you're sure that the added utility is worth the complication in the code, why not. Please post some performance measurements for before/after, though. E.g. how long project--write-project-list takes without re-reading the file, and with the new, merging approach. Though it's probably okay. BTW, that reminds me of the Fish shell's history merging between parallel sessions. I think it was automatic in some version, and now it's manual again (https://github.com/fish-shell/fish-shell/issues/825).