From: Eli Zaretskii <eliz@gnu.org>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: 15381-done@debbugs.gnu.org
Subject: bug#15381: 24.3; NTEmacs write-region behaviour with MUSTBENEW set to 'excl
Date: Sun, 15 Sep 2013 12:46:32 +0300 [thread overview]
Message-ID: <83eh8qqux3.fsf@gnu.org> (raw)
In-Reply-To: <52356E11.6080401@orcon.net.nz>
> Date: Sun, 15 Sep 2013 20:21:37 +1200
> From: Phil Sainty <psainty@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.
next prev parent reply other threads:[~2013-09-15 9:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-15 8:21 bug#15381: 24.3; NTEmacs write-region behaviour with MUSTBENEW set to 'excl Phil Sainty
2013-09-15 9:46 ` Eli Zaretskii [this message]
2013-09-15 10:48 ` Phil Sainty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83eh8qqux3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=15381-done@debbugs.gnu.org \
--cc=psainty@orcon.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).