From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jay Berkenbilt" Newsgroups: gmane.emacs.bugs Subject: bug#53207: 28.0.91; create-lockfiles nil breaks file change detection Date: Wed, 12 Jan 2022 09:30:07 -0500 Message-ID: <509ddd0f-589c-45b0-9b60-5820f4c1d716@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27082"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-4569-g891f756243-fm-20220111.001-g891f7562 To: 53207@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 12 16:13:10 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 1n7fJF-0006k6-Fm for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Jan 2022 16:13:10 +0100 Original-Received: from localhost ([::1]:48302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7fJE-000769-3a for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Jan 2022 10:13:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7eeV-0001aI-1V for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 09:31:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7eeU-0000L7-MO for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 09:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n7eeU-0008Lx-A7 for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 09:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Jay Berkenbilt" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jan 2022 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53207 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.164199785132089 (code B ref -1); Wed, 12 Jan 2022 14:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jan 2022 14:30:51 +0000 Original-Received: from localhost ([127.0.0.1]:56533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7eeI-0008LQ-SM for submit@debbugs.gnu.org; Wed, 12 Jan 2022 09:30:51 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:55360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7eeG-0008LE-DE for submit@debbugs.gnu.org; Wed, 12 Jan 2022 09:30:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7eeE-0001AZ-7v for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 09:30:48 -0500 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:60799) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7eeB-0000Dn-9b for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2022 09:30:45 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 8D65E3201464 for ; Wed, 12 Jan 2022 09:30:39 -0500 (EST) Original-Received: from imap49 ([10.202.2.99]) by compute1.internal (MEProxy); Wed, 12 Jan 2022 09:30:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ql.org; h= mime-version:message-id:date:from:to:subject:content-type; s= fm3; bh=iMGg+6ILkAajrXDbIPywO2Tyj5LbbIfQywUcP57SumE=; b=dar8Htqq WaGmykHGiVRMljNa8r6ZImKEhHFNfuhx82DLPQP8C+ka93uPCFItZQBVicPdFX4O XoFTZuDfiwSC5TfxcgWI0nWs5BTjlS6bAPwJPaUCsg90230SElcygbK2eOjV3qts FilxFsYYlAUhfTt4Ka+1KuRD5C2SRSi6fWtxhqz0Hwmd6wP2tp5w6wqFejiI/FXt oWShJFEfhA0GTf62q88nyExxbanvs5cO1SN5hV8uMT0DkDyR7PyQqU4H7XaEUZjZ nXiNWAGh5YNNXyF4aXRYwh2aCCr4632sNv2FIWREu5yA/nlIoaosZTXoDFD9Pqp+ lEfRFshhXWuC4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=iMGg+6ILkAajrXDbIPywO2Tyj5Lbb IfQywUcP57SumE=; b=ivHM3/nvhsr78job3NGhKkpEIsvC03kA0ecf1GHiRIosr 0C315dAvb73UNorkr4ojDRo76C/CRFu/S89EjIziAdZPpEi6kxTUL7rVKUfRbb+L GzTKB/Pcyy4tsiLu7sv6MNWGc9EJU+wumcfDmDT/wQoBwYKLSnC74IaE4UdIr4d5 J4P/E5efXNCPSr2kqrP4paipBGPUdOByBz0nripDC4rEpVenFPbX2PqIIeVchjBu F2kWUgTvmNcBpGBE9g5ZEFXgBjIz9WWSL3DjXG/xIsrvprkHSS58CtKNMy1xQulf JtemA01yEmy+IhGBg1y+bzQ16Gt14ChkMthCcCVHg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrtddugdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtredtre ertdenucfhrhhomhepfdflrgihuceuvghrkhgvnhgsihhlthdfuceovghjsgesqhhlrdho rhhgqeenucggtffrrghtthgvrhhnpeekhffhleelkeeigfetleduhfelteekffdvhfegje duieeigeevheevueejfeejteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpegvjhgssehqlhdrohhrgh X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id BBA91F6007E; Wed, 12 Jan 2022 09:30:38 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Received-SPF: pass client-ip=64.147.123.19; envelope-from=ejb@ql.org; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:223998 Archived-At: X-Debbugs-CC: ejb@ql.org This bug is reproducible with emacs -Q. emacs 28.0.91 and emacs-27.2, with -Q, behave identically and correctly in the following scenario: * outside of emacs: rm /tmp/a; echo one > /tmp/a * In a fresh emacs -Q, C-x C-f /tmp/a * outside of emacs: touch /tmp/a * In /tmp/a in emacs, it is possible to edit the file freely and save, which is correct since the contents have not changed * In /tmp/a in emacs, save any changes * outside of emacs: echo test >> /tmp/a * In /tmp/a in emacs: try editing and get an immediate prompt that the file has changed. With emacs 27.2, (setq create-lockfiles nil) does not change the above behavior. With emacs 28.0.91, (setq create-lockfiles nil) results in the following changes in behavior: * outside of emacs: rm /tmp/a; echo one > /tmp/a * In a fresh emacs -Q, C-x C-f /tmp/a * outside of emacs: touch /tmp/a * In /tmp/a in emacs, it is possible to edit the file freely, but **SAVING THE FILE RESULTS IN A PROMPT** (a has changed since visited or saved...) even though the *contents* of the file have not changed (only its modification time) * Say no to the prompt and M-x revert-buffer, accepting the prompt to revert the modified buffer * outside of emacs: echo test >> /tmp/a * In /tmp/a in emacs: try editing. **NO PROMPT IS GIVEN; EDITING CAN BE DONE FREELY** * Try to save the file. Get the "a has changed since visited or saved" prompt at this time Bottom line: in emacs 27.2, setting create-lockfiles to nil does not change the behavior. In emacs 28.0.91, it does. I also noticed this in 28.0.90 but hadn't had time to figure out how to reproduce it without my customizations. I saw 'lock-file-name-transforms' in NEWS. I disable create-lockfiles because I never run emacs on a multi-user system with my default settings, and the dangling symlinks confuse too many systems. It may be that, if emacs-major-version is >= 28, I can use lock-file-name-transforms to cause lock files to save in a separate directory, but I find that I don't need lockfiles at all with the default behavior of emacs 27 and 28 regarding change detection, at least my on Ubuntu platform. Is this change intentional? If so, can I configure something to go back to the old behavior? It seems like a bug to me -- I don't see why create-lockfiles should have anything to do with this behavior, and it did not in 27.2. I've been running gnu emacs since version 18 in 1987 and have seen the evolution of lock files over time. I was euphoric when emacs started being able to notice when an update to a file's modification time didn't change its contents. It makes it so much easier to do things like git rebase, which I do many times a day. Thanks. The text below came from M-x report-emacs-bug on emacs-28.0.91 -Q In GNU Emacs 28.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2022-01-12 built on jblin Windowing system distributor 'The X.Org Foundation', version 11.0.12013000 System Description: Ubuntu 20.04.3 LTS Configured using: 'configure --prefix=/usr/local/emacs-28.0.91' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 51426 5400) (symbols 48 6608 1) (strings 32 18372 1964) (string-bytes 1 610917) (vectors 16 14475) (vector-slots 8 191331 9434) (floats 8 21 35) (intervals 56 200 0) (buffers 992 10))