GNU bug report logs - #35497
[PATCH] Don't rewrite buffer contents after saving by rename

Previous Next

Package: emacs;

Reported by: Jonathan Tomer <jktomer <at> google.com>

Date: Mon, 29 Apr 2019 23:32:01 UTC

Severity: normal

Tags: patch

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 35497 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Jonathan Tomer <jktomer <at> google.com>
Cc: 35497 <at> debbugs.gnu.org
Subject: Re: bug#35497: [PATCH] Don't rewrite buffer contents after saving by
 rename
Date: Tue, 30 Apr 2019 09:18:18 +0200
Jonathan Tomer <jktomer <at> google.com> writes:

Hi Jonathan,

Thanks for the patch.

> --- a/etc/NEWS
> +++ b/etc/NEWS
> @@ -340,6 +340,13 @@ longer.
>  ** Multicolor fonts such as "Noto Color Emoji" can be displayed on
>  Emacs configured with Cairo drawing and linked with cairo >= 1.16.0.
>
> +---
> +** The file-precious-flag is now respected correctly.
> +A bug previously caused files to be saved twice when
> +`file-precious-flag' or `break-hardlinks-on-save' were specified: once
> +by renaming a temporary file to the destination name, and then again
> +by truncating and rewriting the file, which is exactly what
> +`file-precious-flag' is supposed to avoid.
>  
>  * Editing Changes in Emacs 27.1

We don't describe bug fixes in etc/NEWS.

> +(ert-deftest files-tests-dont-rewrite-precious-files ()
> +  "Test that `file-precious-flag' forces files to be saved by
> +renaming only, rather than modified in-place."

I haven't checked the situation with Tramp. It cares also for
file-precious-flag, bug I don't remember whether it behaves as strict as
you have tested here. Do you want to write a Tramp test for this? It
would fit into tramp-tests.el.

Best regards, Michael.




This bug report was last modified 6 years and 71 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.