From unknown Mon Aug 18 11:16:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18125 <18125@debbugs.gnu.org> To: bug#18125 <18125@debbugs.gnu.org> Subject: Status: file-precious-flag breaks symlinks Reply-To: bug#18125 <18125@debbugs.gnu.org> Date: Mon, 18 Aug 2025 18:16:03 +0000 retitle 18125 file-precious-flag breaks symlinks reassign 18125 emacs submitter 18125 Glenn Morris severity 18125 normal tag 18125 confirmed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 28 02:34:19 2014 Received: (at submit) by debbugs.gnu.org; 28 Jul 2014 06:34:19 +0000 Received: from localhost ([127.0.0.1]:39909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBeVm-0008AX-FS for submit@debbugs.gnu.org; Mon, 28 Jul 2014 02:34:18 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:39265 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBeVj-0008AI-6k for submit@debbugs.gnu.org; Mon, 28 Jul 2014 02:34:16 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XBeVh-0004ir-IX; Mon, 28 Jul 2014 02:34:13 -0400 From: Glenn Morris To: submit@debbugs.gnu.org Subject: file-precious-flag breaks symlinks X-Spook: Consul plutonium Exon Shell ASLET PGP Gazprom diwn X-Ran: A]S8tW6cv!33=,4jdW}UUNFd=I!]"OQjbM2U1R7u{${;I3%1@Ib:$K$m`}QZ%ukpf];>cX X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 28 Jul 2014 02:34:13 -0400 Message-ID: <8boawa800q.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) Package: emacs Version: 24.3.92 touch foo ln -s foo bar emacs-24.3.92 -Q --eval '(setq file-precious-flag t)' bar change bar and save -> bar is no longer a symlink AFAICS, it has always (since at least 22.3) been like this. Does it have to be, though? Why can't it overwrite the target of the link? In any case, the doc only mentions breaking hardlinks. Setting find-file-visit-truename non-nil avoids the problem. (Cf http://debbugs.gnu.org/454) From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 06:40:31 2020 Received: (at 18125) by debbugs.gnu.org; 4 Dec 2020 11:40:31 +0000 Received: from localhost ([127.0.0.1]:43114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kl9Ru-00036D-Sf for submit@debbugs.gnu.org; Fri, 04 Dec 2020 06:40:31 -0500 Received: from quimby.gnus.org ([95.216.78.240]:58294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kl9Rt-00035z-D3 for 18125@debbugs.gnu.org; Fri, 04 Dec 2020 06:40:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xBe3LxvuUcaOqS7SHwnZ4K3XCNSfoFQKf0W2RuxhpQo=; b=lk9Q2OEryHpv5ffpmLchoDyxJ4 jQx8u6adDHIkmIgtHTfE+6M5IlTVeZ7ODnx+G8Lt7Tz7uCJTBTuMT+WWvojwPDY7ju2R//BOCyirs Ak+LNLTPrE+mnxY8JYQ4S38DiLylOxP/GQyq5AfPmZeuqXSUvv74tGALRpKQ+cR7gdnI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kl9Rl-00086l-2M; Fri, 04 Dec 2020 12:40:23 +0100 From: Lars Ingebrigtsen To: Glenn Morris Subject: Re: bug#18125: file-precious-flag breaks symlinks References: <8boawa800q.fsf@fencepost.gnu.org> X-Now-Playing: The Matthew Herbert Big Band's _The State Between Us (1)_: "Be Still" Date: Fri, 04 Dec 2020 12:40:19 +0100 In-Reply-To: <8boawa800q.fsf@fencepost.gnu.org> (Glenn Morris's message of "Mon, 28 Jul 2014 02:34:13 -0400") Message-ID: <87h7p1iyu4.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Glenn Morris writes: > touch foo > ln -s foo bar > emacs-24.3.92 -Q --eval '(setq file-precious-flag t)' bar > change bar and save > -> bar is no longer a symlink > > AFAICS, it has always (since at least 22.3) been like [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18125 Cc: 18125@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Glenn Morris writes: > touch foo > ln -s foo bar > emacs-24.3.92 -Q --eval '(setq file-precious-flag t)' bar > change bar and save > -> bar is no longer a symlink > > AFAICS, it has always (since at least 22.3) been like this. > Does it have to be, though? Why can't it overwrite the target of the link? This behaviour is still present in Emacs 28. > In any case, the doc only mentions breaking hardlinks. > > Setting find-file-visit-truename non-nil avoids the problem. I'm not sure whether this is a bug or whether it makes sense. I'm leaning towards... bug? Perhaps? Anybody got an opinion here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 06:40:39 2020 Received: (at control) by debbugs.gnu.org; 4 Dec 2020 11:40:39 +0000 Received: from localhost ([127.0.0.1]:43117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kl9S3-00036Z-4E for submit@debbugs.gnu.org; Fri, 04 Dec 2020 06:40:39 -0500 Received: from quimby.gnus.org ([95.216.78.240]:58308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kl9S1-00036L-86 for control@debbugs.gnu.org; Fri, 04 Dec 2020 06:40:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pJ370CvccuBSs7OMhmsLvNFrtSo4k62M5nIy3SSVdXM=; b=sLbiMTcuuEr5z0e1OxJkckxCCt ZrgWBwErOpwxk6xfLQWm1iUdZNtw6QzEeY/aIGxYEqSiW0ktrjpp9PhQnSnWOCm9NbjEfS9qXy08k 3spSbssBwO/JT2AIXaEI9BNAjGmrpkBW3rASWycqlsb/jjlCXyV3KFYt4NQb4qRFG7yU=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kl9Rt-00086u-Ex for control@debbugs.gnu.org; Fri, 04 Dec 2020 12:40:31 +0100 Date: Fri, 04 Dec 2020 12:40:28 +0100 Message-Id: <87ft4liytv.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #18125 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 18125 + confirmed quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 18125 + confirmed quit From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 04 07:08:16 2020 Received: (at 18125) by debbugs.gnu.org; 4 Dec 2020 12:08:16 +0000 Received: from localhost ([127.0.0.1]:43261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kl9sl-00086m-RW for submit@debbugs.gnu.org; Fri, 04 Dec 2020 07:08:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kl9sk-00086a-K3 for 18125@debbugs.gnu.org; Fri, 04 Dec 2020 07:08:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44318) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kl9sf-0007la-Fu; Fri, 04 Dec 2020 07:08:09 -0500 Received: from [176.228.60.248] (port=3384 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kl9sd-0005c2-Oa; Fri, 04 Dec 2020 07:08:08 -0500 Date: Fri, 04 Dec 2020 14:07:50 +0200 Message-Id: <83k0txepux.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87h7p1iyu4.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 04 Dec 2020 12:40:19 +0100) Subject: Re: bug#18125: file-precious-flag breaks symlinks References: <8boawa800q.fsf@fencepost.gnu.org> <87h7p1iyu4.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18125 Cc: rgm@gnu.org, 18125@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Date: Fri, 04 Dec 2020 12:40:19 +0100 > Cc: 18125@debbugs.gnu.org > > Glenn Morris writes: > > > touch foo > > ln -s foo bar > > emacs-24.3.92 -Q --eval '(setq file-precious-flag t)' bar > > change bar and save > > -> bar is no longer a symlink > > > > AFAICS, it has always (since at least 22.3) been like this. > > Does it have to be, though? Why can't it overwrite the target of the link? > > This behaviour is still present in Emacs 28. > > > In any case, the doc only mentions breaking hardlinks. > > > > Setting find-file-visit-truename non-nil avoids the problem. > > I'm not sure whether this is a bug or whether it makes sense. I'm > leaning towards... bug? Perhaps? Anybody got an opinion here? IMO, we could provide the alternative behavior as opt-in, conditioned on a new option. It is not clear to me that everyone will want to overwrite the target, so an incompatible change here must be an opt-in. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 10:22:09 2021 Received: (at 18125) by debbugs.gnu.org; 20 Aug 2021 14:22:09 +0000 Received: from localhost ([127.0.0.1]:35215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH5PN-0001Dm-6B for submit@debbugs.gnu.org; Fri, 20 Aug 2021 10:22:09 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH5PK-0001DC-SA for 18125@debbugs.gnu.org; Fri, 20 Aug 2021 10:22:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OSulqlSI7ubdaOvUwDbFl2/VU1aZzoObc3fv0d+JbfA=; b=rZboHCUbsOVyd9HhyCYJ+VpS5z uw59DbtWVhQyNrHxR8v8u6LjBOxTHZWXbGXgsx+dXIHMhVYhRNC5vRtM8KuFkl2Nr3UxS4GW12zsN +Z5YDh623Y+zTaG5Jmd6Fil3V2MN+1qaLPWckQ+wQc044pn/TUTbZ+MMTpEnpUp074Cs=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mH5PA-0004rQ-2f; Fri, 20 Aug 2021 16:22:00 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#18125: file-precious-flag breaks symlinks References: <8boawa800q.fsf@fencepost.gnu.org> <87h7p1iyu4.fsf@gnus.org> <83k0txepux.fsf@gnu.org> Date: Fri, 20 Aug 2021 16:21:52 +0200 In-Reply-To: <83k0txepux.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Dec 2020 14:07:50 +0200") Message-ID: <87sfz46vsv.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > IMO, we could provide the alternative behavior as opt-in, conditioned > on a new option. It is not clear to me that everyone will want to > overwrite the target, so an incompatible change here must [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18125 Cc: rgm@gnu.org, 18125@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > IMO, we could provide the alternative behavior as opt-in, conditioned > on a new option. It is not clear to me that everyone will want to > overwrite the target, so an incompatible change here must be an > opt-in. It's a pretty specialised option (which makes it hard to explain), but I get your point about being backwards-compatible in this area. So I've now added the new option and adjusted the code. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 10:22:12 2021 Received: (at control) by debbugs.gnu.org; 20 Aug 2021 14:22:12 +0000 Received: from localhost ([127.0.0.1]:35218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH5PQ-0001E2-Cm for submit@debbugs.gnu.org; Fri, 20 Aug 2021 10:22:12 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH5PO-0001DY-7d for control@debbugs.gnu.org; Fri, 20 Aug 2021 10:22:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=H7F3CXlEeQKhBNMkJO952A7Jq9ycbvqy7J/JB+O6ueI=; b=MSeuMtlB7i4pqm1PSMBbC2fFuc k8WsRl21NfOP142WCQ9wkiqLPdATh/YBWFu175/boqLGBeh2LwYT3MAat0KlSeRe0DspraFAS/el7 JNF7/dprlMs5ZNJ9kRsAyptI44Cmko0yi/kya5+0QXWpce08v3DS0DehGwbgZ6l1wb88=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mH5PG-0004rc-BC for control@debbugs.gnu.org; Fri, 20 Aug 2021 16:22:04 +0200 Date: Fri, 20 Aug 2021 16:22:01 +0200 Message-Id: <87r1eo6vsm.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #18125 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 18125 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 18125 28.1 quit From unknown Mon Aug 18 11:16:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 18 Sep 2021 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator