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#53207: 28.0.91; create-lockfiles nil breaks file change detection Date: Thu, 13 Jan 2022 16:02:04 +0200 Message-ID: <83h7a73fab.fsf@gnu.org> References: <509ddd0f-589c-45b0-9b60-5820f4c1d716@www.fastmail.com> <83sftr3nyx.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27044"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rgm@gnu.org, larsi@gnus.org, michael.albinus@gmx.de, 53207@debbugs.gnu.org To: "Jay Berkenbilt" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 13 15:03:45 2022 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 1n80hb-0006l7-Rp for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Jan 2022 15:03:44 +0100 Original-Received: from localhost ([::1]:59954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n80ha-00057j-Dx for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Jan 2022 09:03:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n80h3-00054O-Qi for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2022 09:03:09 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n80gw-0001lW-8B for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2022 09:03:09 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n80gw-0001xt-5Z for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2022 09:03: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: Thu, 13 Jan 2022 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53207 X-GNU-PR-Package: emacs Original-Received: via spool by 53207-submit@debbugs.gnu.org id=B53207.16420825437497 (code B ref 53207); Thu, 13 Jan 2022 14:03:02 +0000 Original-Received: (at 53207) by debbugs.gnu.org; 13 Jan 2022 14:02:23 +0000 Original-Received: from localhost ([127.0.0.1]:60541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n80gI-0001wq-TC for submit@debbugs.gnu.org; Thu, 13 Jan 2022 09:02:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n80g8-0001wQ-PL for 53207@debbugs.gnu.org; Thu, 13 Jan 2022 09:02:20 -0500 Original-Received: from [2001:470:142:3::e] (port=44152 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n80g3-0001gf-5O; Thu, 13 Jan 2022 09:02:07 -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=SM2ghtuWTGfqxTNvt28v0f9H26rOvyNJfVrCjbuZDRg=; b=RiC2iYVuU49u Xj73qGikrHFbHAX20nRw7G9yJemhlzYzP0cbxB2alRDz3MzLucfG6G6GOEiOK7/OrjWy3t9HHACdY 1GmkLqO1aoDM4j+JkbqWm0PjBWuwaAXB7O1hTw7pLjDDRO7ug8oqE1N+OTeQXfRTE8PMrx0/52Tis AlF9sJ5CWNfH2zlGB3vSZ4hmvdHOb5fEGfJiA/ml9KsGMR07TDHJ//qxomOim6/dtQFmB1oX//91o pgycNVsNQaGZVMS+QLT+PZUBIZS5e7ce8kR+kWXlsjwwm8qxgX7i34k/i4SUvZ3dOzJWkNoZ/VYUS irHnpKIOD8yyKf95lWn6lw==; Original-Received: from [87.69.77.57] (port=3206 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n80g2-00018q-Uq; Thu, 13 Jan 2022 09:02:07 -0500 In-Reply-To: (ejb@ql.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" Xref: news.gmane.io gmane.emacs.bugs:224112 Archived-At: > Date: Thu, 13 Jan 2022 08:11:34 -0500 > From: "Jay Berkenbilt" > Cc: 53207@debbugs.gnu.org > > For my edification, can you explain how the 27.2 behavior of noticing > when a file's contents had changed immediately is not adequate without > lockfiles? First, Emacs 27 wasn't looking at the file's contents, it was looking at the file's modification time. More to the point, the verification of the file's modification time that is now disabled when create-lockfiles is nil is part of detecting editing collisions, so when the user opts out of it, it makes sense not to detect _any_ collisions, including those detectable by verifying that the file wasn't modified since last visited or saved. The use of lockfiles is an implementation detail, and the fact that we only need it for 90% of the feature, not for 100%, is not significant enough IMO. > It seems to me that there are two separate issues here. A lock file > would enable you to immediately notice if a user on a *different > system* is in the process of editing a file and has unsaved changes. No, it also works when the same user on the same system edited the file from another Emacs session. That is a valid use case: some people start more than a single Emacs session on the same system. > On the other hand, the other behavior I'm talking about allows you to > notice immediately when you begin editing if the file on disk has > become out of sync with the buffer contents. That part is done when you save the buffer. It is unaffected by create-lockfiles.