GNU bug report logs - #17916
24.4.50; `write-region' doc for numeric APPEND arg

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 3 Jul 2014 16:16:02 UTC

Severity: minor

Found in version 24.4.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 17916 <at> debbugs.gnu.org
Subject: bug#17916: 24.4.50; `write-region' doc for numeric APPEND arg
Date: Thu, 03 Jul 2014 19:39:49 +0300
> Date: Thu, 3 Jul 2014 09:14:07 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> 
>   If APPEND is a number, `write-region' seeks to that byte offset from
>   the start of the file and writes the data from there.
> 
> Because of the word "seek", this will be clear to some programmers, but
> it might not be clear to others.  We should make clear that
> `write-region' overwrites existing bytes in the file; it does not insert
> the region text at the given position.

This assumes not only that the reader knows about 'seek', it also
assumes that she has general knowledge about writing to files: there
is no "inserting" stuff in the middle of a file.  When you write, you
always overwrite whatever is there.  Isn't that common knowledge?




This bug report was last modified 3 years and 312 days ago.

Previous Next


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