GNU bug report logs - #15381
24.3; NTEmacs write-region behaviour with MUSTBENEW set to 'excl

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Sun, 15 Sep 2013 08:23:02 UTC

Severity: normal

Found in version 24.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 15381-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: 15381-done <at> debbugs.gnu.org
Subject: Re: bug#15381: 24.3;
 NTEmacs write-region behaviour with MUSTBENEW set to 'excl
Date: Sun, 15 Sep 2013 12:46:32 +0300
> Date: Sun, 15 Sep 2013 20:21:37 +1200
> From: Phil Sainty <psainty <at> orcon.net.nz>
> 
> I'm using write-region with the MUSTBENEW argument set to 'excl
> to prohibit writing to an existing file. This works as advertised
> on Ubuntu, but I happened to try the code under Windows and found
> that the write was not prevented.
> 
> I further observed that, in this circumstance, the written
> content only overwrites the start of the target file (leaving
> the remainder), rather than replacing the whole file. This
> appears to be the same behaviour as setting the APPEND argument
> to zero.
> 
> Setting MUSTBENEW to t works as expected.
> 
> I'm using the following to test:
> 
> M-: (write-region (region-beginning) (region-end) "~/somefile" nil nil 
> nil 'excl) RET

This is a known problem on Windows in all versions of Emacs released
until now.  The problem is already fixed in the development code.

If you can build your own Emacs, I can show you the change that is
required to fix the bug.

Thanks.




This bug report was last modified 11 years and 247 days ago.

Previous Next


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