From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#75209: 30.0.93; Emacs reader failed to read data in "/home/nlj/.cache/org-persist/gc-lock.eld" Date: Sun, 05 Jan 2025 13:18:53 +0000 Message-ID: <87h66dpfeq.fsf@localhost> References: <878qrxgg74.fsf@Phoenix> <864j2lnf1j.fsf@gnu.org> <87ldvvhhqo.fsf@localhost> <87frm3elkr.fsf@Phoenix> <878qrvhe0k.fsf@localhost> <86v7uzljc5.fsf@gnu.org> <87ldvug9a3.fsf@localhost> <86ttailoi9.fsf@gnu.org> <87y0ztqg65.fsf@localhost> <86y0zthx11.fsf@gnu.org> <87pll1pofu.fsf@localhost> <86ldvp8qaz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33148"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75209@debbugs.gnu.org, njackson@posteo.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 14:17:24 2025 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 1tUQVP-0008Ut-TJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 14:17:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUQV8-0002SN-FZ; Sun, 05 Jan 2025 08:17:06 -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 1tUQV5-0002S3-4o for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 08:17:03 -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 1tUQV4-0002ih-Of for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 08:17:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=RJK4b4OXeXgcYHCTmnXmi2eZPBvjFsziA1STcyuqEuc=; b=DRTcgQVQ3vtWUnAQh8KnXljEpau/BjiMBJRGflqjpPCB4PwE15HrEmTodXjUpSjSus8wSvMev3SFqQGo58vYbu4jHvmHSFcGH7VOw1sO5Ou7PsWDA1xhfMYkqxjAX1bKBl6TIGgsXcamu8WEngyoAjP84mB/Fvw0Mi34p/ZCzbeTuqySh5p36kLyF/XimtQqXvexthGSgV1EcRRP++qYR4KI67WuHw8zdMJGMnXcB2BXS+NfNePptQYfVnf4Df3oe6UC4T2J0onWvIWGkuqEj50yfRCAtrlXhv0yfRar72npv7euHTstJNk7ocyKo71KGo/u6hibd3kEMK8PwYgaRw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUQV3-0002PB-Tx for bug-gnu-emacs@gnu.org; Sun, 05 Jan 2025 08:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 13:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75209 X-GNU-PR-Package: emacs Original-Received: via spool by 75209-submit@debbugs.gnu.org id=B75209.17360830079220 (code B ref 75209); Sun, 05 Jan 2025 13:17:01 +0000 Original-Received: (at 75209) by debbugs.gnu.org; 5 Jan 2025 13:16:47 +0000 Original-Received: from localhost ([127.0.0.1]:60349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUQUo-0002Oe-HJ for submit@debbugs.gnu.org; Sun, 05 Jan 2025 08:16:46 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:42239) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUQUi-0002OH-IC for 75209@debbugs.gnu.org; Sun, 05 Jan 2025 08:16:45 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8CE3C240101 for <75209@debbugs.gnu.org>; Sun, 5 Jan 2025 14:16:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1736082994; bh=hfOTYeO4A+hn4AryVXfKhY68rjOuOMLcnFOn41Nw2t8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=Lx7/Bn0CeRwYMo+9Bw1BiO87QNnDXpMjPhfLe5wzv76/FE9ZhCTC1Y0/arLRs1OCp TMhSv9rKC8JORZmgP/ncomwps1dAWrWUIByNfN7Gu0AJ/hjxiKTtHdA5oyA4DPhoX5 7A0thllu/2MwmfbbVElL3GNPQXSHwxSxbQsZhQMkWlfC6gJ9G6PCoJ/lLNr7PUwo+P 96YhPzdxwA3BveCuDcZSj81007NFfocnbwoLAV1AfP2vnZsCCojv/FaYws0fw2XXpc AWAbhakgnGUOnDh2+smVgsrP2MHmxC9YwRgmaZH+VLeuLHm8Ym2AoujBkMYOGKOyoE /8TFzACrVoW8Q== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YQyWP752Kz9rxK; Sun, 5 Jan 2025 14:16:33 +0100 (CET) In-Reply-To: <86ldvp8qaz.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:298559 Archived-At: Eli Zaretskii writes: >> You are right. The only problem is short-living caches that should be >> cleared at the end of Emacs session that created it. > > Does this mean you have ideas for solving this problem by reading the > file before it is written? Or does this mean you already read the > file before writing to it? The problem is that not every piece of cached data is stored in the index on disk. Some caches should just live for the duration of Emacs session that creates them. Yet, other parallel Emacs sessions should not "GC" those transient caches. >> Org uses `with-temp-file'. Is there an alternative built-in and more >> robust way to write string to file? > > Writing to a file is not atomic. If you instead write to a temporary > file, then rename it to the final file name, the renaming is atomic on > Posix filesystems. > > This would mean you can still use with-temp-file, but with a temporary > file name as its argument, and you need to add a single rename-file > call afterwards. That's fine. I just thought that there is some existing function doing exactly this. If not, I can do it manually, of course. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at