GNU bug report logs -
#12507
24.2.50; `bookmark-write-file': use `write-file', not `write-region', to get backups
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Mon, 24 Sep 2012 18:44:01 UTC
Severity: wishlist
Tags: notabug
Found in version 24.2.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #82 received at 12507 <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> oracle.com> writes:
>> > The question about visiting the file is still open, though.
>>
>> I am using now the patch I sent here yesterday and it works
>> really good, faster and do backups (numered) as expected.
>> Hope it will be applied here in emacs because it DTRT.
>>
>> I don't understand what is the problem with "visiting the file".
>> See in precedent post why it is not bad visiting the file.
>> In the special case of bookmark-write-file, it is really not the
>> problem.
>
> Your question is for Stefan.
>
> Your patch is equivalent to the change I proposed originally: just replace
> `write-region' with `write-file'.
No, this is ineficient too, you write twice the same data.
The important thing is writing directly to the buffer of file.
For the backup thing, yes it is similar, but with unneeded steps,
going straight to save-buffer is better and faster IMO (of course if you
have started writing data in the file buffer)
But the worst thing is the actual version with write-region:
Slow and backup broken.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
This bug report was last modified 4 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.