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: Thu, 13 Jan 2022 08:06:24 -0500 Message-ID: References: <509ddd0f-589c-45b0-9b60-5820f4c1d716@www.fastmail.com> <83bl0g6f29.fsf@gnu.org> <3759fdad-fb95-4af8-b2bf-146abb81eb3d@www.fastmail.com> <83pmow4r9q.fsf@gnu.org> <655743d1-b695-4d22-ae21-cf195434a880@www.fastmail.com> <83mtk03zlp.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="27636"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-4569-g891f756243-fm-20220111.001-g891f7562 Cc: 53207@debbugs.gnu.org To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 13 14:07:56 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 1n7zpa-0006yH-6V for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Jan 2022 14:07:54 +0100 Original-Received: from localhost ([::1]:58898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7zpY-0003Of-H4 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Jan 2022 08:07:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7zov-0003Nj-LT for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2022 08:07:14 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39322) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n7zok-0000Z7-BN for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2022 08:07:13 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n7zok-0006Tc-7n for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2022 08:07: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: Thu, 13 Jan 2022 13:07: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.164207921724883 (code B ref 53207); Thu, 13 Jan 2022 13:07:02 +0000 Original-Received: (at 53207) by debbugs.gnu.org; 13 Jan 2022 13:06:57 +0000 Original-Received: from localhost ([127.0.0.1]:60458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7zoe-0006TH-NK for submit@debbugs.gnu.org; Thu, 13 Jan 2022 08:06:57 -0500 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:33671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n7zoa-0006Sz-HC for 53207@debbugs.gnu.org; Thu, 13 Jan 2022 08:06:55 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id A94A23200F72; Thu, 13 Jan 2022 08:06:46 -0500 (EST) Original-Received: from imap49 ([10.202.2.99]) by compute1.internal (MEProxy); Thu, 13 Jan 2022 08:06:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ql.org; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm3; bh=bFmCjGDgihw83bWsQg/nwutJVfS2vZ3 +ZG2sExVHMYQ=; b=XbIFqtk/g31v7Wse/mICKeA1cGkGZCpd5gMBnbxwP7kpMFk KLlAMM6WTshdwCjaEr7iLMHJZGcbNylylxdqjIaXidKrX8ib3ltosOVADQb5s0K6 BQ1a5TfOH/LfeP1Z8E3eAvmF95QjNJ1kDuMXt5FiYU+CocRx2B7GSBhja3jx/8bU IwOxDuqEZg6pXLEUP0K2U7tc80b3Zb8dCk5vyS5s5G7FPOk9iFEgxtQmH/WPyk3n RzO1onZmLjJ1j9iLCbXxPvbDFPI1xNyVyyvRszmVC4/G1EU7AMcpPvVxR+bY1p1T Rdlh9XkRu8X48mRVTv0DiOIuJUeLviJZ2mYfZ1A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=bFmCjG Dgihw83bWsQg/nwutJVfS2vZ3+ZG2sExVHMYQ=; b=CiPMdupXP9wjcP9/RULfcu ABZFWKM7WacX6QuS2j4u50sZBGUbgIwtI5dFCVI2sn/U8IIv+gSTEGQDpmlKUIsY 0fviKj969fQ85vMgFIdlzpF02KkZdDyHJw8U3kO7LHS6iNwCUx17zszAdEyESwFf aZeqoxIYHr1CQ8WnqtQCWuw8L0G73h0ylPGoAFzgMK/Mou5IcHmSxXp8LAlU+SZb NcFhLjldganZiAGZbk0cwOPQS1EfeysMafr45nWteF/Dv7M5gUOsTg/hFG0wUnzd 3KZYrZJPnnijOLplRdMbbTn0LG7HZ6WOVKNVP++nghNG/yjQmTwyYVQbbe/ONZyg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrtdefgdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedflfgrhicu uegvrhhkvghnsghilhhtfdcuoegvjhgssehqlhdrohhrgheqnecuggftrfgrthhtvghrnh epveekuddvieehgeekhedvfeehheeugeeuffffheeukeejleelueefkedtieeutdfhnecu ffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepvghjsgesqhhlrdhorhhg X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id F006DF6007E; Thu, 13 Jan 2022 08:06:45 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <83mtk03zlp.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" Xref: news.gmane.io gmane.emacs.bugs:224102 Archived-At: On Thu, Jan 13, 2022, at 1:43 AM, Eli Zaretskii wrote: > > Date: Wed, 12 Jan 2022 16:35:15 -0500 > > From: "Jay Berkenbilt" > > Cc: 53207@debbugs.gnu.org > > > > > > > My suggestion is to stop setting create-lockfiles to a nil value. Why > > > > > is the non-nil value a problem? > > > > > > > > Emacs lockfiles are dangling symbolic links. Some tools and systems don't > > > > like those. > > > > > > Isn't that the reason we introduced lock-file-name-transforms? > > > > Perhaps so, but this misses the point. > > My point was to say that if you want collision detection, you should > turn on create-lockfiles. You said this could cause problems with > some tools, and I then pointed out that Emacs 28 has a new feature to > help you solve that side effect, so that you could use locking again. Thank you for clarifying. I have added the following to emacs initialization code. This is satisfying my need to avoid dangling links in places that confuse tools. === 8< === ;; I never use emacs with my own configuration in a multi-user ;; environment, and lockfiles are dangling links that confuse some ;; tools. Conflict detection works prior to 28.1 with ;; create-lockfiles nil. Starting in 28.1, it no longer works with ;; create-lockfiles nil, but lock-file-name-transforms can be used ;; to create the dangling links somewhere else. See ;; http://debbugs.gnu.org/cgi/bugreport.cgi?bug=53207 (if (boundp 'lock-file-name-transforms) (let* ((lockdir (expand-file-name "~/.emacs.d/lockfiles")) (replacement (concat lockdir "/\\2"))) (make-directory lockdir t) (setq lock-file-name-transforms `(("\\`\\([^/]*/\\)*\\([^/]*\\)\\'" ,replacement t)) ) ) (setq create-lockfiles nil) ) === 8< === > > It just seems strange that emacs is perfectly capable of detecting when a file was changed > > outside of emacs without a lockfile but doesn't do this check if it's not also creating lockfiles. > > Once again, this is not about the lockfiles, this is about the entire > feature of detection of editing collisions. The variable's name is a > misnomer. In addition to any other doc clarifications, I'd suggest the fact that create-lockfiles is a misnomer be explained in the help for create-lockfiles. I will add some thoughts to a different part of the thread. Thanks!