From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock Date: Wed, 08 Nov 2023 15:50:34 +0200 Message-ID: <83jzqs1hhx.fsf@gnu.org> References: <83sf5g1lko.fsf@gnu.org> <9d460f36-6035-da54-3abc-12171ac8977f@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34357"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sbaugh@janestreet.com, 66993@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 08 14:51: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 1r0iyC-0008j4-4r for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Nov 2023 14:51:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0ixr-000289-M3; Wed, 08 Nov 2023 08:51: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 1r0ixo-00026K-GU for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 08:51: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 1r0ixo-0005bL-8B for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 08:51:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0iyQ-00075d-CR for bug-gnu-emacs@gnu.org; Wed, 08 Nov 2023 08:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Nov 2023 13:52: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.169945149327218 (code B ref 66993); Wed, 08 Nov 2023 13:52:02 +0000 Original-Received: (at 66993) by debbugs.gnu.org; 8 Nov 2023 13:51:33 +0000 Original-Received: from localhost ([127.0.0.1]:44230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0ixw-00074w-P1 for submit@debbugs.gnu.org; Wed, 08 Nov 2023 08:51:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0ixs-00074e-O4 for 66993@debbugs.gnu.org; Wed, 08 Nov 2023 08:51:31 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0ixA-0005Fp-2Q; Wed, 08 Nov 2023 08:50:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=z64JTs3mtn69t8ypJPaN89B/2y7yLzekxiiJ5chmI8U=; b=paG7DRBRF01Z L6h0Akk7ZeUw0+9q4RM4sFjr0sT1RDdiSTC6ScBsuiUwOKOqyDE/LMzDfR8xULqyikiXPZEfiQuPR LEcf+CdhZP4OyXmAYaNfkjyj8lIcrxXPL3o1Qutvc5IFokBio7459PVH9NioBi7xLUlFPcpr5ydIc /ecRmWS2pyVe8B2Xswi5/51pdptlrt6vsrLTNNEm/TjDJt0jRH174SmClVX/H5B10GH1XOj2qO3Ra +NvVnjn9oeBr60PpBFLJ4KMc4mOeAzBkEE5tZFB5dWpKCI7jmeAWVK2J8YhAUWuDQwIjtRSty7MH/ qjrfcwBx2oIIVl1ycMH2qg==; In-Reply-To: <9d460f36-6035-da54-3abc-12171ac8977f@gutov.dev> (message from Dmitry Gutov on Wed, 8 Nov 2023 15:26:11 +0200) 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:273987 Archived-At: > Date: Wed, 8 Nov 2023 15:26:11 +0200 > Cc: 66993@debbugs.gnu.org > From: Dmitry Gutov > > On 08/11/2023 14:22, Eli Zaretskii wrote: > >> From: Spencer Baugh > >> Date: Tue, 07 Nov 2023 16:28:04 -0500 > >> > >> There are several features which will cause Emacs to frequently call > >> project-current, and therefore call project-remember-project, and > >> therefore sometimes call project--write-project-list whenever a new > >> project is seen. > > Why does project-current immediately writes the list to the file? Why > > cannot it keep the information in memory and write it only when the > > session ends, or at some random rare opportunity? > > It could indeed be written from kill-emacs-hook, or just the next time > an opportunity presents. > > With the latter approach, though, it would be handier if the > lock-prompter signaled a specific error we could catch to reschedule saving. Why do you need an error when you can use file-locked-p to check up front that the file is locked?